Skip to main content

Creating Collections in DX Graph

Create a Collection

POST https://io.conscia.ai/vue/_api/v1/collections
content-type: application/json
Authorization: Bearer {{apiKey}}
X-Customer-Code: {{customerCode}}

{
"collectionCode": "customer-profile",
"name": "Customer Profile",
"description": "Unique customer records",
"dataRecordIdentifierProperty": "customer_id"
}

Setting a Collection's Schema

POST https://io.conscia.ai/vue/_api/v1/collections/{{collectionCode}}/schema
content-type: application/json
Authorization: Bearer {{apiKey}}
X-Customer-Code: {{customerCode}}

{
"fields": {
"customer_id": {
"jsonSchema": { "type": "string", "title": "Customer ID" },
"displaySchema": {},
"options": { "readonly": true, "required": true }
},
"salutation": {
"jsonSchema": { "type": "string", "title": "Salutation" },
"displaySchema": {},
"options": { "readonly": true, "required": false }
},
"first_name": {
"jsonSchema": { "type": "string", "title": "First Name" },
"displaySchema": {},
"options": { "readonly": true, "required": false }
},
"last_name": {
"jsonSchema": { "type": "string", "title": "Last Name" },
"displaySchema": {},
"options": { "readonly": true, "required": false }
},
"email_address": {
"jsonSchema": { "type": "string", "title": "Email" },
"displaySchema": {},
"options": { "readonly": true, "required": false }
},
"city": {
"jsonSchema": { "type": "string", "title": "City" },
"displaySchema": {},
"options": { "readonly": true, "required": false },
"computed": true
},
"state": {
"jsonSchema": { "type": "string", "title": "State" },
"displaySchema": {},
"options": { "readonly": true, "required": false },
"computed": true
},
"age": {
"jsonSchema": { "type": "number", "title": "Age" },
"displaySchema": {},
"options": { "readonly": true, "required": false },
"computed": true
}
}
}