Create a zone item.

Details

Create a zone item.

Items may be devices, or other nested zones.

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

Parameters

path

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

Responses

201

{
    "itemId": "ZONE-ITEM-ID"
}

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.
  • 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.

404

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

Examples

HTTP

POST https://ioe.droplit.io/api/zones/ZONE-ID/items/ITEM-ID HTTP/1.1
authorization: TOKEN

Droplit Console

droplit zone add-item ZONE-ID ITEM-ID

Droplit SDK

droplit.zones.addItem("ZONE-ID", "ITEM-ID");
Language
Authorization
Header
Click Try It! to start a request and see the response here!