Project Management

Projects

Project management in Carriots.

Create

Create a project

URL: http://api.carriots.com/projects/
HTTP method: POST

Attributes:

Attribute Description
name (mandatory) Text. 50 characters max.
Unique.
Project name.
Example: p0001
id_customer (mandatory) Text.
Projects client ID.
Example: @carriots
description (optional) Text. 200 characters max.
Project description.
Example: Parking control
enabled (mandatory) Boolean. Valid values: 0, 1, true or false.
Project enabled, default true.
Example: true

Response codes

Code Description
200 Operation successfull
Possible values:
- code:2001 messsage: project persisted details:
400 Request not valid
Possible values:
- code:4001 messsage: Json bad formed details: - code:4003 messsage: validation error details: {field: error message,...}
404 Resource not found
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

POST http://api.carriots.com/projects/

Response example:

Show

Show a project

URL: http://api.carriots.com/projects/-- ID_developer --/
HTTP method: GET
Response: json/xml

Response codes

Code Description
200 Operation successfull
Possible values:
- Project JSON object
400 Request not valid
Possible values:
- code:4004 messsage: format parameter invalid details: {field: error message,...}
404 Resource not found
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

GET http://api.carriots.com/projects/defaultProject@aesaes/

Response example:

List

Project list, max 1000

URL: http://api.carriots.com/projects/
HTTP method: GET
Response: json/xml

Parameters:

Attribute Description
name (optional) Text. 50 characters max.
Filter list result by field name.
Example: p0001
id_developer (optional) Text. 50 characters max.
Filter list result by field id_developer.
Example: p0001@carriots
enabled (optional) Boolean. Valid values: 0, 1, true or false.
Filter list result by field enabled.
Example: true
owner (optional) username.
Filter list result by field owner.
Example: jlopez
updater (optional) username.
Filter list result by field updater.
Example: jlopez
created_at (optional) Timestamp.
Filter list result by field created_at.
Example: 1337009328
to and from modificators allows to specify a range. Extreme values are included.
Example: created_at=1337009328
max (optional) Integer. Values between 1 and 1000.
Defines the number of results to be returned. Max and default value is 1000.
Example: 250
sort (optional) Field name.
Sort the result by the given field. Default value is name.
Example: creation_date
order (optional) Integer. Valid values: -1 or 1
Result order criteria: -1 for descending and 1 for ascending.
Example: -1
offset (optional) Integer.
Result offset. List will begin at the given offset.
Example: 100

Response codes

Code Description
200 Operation successfull
Possible values:
-total_documents result numbers result: Project JSON object set
400 Request not valid
Possible values:
- code:4004 messsage: format parameter invalid details: {field: error message,...}
503 Project Management Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

GET http://api.carriots.com/projects/

Response example:

Update

Update a project

URL: http://api.carriots.com/projects/-- ID_developer --/
HTTP method: PUT

Response codes

Code Description
200 Operation successfull
Possible values:
- code 2005 message: project updated details: Project JSON object
400 Request not valid
Possible values:
- code:4001 messsage: nonexistent file details:
- code:4003 messsage: validation error details: {field: error message,...}
- code:4004 messsage: format parameter invalid details: {field: error message,...}
- code:4005 messsage: concurrency error details: {version: }
404 Resource not found
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

PUT http://api.carriots.com/projects/defaultProject@aesaes/

Response example:

Delete

Delete a project

URL: http://api.carriots.com/projects/-- ID_developer --/
HTTP method: DELETE

Response codes

Code Description
200 Operation successfull
Possible values:
- code 2004 message: project deleted details:
404 Resource not found
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

DELETE http://api.carriots.com/projects/defaultProject@aesaes/

Response example:

Show Service

Show a service from a project

URL: http://api.carriots.com/projects/--ID_project--/services/--ID_service--/
HTTP method: GET
Response: json/xml

Request example:

http://api.carriots.com/projects/defaultProject@aesaes/services/defaultService@aesaes/

Response example:

List Service

List of services from a project, max 1000.

URL: http://api.carriots.com/projects/--ID_project--/services/
HTTP method: GET
Response: json/xml

Request example:

GET http://api.carriots.com/projects/defaultProject@aesaes/services/

Response example:

Services

