This endpoint updates all User fields for multiple Users.
Updating a Single Field
To update only a single field of a User, please use the PATCH method with the parameters that need to be changed.
Request
To update all attributes of a User please make a POST request to the following URL:
HTTP Method | URL |
---|---|
POST | https://industrial.api.ubidots.com/api/v2.0/users/_/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
Parameter | Type | Required? | Default Value |
---|---|---|---|
username | String | Yes | N/A (Required). Only alphanumeric characters, dash or hyphen. On owners the prefix testing is not allowed. |
password | String | Yes | "" |
firstName | String | No | "" |
lastName | String | No | "" |
String | Yes | N/A (Required) | |
defaultOrganization | String | No | null |
defaultRole | String | No | null |
defaultDashboard | String | No | null |
language | String | No | null |
website | String | No | "" |
timezone | String | No | null |
decimalPlaces | Integer | No | null |
numberFormat | String | No | null |
isActive | Boolean | No | True |
tags | List | No | default=[], max_length=20 (tags max limit), max_length=50 (tags max length) |
contactMethods | List | No | [] |
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: String (application/json) |
$ curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/users/_/bulk/update/' \
-H 'Content-Type: application/json' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
-H 'X-Bulk-Operation: True' \
-d '{
"id": "409dba9c67d3bb19f554",
"username": "ubidots",
"firstName": "test",
"lastName": "users",
"email": "[email protected]",
"defaultOrganization": "61a697f2fbc8990cc236dc23",
"defaultRole": "viewer",
"defaultDashboard": "625e340c68591a04705c7365",
"language": "es-ES",
"website": "",
"timezone": "America/Bogotá",
"decimalPlaces": 3,
"properties": {},
"tags": [],
"isActive": true,
} '
{
"task": {
"id": "tyg54645501a9ca5714e7b098721"
}
}
{
"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.