GraphQL / Object Interface Related Structures.| Parameter Name | Required | Type | Explanation |
|---|---|---|---|
| objectList | yes | []interface | Batch create objects and tangibles and bind them. |
| isAsyn | no | bool | Default is false. true indicates that the interface will store data asynchronously. The interface will first return an objectId, and the service will then perform the database operations asynchronously. false means the interface will store data synchronously, meaning that data is confirmed to be successfully stored once the interface returns. |
| Parameter Name | Required | Type | Explanation |
|---|---|---|---|
| object | yes | ObjectInfo | Detailed information of the new object |
| tangible | yes | TangibleInfo | Detailed information of the new tangible |
| priority | no | Int | Binding priority; the object will prioritize using the tangible with the smallest value. If this value is not provided, the default rule is: set priority to 0 for new bindings; if a binding relationship already exists, set it to 1 |
| Parameter Name | Required | Type | Explanation |
|---|---|---|---|
| errorCode | yes | int | Error code |
| errorInfo | yes | string | Error information |
| result | no | ObjectInfo | Returns the new object. The field to be returned should be specified in the request code segment. |
Authorization: Bearer ********************curl --location 'https://mma.tvunetworks.com/api/objectd/v1/query' \
--header 'SID: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"query": "mutation createObjectAndBind { createObjectAndBind(input: { objectList:[{ object:{ objectId:\"\", objectType:1, objectName:\"testext\" }, tangible:{ tangibleId:\"ext001\", tangibleType:\"ext\", tangibleName:\"testtangibletest1\" } }] }) { errorCode errorInfo result { objectId objectName objectType } } }"
}'{
"data": {
"createObjectAndBind": {
"errorCode": "0x0",
"errorInfo": "Succ",
"result": [
{
"objectId": "1302992146663608320",
"objectName": "testext",
"objectType": 1
}
]
}
}
}