{"_id":"582789abbe5c080f00a5a844","version":{"_id":"582789aabe5c080f00a5a7fe","__v":10,"project":"568bdc1483d2061900d86cdc","createdAt":"2016-11-12T21:29:14.915Z","releaseDate":"2016-11-12T21:29:14.915Z","categories":["582789abbe5c080f00a5a7ff","582789abbe5c080f00a5a800","582789abbe5c080f00a5a801","582789abbe5c080f00a5a802","582789abbe5c080f00a5a803","582789abbe5c080f00a5a804","582789abbe5c080f00a5a805","582789abbe5c080f00a5a806","582789abbe5c080f00a5a807","582789abbe5c080f00a5a808","5827ea984ca29e0f00137a9e","583df597887db62f00644283","583df5d9c622791900e78da5","5845cd8763c11b250037967d","5845d13063c11b2500379681","5859e859e3306d1900126725","587aeb9a01cf3a0f008359eb","587c422af45e2d0f005e200d","587d84dc82f6f30f004ceee5"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"beta2","version_clean":"0.0.0","version":"0"},"category":{"_id":"582789abbe5c080f00a5a804","__v":0,"project":"568bdc1483d2061900d86cdc","version":"582789aabe5c080f00a5a7fe","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-05-17T20:30:25.315Z","from_sync":false,"order":16,"slug":"zones","title":"Zones"},"project":"568bdc1483d2061900d86cdc","__v":1,"parentDoc":null,"user":"573b7f42fdc9d320001b777d","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-18T02:23:45.408Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"572c39957c8eff0e00aaa18b","examples":{"codes":[{"language":"http","code":"POST https://ioe.droplit.io/api/zones HTTP/1.1\nauthorization: AUTH_TOKEN\ncontent-type: application/json\n\n{\n  \"environmentId\": \"E573bbdfa6b921a740e843bf0\",\n  \"meta\": {\n    \"$label\": \"All of my things\"\n  },\n  \"alias\": \"zone1\",\n  \"items\": [\n    \"D573bca48fcb221c01692d7e7\"\n  ]\n}"}]},"method":"post","results":{"codes":[{"status":201,"language":"json","code":"{\n  \"id\": \"Z573bd060ae9ac9419f028b63\",\n  \"environmentId\": \"E573bb9ffd717111220812c3a\",\n  \"ecosystemId\": \"C573b86eeee43dd7ba0244f8a\",\n  \"alias\": \"zone1\",\n  \"meta\": {\n    \"$label\": \"All of my things\"\n  },\n  \"createdAt\": \"2016-05-18T02:14:34.266Z\"\n}","name":""},{"status":400,"language":"json","code":"{\n  \"errorType\": \"InvalidParams\",\n  \"errors\": [\n    {\n      \"in\": \"body\",\n      \"message\": \"invalid environment id\",\n      \"path\": \"environmentId\"\n    }\n  ]\n}","name":""},{"code":"","status":401,"language":"text"},{"status":403,"language":"text","code":""},{"language":"text","code":"Environment with id E573bb9ffd717111220812c3b does not exist.","status":404}]},"auth":"required","params":[{"_id":"573bd337fd7f2e3400cf8b1d","ref":"","in":"body","required":true,"desc":"parent [environment](doc:environments) id or [alias](doc:aliases)","default":"","type":"string","name":"environmentId"},{"_id":"573bd337fd7f2e3400cf8b1c","ref":"","in":"body","required":false,"desc":"[metadata](doc:metadata) attached to the [zone](doc:zones)","default":"","type":"object","name":"meta"},{"_id":"573bd337fd7f2e3400cf8b1b","ref":"","in":"body","required":false,"desc":"an [alias](doc:aliases) for the [zone](doc:zones)","default":"","type":"string","name":"alias"},{"_id":"573bd337fd7f2e3400cf8b1a","ref":"","in":"body","required":false,"desc":"item ids to add under the [zone](doc:zones)","default":"","type":"array_string","name":"items"},{"_id":"58464a2bc42d272300def6f7","ref":"","in":"header","required":false,"desc":"[metadata](doc:metadata) prefix","default":"$","type":"string","name":"x-system-meta-prefix"}],"url":"/zones"},"isReference":true,"order":1,"body":"You can use this endpoint to create a zone in an environment.\n\nAlso, you can specify items as an array of ID's to be listed in the zone.","excerpt":"Create a new zone","slug":"create-zones","type":"endpoint","title":"Create"}

postCreate

Create a new zone

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

environmentId:
required
string
parent [environment](doc:environments) id or [alias](doc:aliases)
meta:
object
[metadata](doc:metadata) attached to the [zone](doc:zones)
alias:
string
an [alias](doc:aliases) for the [zone](doc:zones)
items:
array of strings
item ids to add under the [zone](doc:zones)

Headers

x-system-meta-prefix:
string$
[metadata](doc:metadata) prefix

Examples


Result Format


Documentation

You can use this endpoint to create a zone in an environment. Also, you can specify items as an array of ID's to be listed in the zone.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}