Service management in Carriots.

Create

Create a service

URL: http://api.carriots.com/services/
HTTP method: POST

Attributes:

Attribute Description
name (mandatory) Text. 50 characters max.
Unique.
Service name.
Example: s001
id_project (mandatory) Text.
Project identifier
Example: p0001@carriots
description (optional) Text. 200 characters max.
Service description.
Example: Traffic control for parking service
enabled (mandatory) Boolean. Valid values: 0, 1, true or false.
Filter list result by field enabled.
Example: true

Response codes

Code Description
200 Operation successfull
Possible values:
- code 2001 message: service persisted details:
400 Request not valid
Possible values:
- code: 4001 message: Json bad formed details:
- code: 4003 message: validation error details: {field: error message,...}
404 Resource not found
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

POST http://api.carriots.com/services/

Response example:

Show

Service data

URL: http://api.carriots.com/services/-- ID_developer --/
HTTP method: GET
Response: json/xml

Response codes

Code Description
200 Operation successfull
Possible values:
- Device JSON object
400 Request not valid
Possible values:
- code: 4004 message: format parameter invalid details: {field: error message,...}
404 Resource not found
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

GET http://api.carriots.com/services/TestService@CustomTest/

Response example:

List

Service list, max. 1000

URL: http://api.carriots.com/services/
HTTP method: GET
Response: json/xml

Parameters:

Attribute Description
name (optional) Text. 50 characters max.
Filter list result by field name.
Example: s0001
id_developer (optional) Text.
Filter list result by field id_developer.
Example: s0001@carriots
enabled (optional) Boolean. Valid values: 0, 1, true or false.
Filter list result by field enabled.
Example: true
owner (optional) username.
Filter list result by field owner.
Example: jlopez
updater (optional) username.
Filter list result by field updater.
Example: jlopez
created_at (optional) Timestamp.
Filter list result by field created_at.
Example: 1337009328
to and from modificators allows to specify a range. Extreme values are included.
Example: created_at=1337009328
max (optional) Integer. Values between 1 and 1000.
Defines the number of results to be returned. Max and default value is 1000.
Example: 250
sort (optional) Field name.
Sort the result by the given field. Default value is name.
Example: creation_date
order (optional) Integer. Valid values: -1 or 1
Result order criteria: -1 for descending and 1 for ascending.
Example: -1
offset (optional) Integer.
Result offset. List will begin at the given offset.
Example: 100

Response codes

Code Description
200 Operation successfull
Possible values:
- total_documents: result numbersresult: Service JSON object set
400 Request not valid
Possible values:
- code: 4004 message: format parameter invalid details: {field: error message,...}
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

GET http://api.carriots.com/services/

Response example:

Update

Update service

URL: http://api.carriots.com/services/-- ID_developer --/
HTTP method: PUT

Response codes

Code Description
200 Operation successfull
Possible values:
- code: 2005 message: service updated details: Service JSON object
400 Request not valid
Possible values:
- code: 4001 message: nonexistent file details:
- code: 4003 message: validation error details: {field: error message,...}
- code: 4004 message: format parameter invalid details: {field: error message,...}
- code: 4005 message: concurrency error details: {version:}
404 Resource not found
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

PUT http://api.carriots.com/services/defaultService@aesaes/

Response example:

Delete

Delete a service

URL: http://api.carriots.com/services/-- ID_developer --/
HTTP method: DELETE

Response codes

Code Description
200 Operation successfull
Possible values:
- code: 2004 message: service deleted details:
404 Resource not found
503 Service unavailable.
- code: 5031 message: BD error details:
- code: 5032 message: exception details: {message: }

Request example:

DELETE http://api.carriots.com/services/TestService@CustomTest/

Response example:

Show Group

Show a group from a service

URL: http://api.carriots.com/services/--ID_service--/groups/--ID_group--/
HTTP method: GET
Response: json/xml

Request example:

GET http://api.carriots.com/services/defaultService@Example_User/groups/defaultGroup@Example_User/

Response example:

List Group

Group list from a service, max 1000

URL: http://api.carriots.com/services/--ID_service--/groups/
HTTP method: GET
Response: json/xml

Request example:

GET http://api.carriots.com/services/defaultService@miuser1/groups/

Response example: