Este endpoint actualiza los campos de Organization especificados en el cuerpo para múltiples Organizations a la vez.
Solicitud HTTP
Para actualizar uno o más atributos específicos de una o más Organizations, haz una petición PATCH a la siguiente URL:
HTTP Method | URL |
---|---|
PATCH | https://api.netux.com/api/v2.0/organizations/_/bulk/update/ |
Parámetros de consulta
Parameter | Type | Use | Description |
---|---|---|---|
token | String | Authentication | Authentication Token can optionally be sent as a query parameter. |
Parámetros de cuerpo
El cuerpo es un array que contiene objetos JSON correspondientes a Organizations. Cada objeto de Organization puede contener los siguientes parámetros de cuerpo:
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) |
Cabecera
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 PATCH
'https://api.netux.com/api/v2.0/organizations/_/bulk/update/' \
-H 'Content-Type: application/json' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
-H 'X-Bulk-Operation: True' \
-d '[
{
"id": "409dba9c67d3bb19f554",
"name": "Organization Third"
},
{
"id": "4923b1670068c9c54b06",
"name": "Organization Fourth"
},
{
"id": "445da83878abc3c75756",
"name": "Organization Fifth"
}
]'
Respuesta
Devuelve un Task Id del proceso asíncrono.
{
"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."
}