Update a zone.

Details

Update a zone.

An account token, server token, or user token may be used to run this endpoint.

Parameters

path

  • id (required): The ID of a zone.

body

  • meta (optional): The metadata associated with the zone.
  • alias (optional): The alias associated with the zone.
  • items (optional): The array of zone and device IDs that are contained inside the given zone.

header

  • x-system-metadata-prefix (optional): A customized metadata prefix. The default is “$.”

Responses

200

  • No content returned, only the status code. See the REST API “Standard Responses” page.

400

  • Zone Invalid: The standard error structure defines this error as invalid parameters. In this context, it means that the ID given for a zone was not valid.
  • No Query String Allowed: The standard error structure defines this error as invalid parameters, with additional parameters in the query string. In this context, it means that no query string is allowed at all when calling this endpoint.
  • Metadata Format Invalid: The standard error structure defines this error as invalid parameters. In this context, it means that metadata, when specified, should have been formatted as a valid JSON object, and it was not formatted that way.
  • Alias Invalid: The standard error structure defines this error as invalid parameters. The error means that an alias given for an object is not valid. However, this invalid alias does not necessarily mean that any other object references are invalid. This error refers only to the alias itself.
  • Alias Exists: The standard error structure defines this error as an invalid body. The error means that an object with the same alias already exists. The best way to avoid this error is to make sure all aliases are unique strings, regardless of where they are accessed from.

404

  • Zone Not Found: This error means that a zone with the given ID was not found, although it existed at some point.

Examples

HTTP

PUT https://ioe.droplit.io/api/zones/ZONE-ID HTTP/1.1
authorization: TOKEN
content-type: application/json
{
    "meta": {}
}

Droplit Console

droplit zone update ZONE-ID PROPERTY-NAME PROPERTY-VALUE

Droplit SDK

droplit.zones.update("ZONE-ID", { "PROPERTY-NAME" : "PROPERTY-VALUE", ... });
Language
Authorization
Header
Click Try It! to start a request and see the response here!