-
Notifications
You must be signed in to change notification settings - Fork 37
Docs
Nazar Lipkovs'kyy edited this page Feb 2, 2017
·
129 revisions
URL | /rest/auth/token |
Method | POST |
URL Params | None |
Data Params |
Required: { "username" : [alphanumeric], "password" : [alphanumeric] }
|
Success Response |
Code: 200 OK Content: { "token" : [string], "refreshToken" : [string] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Credentials are invalid. Please enter valid username and password" }
|
Sample Call | curl -X POST -H "Content-Type: application/json" -d '{"username" : "User", "password" : "password"}' http://localhost:8080/rest/auth/token |
URL | /rest/auth/token |
Method | PUT |
URL Params | None |
Data Params |
Required: { "expiredToken" : [string], "refreshToken" : [string] }
|
Success Response |
Code: 200 OK Content: { "refreshedToken" : [string] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Refresh or expired access token is invalid. Please enter valid tokens" }
|
Sample Call | curl -X PUT -H "Content-Type: application/json" -d '{"expiredToken":"eyJhbG ciOiJIUzUxMiJ9.eyJzdWIiOiJBZG1pbiIsImNyZWF0ZWQiOjE0ODE2MzkxOTMxNjUsImV4cCI6M TQ4MTY0Mjc5M30.snx5TnaJ3baoKOwhDCBl8YKYCRCIvasDbSqsI8qHyrDkFjNu7lzIwlH9gUavx NfP3xmelZM6OC2HxomHaUvQ", "refreshToken":"eyJhbGciOiJIUzUxMiJ9.eyzdWIiOiJBZG 1pbiIsImNyZWF0ZWQiOjE0ODE2MzkxOTM0MjIsImV4cCI6MTQ4MTcyNTU5M30.2y6jkpg9hqFaHo DJ7eU4LCbRWjXENRPfGZtV0N3SKU1RBwSH5bujq2Fnq9jFOxvVbJETeGs7VGL9QqjpAnXkZ"}' http://localhost:8080/rest/auth/token |
URL | /rest/repository/users |
Method | POST |
URL Params | None |
Data Params |
Required: { "username" : [alphanumeric], "password" : [alphanumeric], "firstname" : [string], "surname" : [string], "email" : [email]} Optional: "active" : [boolean], "blocked" : [boolean]
|
Success Response |
Code: 201 CREATED Content: { "id": [long], "username" : [alphanumeric], "password" : [alphanumeric], "salt" : [alphanumeric], "firstname" : [string], "surname" : [string], "email" : [email], "active" : [boolean], created : [timestamp], "blocked" : [boolean] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 409 CONFLICT Content: { "message": ""User with this username or email already exists" } OR Code: 400 BAD REQUEST Content: { "errors" : [{"defaultMessage": "User username cannot be empty"}] } OR Code: 400 BAD REQUEST Content: { "errors" : [{"defaultMessage": "User password cannot be empty"}] } OR Code: 400 BAD REQUEST Content: { "errors" : [{"defaultMessage": "User firstname cannot be empty"}] } OR Code: 400 BAD REQUEST Content: { "message" : " "errors" : [{"defaultMessage": "User surname cannot be empty"}] " } OR Code: 400 BAD REQUEST Content: { "message" : " "errors" : [{"defaultMessage": "User email cannot be empty"}] " } OR Code: 400 BAD REQUEST Content: { "message" : " "errors" : [{"defaultMessage": "User email has invalid format"}] " }
|
Sample Call | curl -X POST -H "Content-Type: application/json" -d '{ "username" : "Old Johnny", "password" : "john123456", "firstname" : "John", "surname" : "Forrester", "email" : "[email protected]", "active" : true, "blocked" : false }' http://localhost:8080/rest/repository/users |
URL | /rest/repository/users/:id |
Method | PUT |
URL Params |
Required:
|
Data Params |
Required: { "username" : [alphanumeric], "password" : [alphanumeric], "salt" : [alphanumeric], "firstname" : [string], "surname" : [string], "email" : [email], "active" : [boolean], "blocked" : [boolean]
|
Success Response |
Code: 200 OK Content: { "id": [long], "username" : [alphanumeric], "salt" : [alphanumeric], "firstname" : [string], "surname" : [string], "email" : [email], "active" : [boolean], created : [timestamp], "blocked" : [boolean] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 404 NOT FOUND Content: { "message": "User with id = [long] was not found" } OR Code: 409 CONFLICT Content: { "message": ""User with this username already exists" } OR Code: 409 CONFLICT Content: { "message": ""User with this email already exists" } OR Code: 400 BAD REQUEST Content: { "errors" : [{"defaultMessage": "User username cannot be empty"}] } OR Code: 400 BAD REQUEST Content: { "errors" : [{"defaultMessage": "User password cannot be empty"}] } OR Code: 400 BAD REQUEST Content: { "errors" : [{"defaultMessage": "User firstname cannot be empty"}] } OR Code: 400 BAD REQUEST Content: { "message" : " "errors" : [{"defaultMessage": "User surname cannot be empty"}] " } OR Code: 400 BAD REQUEST Content: { "message" : " "errors" : [{"defaultMessage": "User email cannot be empty"}] " } OR Code: 400 BAD REQUEST Content: { "message" : " "errors" : [{"defaultMessage": "User email has invalid format"}] " }
|
Sample Call | curl -X PUT -H "Content-Type: application/json" -d '{ "username" : "Old Johnny", "password" : "john123456", "firstname" : "John", "surname" : "Forrester", "email" : "[email protected]", "active" : true, "blocked" : false }' http://localhost:8080/rest/repository/users/1 |
URL | /rest/repository/users/:id |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "id": [long], "username" : [alphanumeric], "salt": [alphanumeric], "firstname" : [string], "surname" : [string], "email" : [email], "active" : [boolean], "created": [timestamp], "blocked" : [boolean] }
|
Error Response |
Code: 404 NOT FOUND Content: { "message": "User with id = [long] was not found" } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/users/1 |
URL | /rest/repository/users |
Method | GET |
URL Params | None |
Data Params | None |
Success Response |
Code: 200 OK Content: [{ "id": [long], "username" : [alphanumeric], "salt": [alphanumeric], "firstname" : [string], "surname" : [string], "email" : [email], "active" : [boolean], "created": [timestamp], "blocked" : [boolean] },...]
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/users |
URL | /rest/repository/users/:id |
Method | DELETE |
URL Params |
Required:
|
Data Params | None |
Success Response | Code: 204 NO CONTENT |
Error Response |
Code: 404 NOT FOUND Content: { "message": "User with id = [long] was not found" } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl -X DELETE http://localhost:8080/rest/repository/users/1 |
URL | /rest/repository/roles |
Method | POST |
URL Params | None |
Data Params |
Required: { "name" : [string] }
|
Success Response |
Code: 201 CREATED Content: { "name" : [string] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (name)=[string] already exists." } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Role name can be only uppercase and contain _ symbol" } OR Code: 400 BAD REQUEST Content: { "message" : "Role name cannot be empty" }
|
Sample Call | curl -X POST -H "Content-Type: application/json" -d '{"name" : "NEW_ROLE" }' http://localhost:8080/rest/repository/roles |
URL | /rest/repository/roles/:id |
Method | PUT |
URL Params |
Required:
|
Data Params |
Required: { "name" : [string] }
|
Success Response |
Code: 200 OK Content: { "name" : [string] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (name)=[string] already exists." } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Role name can be only uppercase and contain _ symbol" } OR Code: 400 BAD REQUEST Content: { "message" : "Role name cannot be empty" }
|
Sample Call | curl -X PUT -H "Content-Type: application/json" -d '{"name" : "NEW_ROLE" }' http://localhost:8080/rest/repository/roles/1 |
URL | /rest/repository/roles/:id |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "name" : [string] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/roles/1 |
URL | /rest/repository/roles/search/findByName |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "name" : [string] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/roles/search/findByName?name=someName |
URL | /rest/repository/roles/search/findAll |
Method | GET |
URL Params | None |
Data Params | None |
Success Response |
Code: 200 OK Content: { "_embedded": {"roles": [ { "name": [string] }, ... ] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/roles/search/findAll |
URL | /rest/repository/roles/:id |
Method | DELETE |
URL Params |
Required:
|
Data Params | None |
Success Response | Code: 204 NO CONTENT |
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl -X DELETE http://localhost:8080/rest/repository/roles/1 |
URL | /rest/repository/customers |
Method | POST |
URL Params | None |
Data Params |
Required: { "customerId" : [double], "companyName" : [string], "street" : [string], "street2" : [string], "postcode" : [string], "country" : [string], "city" : [string] } Optional: "vatid" : [double], "parentCustomer" : [URI]
|
Success Response |
Code: 201 CREATED Content: { "customerId" : [double], "companyName" : [string], "street" : [string], "street2" : [string], "postcode" : [string], "country" : [string], "city" : [string], "vatid" : [double] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (customer_id)=[double] already exists." } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "customerId" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "companyName" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "street" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "street2" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "postcode" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "country" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "city" parameter cannot be empty" }
|
Sample Call | curl -X POST -H "Content-Type: application/json" -d '{ "customerId" : 2.0, "companyName" : "newCompany", "street" : "newStreet", "street2" : "newStreet2", "postcode" : "79005", "country" : "Ukraine", "city" : "Lviv", "vatid" : 999.0 }' http://localhost:8080/rest/repository/customers |
URL | /rest/repository/customers/:id |
Method | PUT |
URL Params |
Required:
|
Data Params |
Required: { "customerId" : [double], "companyName" : [string], "street" : [string], "street2" : [string], "postcode" : [string], "country" : [string], "city" : [string]} Optional: "vatid" : [double], "parentCustomer" : [URI]
|
Success Response |
Code: 200 OK Content: { "customerId" : [double], "companyName" : [string], "street" : [string], "street2" : [string], "postcode" : [string], "country" : [string], "city" : [string], "vatid" : [double] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (customer_id)=[double] already exists." } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "customerId" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "companyName" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "street" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "street2" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "postcode" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "country" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer "city" parameter cannot be empty" }
|
Sample Call | curl -X PUT -H "Content-Type: application/json" -d '{ "customerId" : 2.0, "companyName" : "newCompany", "street" : "newStreet", "street2" : "newStreet2", "postcode" : "79005", "country" : "Ukraine", "city" : "Lviv", "vatid" : 999.0 }' http://localhost:8080/rest/repository/customers/1 |
URL | /rest/repository/customers/:id |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "customerId" : [double], "companyName" : [string], "street" : [string], "street2" : [string], "postcode" : [string], "country" : [string], "city" : [string], "vatid" : [double] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/customers/1 |
URL | /rest/repository/customers/search/findByCustomerId |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "customerId" : [double], "companyName" : [string], "street" : [string], "street2" : [string], "postcode" : [string], "country" : [string], "city" : [string], "vatid" : [double] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/customers/search/findByCustomerId?customerId=10.0 |
URL | /rest/repository/customers/search/findAll |
Method | GET |
URL Params | None |
Data Params | None |
Success Response |
Code: 200 OK Content: { "_embedded": {"customers": [ { "customerId" : [double], "companyName" : [string], "street" : [string], "street2" : [string], "postcode" : [string], "country" : [string], "city" : [string], "vatid" : [double] }, ... ] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/customers/search/findAll |
URL | /rest/repository/customers/:id |
Method | DELETE |
URL Params |
Required:
|
Data Params | None |
Success Response | Code: 204 NO CONTENT |
Error Response |
Code: 404 NOT FOUND Content: { "message": "Customer with id = [long] was not found" }
|
Sample Call | curl -X DELETE http://localhost:8080/rest/repository/customers/1 |
URL | /rest/repository/customer-contacts |
Method | POST |
URL Params | None |
Data Params |
Required: { "firstname" : [string], "surname" : [string], "phone" : [string], "mobilePhone" : [string], "fax" : [string], "emailAddress" : [email], "type" : [CEO,TECHNICAL,PRIMARY], "salutation" : [MR,MRS] } Optional: "customer" : [URI]
|
Success Response |
Code: 201 CREATED Content: { "firstname" : [string], "surname" : [string], "phone" : [string], "mobilePhone" : [string], "fax" : [string], "emailAddress" : [email], "type" : [CEO,TECHNICAL,PRIMARY], "salutation" : [MR,MRS] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (email_address)=[string] already exists." } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "firstname" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "surname" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "phone" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "mobilePhone" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "fax" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "emailAddress" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "emailAddress" has invalid format" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "type" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "salutation" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.customer.Salutation from String [string]: value not one of declared Enum instance names: [MR,MRS]" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.customer.Type from String [string]: value not one of declared Enum instance names: [PRIMARY, CEO, TECHNICAL]" }
|
Sample Call | curl -X POST -H "Content-Type: application/json" -d '{ "firstname" : "newName", "surname" : "newSurname", "phone" : "0322222222", "mobilePhone" : "0632222222", "fax" : "new_fake_fax", "emailAddress" : "[email protected]", "type" : "CEO", "salutation" : "MR" }' http://localhost:8080/rest/repository/customer-contacts |
URL | /rest/repository/customer-contacts/:id |
Method | PUT |
URL Params |
Required:
|
Data Params |
Required: { "firstname" : [string], "surname" : [string], "phone" : [string], "mobilePhone" : [string], "fax" : [string], "emailAddress" : [string], "type" : [CEO,TECHNICAL,PRIMARY], "salutation" : [MR,MRS] } Optional: "customer" : [URI]
|
Success Response |
Code: 200 OK Content: { "firstname" : [string], "surname" : [string], "phone" : [string], "mobilePhone" : [string], "fax" : [string], "emailAddress" : [string], "type" : [CEO,TECHNICAL,PRIMARY], "salutation" : [MR,MRS] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (email_address)=[string] already exists." } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "firstname" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "surname" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "phone" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "mobilePhone" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "fax" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "emailAddress" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "emailAddress" has invalid format" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "type" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Customer contact "salutation" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.customer.Salutation from String [string]: value not one of declared Enum instance names: [MR,MRS]" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.customer.Type from String [string]: value not one of declared Enum instance names: [PRIMARY, CEO, TECHNICAL]" }
|
Sample Call | curl -X PUT -H "Content-Type: application/json" -d '{ "firstname" : "newName", "surname" : "newSurname", "phone" : "0322222222", "mobilePhone" : "0632222222", "fax" : "new_fake_fax", "emailAddress" : "[email protected]", "type" : "CEO", "salutation" : "MR" }' http://localhost:8080/rest/repository/customer-contacts/1 |
URL | /rest/repository/customer-contacts/:id |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "firstname" : [string], "surname" : [string], "phone" : [string], "mobilePhone" : [string], "fax" : [string], "emailAddress" : [string], "type" : [CEO,TECHNICAL,PRIMARY], "salutation" : [MR,MRS] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/customer-contacts/1 |
URL | /rest/repository/customer-contacts/search/findByEmailAddress |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "firstname" : [string], "surname" : [string], "phone" : [string], "mobilePhone" : [string], "fax" : [string], "emailAddress" : [string], "type" : [CEO,TECHNICAL,PRIMARY], "salutation" : [MR,MRS] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/customer-contacts/search/[email protected] |
URL | /rest/repository/customer-contacts/search/findAll |
Method | GET |
URL Params | None |
Data Params | None |
Success Response |
Code: 200 OK Content: { "_embedded": {"customer-contacts": [ { "firstname" : [string], "surname" : [string], "phone" : [string], "mobilePhone" : [string], "fax" : [string], "emailAddress" : [string], "type" : [CEO,TECHNICAL,PRIMARY], "salutation" : [MR,MRS] }, ... ] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/customer-contacts/search/findAll |
URL | /rest/repository/customer-contacts/:id |
Method | DELETE |
URL Params |
Required:
|
Data Params | None |
Success Response | Code: 204 NO CONTENT |
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl -X DELETE http://localhost:8080/rest/repository/customer-contacts/1 |
URL | /rest/repository/dashboards |
Method | POST |
URL Params | None |
Data Params |
Required: { "name" : [string], "icon" : [string], "user" : [URI] }
|
Success Response |
Code: 201 CREATED Content: { "name" : [string], "icon" : [string], "user" : [URI] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (name)=[string] already exists." } OR Code: 409 CONFLICT Content: { "message" : "ERROR: null value in column "user_account" violates not-null constraint" } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard "name" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard "icon" parameter cannot be empty" }
|
Sample Call | curl -X POST -H "Content-Type: application/json" -d '{ "name" : "default_admin", "icon" : "admin", "user" : "/rest/repository/users/1" }' http://localhost:8080/rest/repository/dashboards |
URL | /rest/repository/dashboards/:id |
Method | PUT |
URL Params |
Required:
|
Data Params |
Required: { "name" : [string], "icon" : [string], "user" : [URI] }
|
Success Response |
Code: 200 OK Content: { "name" : [string], "icon" : [string], "user" : [URI] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (name)=[string] already exists." } OR Code: 409 CONFLICT Content: { "message" : "ERROR: null value in column "user_account" violates not-null constraint" } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard "name" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard "icon" parameter cannot be empty" }
|
Sample Call | curl -X PUT -H "Content-Type: application/json" -d '{ "name" : "default_admin", "icon" : "admin", "user" : "/rest/repository/users/1" }' http://localhost:8080/rest/repository/dashboards/1 |
URL | GET |
Method | /rest/repository/dashboards/:id |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "name" : [string], "icon" : [string], "user" : [URI] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/dashboards/1 |
URL | GET |
Method | /rest/repository/dashboards/search/findByName |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "name" : [string], "icon" : [string], "user" : [URI] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/dashboards/search/findByName?name=someName |
URL | /rest/repository/dashboards/search/findAll |
Method | GET |
URL Params | None |
Data Params | None |
Success Response |
Code: 200 OK Content: { "_embedded": {"dashboards": [ { "name" : [string], "icon" : [string], "user" : [URI] }, ... ] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/dashboards/search/findAll |
URL | /rest/repository/dashboards/:id |
Method | DELETE |
URL Params |
Required:
|
Data Params | None |
Success Response | Code: 204 NO CONTENT |
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl -X DELETE http://localhost:8080/rest/repository/dashboards/1 |
URL | /rest/repository/dashboard-boxes |
Method | POST |
URL Params | None |
Data Params |
Required: { "name" : [string], "description" : [string], "order" : [integer], "width" : [WIDTH_25,WIDTH_50,WIDTH_75,WIDTH_100], "height" : [HEIGHT_25,HEIGHT_50,HEIGHT_75,HEIGHT_100], "dashboard" : [URI], "dashboardBoxType" : [URI] }
|
Success Response |
Code: 201 CREATED Content: { "name" : [string], "description" : [string], "order" : [integer], "width" : [WIDTH_25,WIDTH_50,WIDTH_75,WIDTH_100], "height" : [HEIGHT_25,HEIGHT_50,HEIGHT_75,HEIGHT_100]" }
|
Error Response |
Code: 409 CONFLICT Content: { "message" : "ERROR: null value in column "dashboard" violates not-null constraint" } OR Code: 409 CONFLICT Content: { "message" : "ERROR: null value in column "dashboard_box_type" violates not-null constraint" } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "order" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "name" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "description" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "width" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "height" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.dashboard.Width from String [string]: value not one of declared Enum instance names: [WIDTH_25,WIDTH_50,WIDTH_75,WIDTH_100]" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.dashboard.Height from String [string]: value not one of declared Enum instance names: [HEIGHT_25,HEIGHT_50,HEIGHT_75,HEIGHT_100]" }
|
Sample Call | curl -X POST -H "Content-Type: application/json" -d '{ "name" : "new dashboardBox", "description" : "new dashboardBox desc", "order" : 50, "width" : "WIDTH_25", "height" : "HEIGHT_25", "dashboard" : "/rest/repository/dashboards/1", "dashboardBoxType" : "/rest/repository/dashboard-box-types/2" }' http://localhost:8080/rest/repository/dashboard-boxes |
URL | /rest/repository/dashboard-boxes/:id |
Method | PUT |
URL Params |
Required:
|
Data Params |
Required: { "name" : [string], "description" : [string], "order" : [integer], "width" : [WIDTH_25,WIDTH_50,WIDTH_75,WIDTH_100], "height" : [HEIGHT_25,HEIGHT_50,HEIGHT_75,HEIGHT_100], "dashboard" : [URI], "dashboardBoxType" : [URI] }
|
Success Response |
Code: 200 OK Content: { "name" : [string], "description" : [string], "order" : [integer], "width" : [WIDTH_25,WIDTH_50,WIDTH_75,WIDTH_100], "height" : [HEIGHT_25,HEIGHT_50,HEIGHT_75,HEIGHT_100] }
|
Error Response |
Code: 409 CONFLICT Content: { "message" : "ERROR: null value in column "dashboard" violates not-null constraint" } OR Code: 409 CONFLICT Content: { "message" : "ERROR: null value in column "dashboard_box_type" violates not-null constraint" } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "order" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "name" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "description" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "width" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box "height" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.dashboard.Width from String [string]: value not one of declared Enum instance names: [WIDTH_25,WIDTH_50,WIDTH_75,WIDTH_100]" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.dashboard.Height from String [string]: value not one of declared Enum instance names: [HEIGHT_25,HEIGHT_50,HEIGHT_75,HEIGHT_100]" }
|
Sample Call | curl -X PUT -H "Content-Type: application/json" -d '{ "name" : "new dashboardBox", "description" : "new dashboardBox desc", "order" : 50, "width" : "WIDTH_25", "height" : "HEIGHT_25", "dashboard" : "/rest/repository/dashboards/1", "dashboardBoxType" : "/rest/repository/dashboard-box-types/2" }' http://localhost:8080/rest/repository/dashboard-boxes/1 |
URL | /rest/repository/dashboard-boxes/:id |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response |
Code: 200 OK Content: { "name" : [string], "description" : [string], "order" : [integer], "width" : [WIDTH_25,WIDTH_50,WIDTH_75,WIDTH_100], "height" : [HEIGHT_25,HEIGHT_50,HEIGHT_75,HEIGHT_100] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/dashboard-boxes/1 |
URL | /rest/repository/dashboard-boxes/search/findAll |
Method | GET |
URL Params | None |
Data Params | None |
Success Response |
Code: 200 OK Content: { "_embedded": {"dashboard-boxes": [ { "name" : [string], "description" : [string], "order" : [integer], "width" : [WIDTH_25,WIDTH_50,WIDTH_75,WIDTH_100], "height" : [HEIGHT_25,HEIGHT_50,HEIGHT_75,HEIGHT_100] }, ... ] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/dashboard-boxes/search/findAll |
URL | /rest/repository/dashboard-boxes/:id |
Method | DELETE |
URL Params |
Required:
|
Data Params | None |
Success Response | Code: 204 NO CONTENT |
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl -X DELETE http://localhost:8080/rest/repository/dashboard-boxes/1 |
URL | /rest/repository/dashboard-box-types |
Method | POST |
URL Params | None |
Data Params |
Required: { "name" : [string], "type" : [STATUS,CHART], "kind" : [PIE_CHART,SERIAL_CHART,LINE_CHART,BAR_CHART,BUBBLE_CHART,FEEDBACK_STATUS,
PROFIT_STATUS,ORDERS_STATUS,USERS_STATUS] }
|
Success Response |
Code: 201 CREATED Content: { "name" : [string], "type" : [STATUS,CHART], "kind" : [PIE_CHART,SERIAL_CHART,LINE_CHART,BAR_CHART,BUBBLE_CHART,FEEDBACK_STATUS,
PROFIT_STATUS,ORDERS_STATUS,USERS_STATUS] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (name)=[string] already exists." } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box type "name" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box type "type" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box type "kind" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.dashboard.Kind from String [string]: value not one of declared Enum instance names: [PIE_CHART, SERIAL_CHART,LINE_CHART,BAR_CHART,BUBBLE_CHART,FEEDBACK_STATUS,PROFIT_STATUS,ORDERS_STATUS,USERS_STATUS]" } OR Code: 400 BAD REQUEST Content: { "message" : "Can not deserialize value of type io.smsc.model.dashboard.Type from String [string]: value not one of declared Enum instance names: [STATUS,CHART]" }
|
Sample Call | curl -X POST -H "Content-Type: application/json" -d '{ "name" : "new dashboard box type", "type" : "CHART", "kind" : "BAR_CHART" }' http://localhost:8080/rest/repository/dashboard-box-types |
URL | /rest/repository/dashboard-box-types/:id |
Method | PUT |
URL Params |
Required:
|
Data Params |
Required: { "name" : [string], "type" : [STATUS,CHART], "kind" : [PIE_CHART,SERIAL_CHART,LINE_CHART,BAR_CHART,BUBBLE_CHART,FEEDBACK_STATUS,
PROFIT_STATUS,ORDERS_STATUS,USERS_STATUS] }
|
Success Response |
Code: 200 OK Content: { "name" : [string], "type" : [STATUS,CHART], "kind" : [PIE_CHART,SERIAL_CHART,LINE_CHART,BAR_CHART,BUBBLE_CHART,FEEDBACK_STATUS,
PROFIT_STATUS,ORDERS_STATUS,USERS_STATUS] }
|
Error Response |
Code: 409 CONFLICT Content: { "message": "ERROR: duplicate key value violates unique constraint. Detail: Key (name)=[string] already exists." } OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box type "name" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box type "type" parameter cannot be empty" } OR Code: 400 BAD REQUEST Content: { "message" : "Dashboard box type "kind" parameter cannot be empty" }
|
Sample Call | curl -X PUT -H "Content-Type: application/json" -d '{ "name" : "new dashboard box type", "type" : "CHART", "kind" : "BAR_CHART" }' http://localhost:8080/rest/repository/dashboard-box-types/1 |
URL | /rest/repository/dashboard-box-types/:id |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response | strong>Code: 200 OK Content: { "name" : [string], "type" : [STATUS,CHART], "kind" : [PIE_CHART,SERIAL_CHART,LINE_CHART,BAR_CHART,BUBBLE_CHART,FEEDBACK_STATUS,
PROFIT_STATUS,ORDERS_STATUS,USERS_STATUS] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/dashboard-box-types/1 |
URL | /rest/repository/dashboard-box-types/search/findByName |
Method | GET |
URL Params |
Required:
|
Data Params | None |
Success Response | strong>Code: 200 OK Content: { "name" : [string], "type" : [STATUS,CHART], "kind" : [PIE_CHART,SERIAL_CHART,LINE_CHART,BAR_CHART,BUBBLE_CHART,FEEDBACK_STATUS,
PROFIT_STATUS,ORDERS_STATUS,USERS_STATUS] }
|
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/dashboard-box-types/search/findByName?name=someName |
URL | /rest/repository/dashboard-box-types/search/findAll |
Method | GET |
URL Params | None |
Data Params | None |
Success Response |
Code: 200 OK Content: { "_embedded": {"dashboard-box-types": [ { "name" : [string], "type" : [STATUS,CHART], "kind" : [PIE_CHART,SERIAL_CHART,LINE_CHART,BAR_CHART,BUBBLE_CHART,FEEDBACK_STATUS,
PROFIT_STATUS,ORDERS_STATUS,USERS_STATUS] }, ... ] }
|
Error Response |
Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl http://localhost:8080/rest/repository/dashboard-box-types/search/findAll |
URL | /rest/repository/dashboard-box-types/:id |
Method | DELETE |
URL Params |
Required:
|
Data Params | None |
Success Response | Code: 204 NO CONTENT |
Error Response |
Code: 404 NOT FOUND OR Code: 401 UNAUTHORIZED Content: { "message": "Unauthorized or token is expired. Please login with valid credentials" }
|
Sample Call | curl -X DELETE http://localhost:8080/rest/repository/dashboard-box-types/1 |