Open App

Zones

API endpoints for zones

List zones

GET /api/v1/zones

Parameters

NameInTypeRequiredDescription
organisationIdquerystringNo
containerIdquerystringNo
statusqueryNo
limitqueryintegerNo
cursorquerystringNoOpaque continuation token from a previous list response's nextCursor.

Example request

curl -X GET \
"https://api.example.com/api/v1/zones?organisationId=<organisationId>&containerId=<containerId>&status=<status>&limit=<limit>&cursor=<cursor>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "_id": "string",
      "name": "string",
      "status": "backlog",
      "description": "string",
      "doDate": 0,
      "endDate": 0,
      "dueDate": 0,
      "containerId": "string",
      "userId": "string",
      "organisationId": "string",
      "createdAt": 0,
      "updatedAt": 0
    }
  ],
  "nextCursor": "string"
}

Other statuses: 401.

Response body type

{ data: Zone[]; nextCursor: string }


Create zone

POST /api/v1/zones

Example request

curl -X POST \
"https://api.example.com/api/v1/zones" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","status":"backlog","description":"string","doDate":0,"endDate":0,"dueDate":0,"organisationId":"string","containerId":"string"}'

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "status": "backlog",
    "description": "string",
    "doDate": 0,
    "endDate": 0,
    "dueDate": 0,
    "containerId": "string",
    "userId": "string",
    "organisationId": "string",
    "createdAt": 0,
    "updatedAt": 0
  }
}

Other statuses: 400, 401.

Response body type

{ data: Zone }


Get zone by id

GET /api/v1/zones/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X GET \
"https://api.example.com/api/v1/zones/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "status": "backlog",
    "description": "string",
    "doDate": 0,
    "endDate": 0,
    "dueDate": 0,
    "containerId": "string",
    "userId": "string",
    "organisationId": "string",
    "createdAt": 0,
    "updatedAt": 0
  }
}

Other statuses: 401, 404.

Response body type

{ data: Zone }


Update zone

PATCH /api/v1/zones/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X PATCH \
"https://api.example.com/api/v1/zones/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","status":"backlog","description":"string","doDate":0,"endDate":0,"dueDate":0}'

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "status": "backlog",
    "description": "string",
    "doDate": 0,
    "endDate": 0,
    "dueDate": 0,
    "containerId": "string",
    "userId": "string",
    "organisationId": "string",
    "createdAt": 0,
    "updatedAt": 0
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: Zone }


Delete zone

DELETE /api/v1/zones/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X DELETE \
"https://api.example.com/api/v1/zones/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Other statuses: 401, 403, 404.

Response body type