Creating a data model using the API
A data model consists of a list of attributes. The data model must be created before creating the campaign.
In this example, Talend API Tester is used to send requests.
For further information about Talend API Tester, see Talend Cloud API Tester User Guide.
Procedure
Results
{
"namespace": "org.talend.schema",
"displayName": "Product (created via API)",
"name": "my_products_created_via_API",
"description": "Product catalog available.",
"version": 1,
"references":[],
"creationDate": 1601467434441,
"lastUpdateDate": 1601467434441,
"createdBy": {
"id": "3e2eed7d-c632-40da-822e-9780f2c74842",
"username": "user@account",
"firstName": "user",
"lastName": "name",
"enabled": true
},
"lastUpdatedBy": {
"id": "3e2eed7d-c632-40da-822e-9780f2c74842",
"username": "user@account",
"firstName": "user",
"lastName": "name",
"enabled": true
},
"fields": null,
"referenced": false
}
You can see the data model you created in Talend Cloud Data Stewardship.
Information noteNote: If you try to create a data model with a name that already exists, the API
returns a 400 Bad request error. The response includes a message
like this one:
{"code":"SCHEMA_ALL_SCHEMA_NAME_ALREADY_EXISTS","message":"SCHEMA_NAME_ALREADY_EXISTS","context":{"name":"demo_product"}}