This endpoint updates all Organization fields for multiple Organizations.
Updating a Single Field
To update only a single field of an Organization, please use the PATCH method with the parameters that need to be changed.
Request
To update all attributes of one or more Organization(s) please make a PUT request to the following URL:
HTTP Method | URL |
---|---|
POST | https://industrial.api.ubidots.com/api/v2.0/organizations/_/bulk/update/ |
It's a POST
Please note that it's a POST request and not a PUT request.
Query Parameters
Parameter | Type | Use | Description |
---|---|---|---|
token | String | Authentication | Authentication Token can optionally be sent as a query parameter. |
Body Parameters
The body is an Array containing Organization JSON objects. Each Organization object can contain the following any of the following body parameters:
Parameter | Type | Required? | Default Value | Description |
---|---|---|---|---|
id | String | Yes | N/A (Required) | The id of the organization desired to be updated |
label | String | No | "" | The API label of Organization |
name | String | No | Same as label | Name of the Organization |
description | String | No | "" | Description of Organization |
favicon | String | No | null | Icon of Organization. How to update the favicon |
logo | String | No | null | Logo of Organization. How to update the logo |
properties | Object | No | {} | Organization properties |
isActive | Boolean | No | True | Is True when Organization is active |
app | <app_key> | No | null | Key of App (id or label) |
Header
Parameter | Required? | Description |
---|---|---|
X-Auth-Token | Yes | Authentication Token of account |
X-Bulk-Operation | Yes | Need to be set to True for the bulk operation to work |
Content-Type | Yes | Content type of body |
$ curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/organizations/_/bulk/update/' \
-H 'Content-Type: application/json' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
-H 'X-Bulk-Operation: True' \
-d '[
{
"id": "6027087b65a24d1987654321",
"isActive": true,
"label": "org1",
"name": "Organization 1",
"description": "Organization One",
"app": null,
"properties": {"color": "#BADA55"}
},
...
{
"id": "6027087b65a24d19acbd0987",
"isActive": true,
"label": "org2",
"name": "Organization 2",
"description": "Organization Two",
"app": null,
"properties": {"color": "#BAD995"}
}
]'
{
"task": {
"id": "4974ac3a88301c016192"
}
}
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}
{
"detail": "Header `X-BULK-OPERATION` should be provided for bulk operation."
}
Response
Returns a Task Id of the asynchronous process.