Este endpoint actualiza todos los campos de la Organization especificada en el cuerpo.
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 Organization, haz una petición PUT a la siguiente URL:
HTTP Method | URL |
---|---|
PUT | https://api.netux.com/api/v2.0/organizations/<organization_key>/ |
Parámetros de ruta
Parameter | Type | Description |
---|---|---|
organization_key | String | The id or label of the Organization, label should use the prefix ~ |
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
Parameter | Type | Required? | Default Value | Description |
---|---|---|---|---|
label | String | Yes | N/A (required) | The API label of Organization |
name | String | No | Same as label | Name of the Organization |
description | String | No | "" | Description of Organization |
favicon | Image File | No | null | Icon of Organization. How to update the favicon |
logo | Image File | 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 |
$ curl -X PUT 'https://industrial.api.ubidots.com/api/v2.0/organizations/<organization_key>' \
-H 'Content-Type: application/json' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
-d '{
"label": "variable2",
"name": "Variable 2",
"description": "my variable 2",
"tags": ["blue", "yellow"],
"properties": {}
}'
Respuesta
Devuelve un objeto Organization de la Organization actualizada.
{
"app": null,
"createdAt": "2020-01-01T14:05:55.471155Z",
"description": "Other Organization",
"devicesCount": 0,
"favicon": null,
"id": "435ab418805c32fa400f",
"isActive": true,
"label": "my-second-customer",
"limits": [
{
"actual_value": 0,
"icon": "hdd-o",
"max_value": "*",
"name": "Devices",
"type": "devices"
},
{
"actual_value": 0,
"icon": "envelope",
"max_value": "*",
"name": "Emails",
"type": "emails"
},
{
"actual_value": 0,
"icon": "signal",
"max_value": "*",
"name": "Variables",
"type": "variables"
},
{
"actual_value": 0,
"icon": "users",
"max_value": "*",
"name": "Users",
"type": "users"
},
{
"actual_value": 0,
"icon": "spinner",
"max_value": "*",
"name": "Dots",
"type": "dots"
},
{
"actual_value": 0,
"icon": "mobile-phone",
"max_value": "*",
"name": "SMS",
"type": "sms"
},
{
"actual_value": 0,
"icon": null,
"max_value": "*",
"name": "Voice",
"type": "voice"
}
],
"logo": null,
"name": "My Best Customer",
"properties": {"any": "thing"},
"url":"https://api.netux.com/api/v2.0/organizations/435ab418805c32fa400f",
"usersCount": 0
}
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}