GraphQL / Object Interface Related Structures.| Parameter Name | Required | Type | Explain |
|---|---|---|---|
| objectId | yes | string | The ID of the object. When the value is not empty, use the provided value as the ObjectId. If the value is an empty string, generate a new ObjectId and return this ID. |
| objectType | yes | int | The type of the object. |
| objectName | no | string | The name of the object. |
| nestedObjects | no | []NestedObjects | The properties of the object. For outputObject, its value is: [{destinationObject+encodingObject+nodeObject}] |
| description | no | string | Description information. |
| admin | no | EntitlementInfo | Admin permissions for the object. |
| owner | no | EntitlementInfo | Owner permissions for the object. |
| features | no | []ObjectFeatureInfo | Feature permissions for the object. |
| dmaEmbargo | no | Boolean | DMA Embargo flag for the object. |
| geoInfo | no | []GeoLocationInfo | Latitude and longitude of the object's geographical location. |
| location | no | []string | The city names where the object is located. |
| origin | no | string | Data source. |
| tags | no | []string | List of tags associated with the object. |
| attributes | no | any | extra attributes of the object, for example attributes:[{attrName:"test1", attrValue:["1"]},{attrName:"test2", attrValue:["2"]}] |
| Parameter Name | Required | Type | Explain |
|---|---|---|---|
| errorCode | yes | string | Error code. |
| errorInfo | yes | string | Error message. |
| result | no | ObjectInfo | The new object returned. 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 createObject { createObject(input: {objectId: \"\", objectType: 1, objectName: \"shm_test_source\", owner:{users:[\"testshmuser\"], groups:[\"testshmgroup\"]}, description:\"shm test\"}) { errorCode errorInfo result { objectId objectType objectName } } }"
}'{
"data": {
"createObject": {
"errorCode": "0x0",
"errorInfo": "Succ",
"result": {
"objectId": "1301923242080079872",
"objectType": 1,
"objectName": "shm_test_source"
}
}
}
}