Mutations
updatePropertyDefinition
Updates a property definition.
Note: You can authenticate using a two-legged token. To use a three-legged token, you must have ‘Owner’ or ‘Editor’ access to the APS App.
Template for Mutation:
mutation UpdatePropertyDefinition($input: updatePropertyDefinitionInput!){
updatePropertyDefinition(input: $input) {
# UpdatePropertyDefinitionPayload Fields
}
}
Arguments
| input* updatePropertyDefinitionInput non-null | The inputs needed to update the property definition. |
* Required
Possible Returns
| Value Type | Description |
|---|---|
| UpdatePropertyDefinitionPayload | Response of update property definition operation. |
Examples
Example 1
This mutation updates a Property Definition based on it’s id and returns the updated property definition.
Query:
mutation UpdatePropertyDefinition($input: UpdatePropertyDefinitionInput!) {
updatePropertyDefinition(input: $input) {
propertyDefinition {
id
name
specification
isHidden
isReadOnly
isArchived
description
propertyBehavior
units {
id
name
}
}
}
}
Show More
Query Variables:
{
"input": {
"propertyDefinitionId": "cHJvcGRlZn5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5wcm9wX2RlZl9jb2xfMTc2ODg4MjUxNzkxOH5wYXJhbWV0ZXJzLkFDTjRFdmRITE1UWml3N25ma0hVcFBqc0E0VmZaYW5UOjNjOWU4YWRkMDkzMDQ2MTNhOGIzNjdiYWJjOGZhNjYwLTEuMC4w",
"description": "description updated",
"isHidden": true
}
}
Response:
{
"data": {
"updatePropertyDefinition": {
"propertyDefinition": {
"id": "cHJvcGRlZn5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5BQ040RXZkSExNVFppdzduZmtIVXBQanNBNFZmWmFuVH5wcm9wX2RlZl9jb2xfMTc2ODg4MjUxNzkxOH5wYXJhbWV0ZXJzLkFDTjRFdmRITE1UWml3N25ma0hVcFBqc0E0VmZaYW5UOjNjOWU4YWRkMDkzMDQ2MTNhOGIzNjdiYWJjOGZhNjYwLTEuMC4w",
"name": "ERP ID",
"specification": "STRING",
"isHidden": true,
"isReadOnly": false,
"isArchived": false,
"description": "description updated",
"propertyBehavior": "TIMELESS",
"units": null
}
}
}
}
Show More