Add New Group API
Require Authentication
This API is used to create new group within specific zone for the company based on combination of deviceID and token.
URL
api/projects/addgroup/:projectID
Required parameter (in URL)
- :projectID «contains project ID. Value must exist in database. It must be put in the URL, e.g: api/projects/addgroup/1. To get available projectID, please visit Get Available Zones»
Required parameter (POST)
- deviceID
- token
- groupName
Optional parameter
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2",
"groupName": "Test Group API"
}
Possible return HTTP status code
- 201
- 400
- 401
- 405
Return message, contains newly created pin project
{
"status": "success",
"message": {
"projectgroupID": 3,
"projectID": 1,
"companyID": 1,
"groupName": "Test Group API",
"createdDate": 1462732975,
"updatedDate": 1462732975,
"createdBy": 3,
"updatedBy": 3
}
}