GraphQL / Object Interface Related Structures.| Parameter Name | Required | Type | Explanation |
|---|---|---|---|
| actions | yes | []MsgReqAttrAction | Update operations |
| Parameter Name | Required | Type | Explanation |
|---|---|---|---|
| objectId | yes | string | The objectId to update. The parameters objectId and objectIdList must include at least one of them. |
| objectIdList | yes | []string | The objectIds to update. The parameters objectId and objectIdList must include at least one of them. |
| attrName | yes | string | The attribute to update, currently supported |
| operator | yes | string | Currently, three types of update operations are supported: add means to add a new element, remove means to delete a specific element, update means to overwrite all values. remove_all means to delete all element. |
| attrValue | no | Any | Passed parameters |
| force | no | bool | default is false. Held objects/tangibles are not allowed to be modified by default unless the user has permission and explicitly sets force=true. |
| attr name | attr value | Explanation |
|---|---|---|
| tag | []string | Update the tag list |
| admin.users | []string | Update the list of users with admin permissions |
| admin.groups | []string | Update the list of groups with admin permissions |
| owner.users | []string | Update the list of users with owner permissions |
| owner.groups | []string | Update the list of groups with owner permissions |
| feature.${featureName}.users | []string | Update the list of users with feature permissions; featureName is the corresponding feature name |
| feature.${featureName}.groups | []string | Update the list of groups with feature permissions; featureName is the corresponding feature name |
| attributes.${attributesName} | []string | Update attributes; attributesName is the corresponding attributes name |
| Parameter Name | Required | Type | Explanation |
|---|---|---|---|
| errorCode | yes | string | Error code |
| errorInfo | yes | string | Error information |
curl --location 'https://mma.tvunetworks.com/api/objectd/v1/query' \
--header 'SID: ' \
--header 'Content-Type: application/json' \
--data '{
"query": "mutation updateObjectAttr { updateObjectAttr(input: { actions: [{ objectId: \"1789821\", operator: \"add\", attrName: \"admin.users\", attrValue: [\"value1\", \"value2\", \"value3\"] }] }) { errorCode errorInfo } }"
}'{
"data": {
"updateObjectAttr": {
"errorCode": "0x0",
"errorInfo": "Succ"
}
}
}