Groups Collection

API methods to work with Groups

Group is an entity to combine your properties together to make management easier. You can combine properties to one or many groups.

A Property must be a member of a group, you cannot remove from a group unless it is a member of another group

Groups List

Retrieve list of Groups associated with user.

Request:

GET https://staging.channex.io/api/v1/groups

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Group objects in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Get Group by ID

Retrieve specific Group associated with User by ID.

Request:

GET https://staging.channex.io/api/v1/groups/:id

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Group object in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Property.

Not Found Error Method can return a Not Found Error result with 404 Not Found HTTP Code if Group with provided ID is not present at system.

Create Group

Create a new Group.

Request:

POST https://staging.channex.io/api/v1/groups

Query body (JSON):

{
  "group": {
    "title": "South London Group"
  }
}

Fields

title [required]

Any non-empty string with maximum length of 255 symbols. Note: The Group will be represented in the system under that title.

Returns

Success Method can return a Success result with 201 Created HTTP Code if operation is successful. Will contain a Group object in the answer.

Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Validation Error Method can return a Validation Error result with 422 Unprocessable Entity HTTP Code if any validation rule is failed.

Update Group

Update a Group.

Request:

PUT https://staging.channex.io/api/v1/groups/:id

Query body (JSON):

{
  "group": {
    "title": "North London Group"
  }
}

Fields

title [required]

Any non-empty string with maximum length of 255 symbols. Note: The Group will be represented in the system under that title.

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Group object in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Not Found Error Method can return a Not Found Error result with 404 Not Found HTTP Code if Group with provided ID is not present at system.

Validation Error Method can return a Validation Error result with 422 Unprocessable Entity HTTP Code if any validation rule is failed.

Remove Group

Remove a Group.

Request:

DELETE https://staging.channex.io/api/v1/groups/:id

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Meta object with message in the answer. Bad Request Error Method can return a Bad Request Error result with 400 Bad Request HTTP Code if the Group you would like to remove has at least one Property attached.

Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Not Found Error Method can return a Not Found Error result with 404 Not Found HTTP Code if Group with provided ID is not present at system.

Associate Property With Group

Associate a Property with a Group.

Request:

POST https://staging.channex.io/api/v1/groups/:group_id/properties/:property_id

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Meta object with message in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Not Found Error Method can return a Not Found Error result with 404 Not Found HTTP Code if Group or Property with provided ID is not present at system.

Validation Error Method can return a Validation Error result with 422 Unprocessable Entity HTTP Code if Property is already associated with a Group.

Remove Property From Group

Remove a Property from a Group.

Request:

DELETE https://staging.channex.io/api/v1/groups/:group_id/properties/:property_id

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Meta object with message in the answer. Bad Request Error Method can return a Bad Request Error result with 400 Bad Request HTTP Code if the Property you would like to remove from Group not attached to any other Group.

Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Not Found Error Method can return a Not Found Error result with 404 Not Found HTTP Code if Group or Property with provided ID is not present at system.

Last updated