Update information of a given label.
PATCH
v1/accounts/{accountId}/labels/{labelId}
Update information of a given label.
Resource Information
Method and URI | PATCH https://developer.api.autodesk.com/parameters/v1/accounts/{accountId}/labels/{labelId} |
Authentication Context | user context required |
Required OAuth Scopes | data:read data:write |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token>, where <token> is obtained via a three-legged OAuth flow. |
Content-Type* string | Must be application/json |
Region string | The region the account’s data is provisioned in. Currently supports US and EMEA . Default is US . |
* Required
Request
URI Parameters
accountId string: UUID or string: b.UUID | The Autodesk Construction Cloud account ID. |
labelId string | The label ID. |
Request
Body Structure
name string | The new label name. |
description string | The new label description. |
Response
HTTP Status Code Summary
200 OK | Successfully updated the label. |
400 Bad Request | The request could not be understood by the server due to malformed syntax. |
401 Unauthorized | Request has not been applied because it lacks valid authentication credentials for the target resource. |
403 Forbidden | The server understood the request but refuses to authorize it. |
404 Not Found | The resource cannot be found. |
406 Not Acceptable | The server cannot produce a response matching the list of acceptable values defined in the request. |
410 | Access to the target resource is no longer available. |
429 Too Many Requests | User has sent too many requests in a given amount of time. |
500 Internal Server Error | An unexpected error occurred on the server. |
503 Service Unavailable | Server is not ready to handle the request. |
Response
Body Structure (200)
id string | The label ID. |
name string | The label name. |
description string | The label description. |
Note:Update or Detach Labels APIs can update parameters outside the specified collection in certain instances.
Example
Successfully updated the label (200)
Request
curl -v 'https://developer.api.autodesk.com/parameters/v1/accounts/009777bb-e1e5-4577-9800-0789677e4616/labels/PQWJ-15400-I3YS-26764' \
-X 'PATCH' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
-H 'Content-Type: application/json' \
-d '{
"name": "new doors",
"description": "These are new doors"
}'
Show More
Response
{
"id": "PQWJ-15400-I3YS-26764",
"name": "new doors",
"description": "These are new doors"
}