This endpoint updates multiple Event fields for multiple Events.
Request
To update one or more specific attributes of many Event(s) please make a PATCH request to the following URL:
| HTTP Method | URL |
|---|---|
| PATCH | https://industrial.api.ubidots.com/api/v2.0/events/_/bulk/update |
Query Parameters
| Parameter | Type | Use | Description |
|---|---|---|---|
| token | String | Authentication | Authentication Token can optionally be sent as a query parameter. |
Body Parameters
The body of this request is a list of Objects with the below keys. Some keys are optional.
| Parameter | Type | Required? | Default Value | Description |
|---|---|---|---|---|
| id or label | String | Yes | N/A (required) | Id or label of the event |
| name | String | No | Same as label | Name of Event |
| description | String | No | "" | Description of Event |
| tags | String Array | No | [] | Tags of Event |
| organization | <organization_key> | No | null | Key of Organization (Id or Label) |
| triggers | Array of Object Array | Yes | N/A (required) | Triggers of Event |
| actions | Object Array | Yes | N/A (required) | Actions of Event |
| isActive | Boolean | No | True | Is True when Event is active |
| activeDates | Object | Yes | N/A (required) | All Active Dates of Event |
| isGlobalEvent | Boolean | No | False | True if Event is a global event |
Header
| Parameter | Type | Description |
|---|---|---|
| X-Auth-Token | String | Authentication Token of account |
| X-Bulk-Operation | Boolean | Need to be set to True for the bulk operation to work |
| Content-Type | String (application/json) | Content type of bod |
curl -X PATCH 'https://industrial.api.ubidots.com/api/v2.0/events/_/bulk/update/' \
-H 'Content-Type: application/json' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
-H 'X-Bulk-Operation: true' \
-d '[
{
"id": "409dba9c67d3bb19f554",
"label": "Event 1"
},
...
{
"id": "445da83878abc3c75756",
"label": "Event 4"
},
]'{
"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 an Event object of the Bulk Event updated.
