To update one or more specific attributes of one or more User(s) please make a PATCH request to the following URL:
HTTP Method URL PATCH https://industrial.api.ubidots.com/api/v2.0/users/_/bulk/update/
Parameter Type Use Description token String Authentication Authentication Token can optionally be sent as a query parameter.
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 ""email String Yes N/A (Required) defaultOrganization String No nulldefaultRole String No nulldefaultDashboard String No nulllanguage String No nullwebsite String No ""timezone String No nulldecimalPlaces Integer No nullnumberFormat String No nullisActive Boolean No Truetags List No default=[], max_length=20 (tags max limit), max_length=50 (tags max length) contactMethods List No []
Parameter Required? Description X-Auth-Token Yes Authentication Token of accountX-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 (Request)
$ curl -X PATCH '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": "User 1"
},
...
{
"id": "445da83878abc3c75756",
"username": "User 4"
},
]'
202 Accepted 400 Bad Request 401 Unauthorized 403 Forbidden
{
"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."
}
Returns a task ID for the asynchronous process.