Operación Bulk: Actualizar todos los campos de Organizations

Este endpoint actualiza todos los campos de Organization para múltiples Organizations.

📘

Actualizando un solo campo

Para actualizar sólo un campo de una Organization, utiliza el método PATCH con los parámetros que deben cambiarse.

Solicitud HTTP

Para actualizar todos los atributos de una o más Organizations, haz una petición POST a la siguiente URL:

HTTP MethodURL
POSThttps://api.netux.com/api/v2.0/organizations/_/bulk/update/

🚧

Es un POST

Ten en cuenta que es una petición POST y no una petición PUT.

Parámetros de consulta

ParameterTypeUseDescription
tokenStringAuthenticationAuthentication 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:

ParameterTypeRequired?Default ValueDescription
idStringYesN/A (Required)The id of the organization desired to be updated
labelStringNo""The API label of Organization
nameStringNoSame as labelName of the Organization
descriptionStringNo""Description of Organization
faviconStringNonullIcon of Organization. How to update the favicon
logoStringNonullLogo of Organization. How to update the logo
propertiesObjectNo{}Organization properties
isActiveBooleanNoTrueIs True when Organization is active
app<app_key>NonullKey of App (id or label)

Cabecera

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
X-Bulk-OperationYesNeed to be set to True for the bulk operation to work
Content-TypeYesContent type of body
$ curl -X POST '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": "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"}
  }
]'

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."
}