Service-api micro service
Grants access token using password grant type
See https://tools.ietf.org/html/rfc6749#section-2.3.1
-
URL
/oauth/token
-
Method:
POST
-
URL Params
None
-
Data Params
grant_type="password"[string]
username=[string]
password=[string]
must be sent using
x-www-form-urlencoded
-
Headers
Authorization=Basic {client_id:client_secret encoded in base64}
example:
Authorization=Basic c2VydmljZTpzZXJ2aWNlXzEyMzQ=
-
Success Response:
Code: 200
Content:
{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwcy8vYXBpLnNlcnZpY2UuamlsbGl4LmNvbSIsInN1YiI6Imh0dHA6Ly9zZXJ2aWNlLmppbGxpeC5jb20vc2VydmljZVVzZXIiLCJpYXQiOjE0NjUzODI3MDk4NDcsImV4cCI6MTQ2NTM4NjMwOTg0N30.AbE1UGgikCDyqkNuQZ_2Fe0nBX21BfrPguec2KECqkk", "token_type": "bearer", "expires_in": 3600, "scope": [ "service_app" ] }
-
Error Response:
Code: {HTTP_STATUS_CODE}
Content:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Creates a new user
-
URL
/users
-
Method:
POST
-
URL Params
none
-
Data Params
username=[string]
email=[string]
password=[string]
confirmPassword=[string]
-
Success Response:
Code: 201
Content: JSON-LD document containing the created user
-
Error Response:
Code: {HTTP_STATUS_CODE}
Content:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Returns user in JSON-LD form
-
URL
/users/:username
-
Method:
GET
-
URL Params
username=[string]
- the username of the user that will be returned -
Data Params
none
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing the user
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Updates core properties of a user
-
URL
/users/:username
-
Method:
PATCH
-
URL Params
username=[string]
- the username of the user that will be updated -
Data Params
givenName=[string]
familyName=[string]
address=[string]
website=[string]
worksFor=[string]
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing the updated user
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Assigns email address to user
-
URL
/users/:username/emails
-
Method:
POST
-
URL Params
username=[string]
- the username of the user that will be updated -
Data Params
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 201
Content: The added email address
{ "email": "...", "active": false, "primary": false }
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Updates user password field
-
URL
/users/:username/password
-
Method:
PATCH
-
URL Params
username=[string]
- the username of the user that will be updated -
Data Params
oldPassword=[string]
newPassword=[string]
confirmPassword=[string]
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 204
Content: None
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Updates email fields of a user
-
URL
/users/:username/emails/:emailId
-
Method:
PATCH
-
URL Params
username=[string]
- the username of the user that will be updatedemailId=[string]
- the id of the email that will be updated -
Data Params
active=[Boolean]
primary=[Boolean]
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 204
Content: None
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Deletes user account
-
URL
/users/:username
-
Method:
DELETE
-
URL Params
username=[string]
- the username of the user that will be updated -
Data Params
password=[string]
- the password of the user that will be deleted -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 204
Content: None
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Creates a new project
-
URL
/users/:username/projects
-
Method:
POST
-
URL Params
username=[string]
- The username of the project owner -
Data Params
name=[string]
- The name of the new project -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 201
Content: JSON-LD document containing the created project
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Returns project in JSON-LD form
-
URL
/users/:username/projects/:projectSlug
-
Method:
GET
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project name -
Data Params
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content:
{ }
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Returns user projects in JSON-LD form
-
URL
/users/:username/projects
-
Method:
GET
-
URL Params
username=[string]
- the username of the project owner -
Data Params
None
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing user projects
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Updates project core properties
-
URL
/users/:username/projects/:projectSlug
-
Method:
PATCH
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project name -
Data Params
name=[string]
- The name of the projectactive=[string]
- The status of the project -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing the updated project
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Grants read, write or owner access rights to a user
-
URL
/users/:username/projects/:projectSlug/access
-
Method:
POST
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project name -
Data Params
role=[string]
- the access right that the user will receiveuser=[string]
- the id of the user that will receive the access rights -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 204
Content: None
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Returns all users that have access rights to a project
-
URL
/users/:username/projects/:projectSlug/access?role=:role
-
Method:
GET
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project namerole=[string]
- optional filtering param. Returns only users with the specified role -
Data Params
None
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing users with access rights
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Deletes project
-
URL
/users/:username/projects/:projectSlug
-
Method:
DELETE
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project name -
Data Params
name=[string]
- the name of the project that will be deleted -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 204
Content: None
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Creates a new app
-
URL
/users/:username/projects/:projectSlug/apps
-
Method:
POST
-
URL Params
username=[string]
- The username of the project ownerprojectSlug=[string]
- the slug created from the project name -
Data Params
name=[string]
- The name of the new app -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 201
Content: JSON-LD document containing the created app
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Returns app in JSON-LD form
-
URL
/users/:username/projects/:projectSlug/apps/:appSlug
-
Method:
GET
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project nameappSlug=[string]
- the slug created from the app name -
Data Params
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containg app data
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Returns all apps from a project that the user has access to
-
URL
/users/:username/projects/:projectSlug/apps
-
Method:
GET
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project name -
Data Params
None
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing user apps
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Returns all the apps a user has access to
-
URL
/users/:username/apps
-
Method:
GET
-
URL Params
username=[string]
- the username of the app owner -
Data Params
None
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing user apps
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Updates app core properties
-
URL
/users/:username/projects/:projectSlug/apps/:appSlug
-
Method:
PATCH
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project nameappSlug=[string]
- the slug created from the app name -
Data Params
name=[string]
- The name of the app -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing the updated app
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Grants read, write or owner access rights to a user
-
URL
/users/:username/projects/:projectSlug/apps/:appSlug/access
-
Method:
POST
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project nameappSlug=[string]
- the slug created from the app name -
Data Params
role=[string]
- the access right that the user will receiveuser=[string]
- the id of the user that will receive the access rights -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 204
Content: None
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Returns all users that have access rights to am app
-
URL
/users/:username/projects/:projectSlug/apps/:appSlug/access
-
Method:
GET
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project nameappSlug=[string]
- the slug created from the app namerole=[string]
- optional filtering param. Returns only users with the specified role -
Data Params
None
-
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 200
Content: JSON-LD document containing users with access rights
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }
Deletes app
-
URL
/users/:username/projects/:projectSlug/apps/:appSlug
-
Method:
DELETE
-
URL Params
username=[string]
- the username of the project ownerprojectSlug=[string]
- the slug created from the project nameappSlug=[string]
- the slug created from the app name -
Data Params
name=[string]
- the name of the app that will be deleted -
Headers
Authorization=Bearer {token provided by the oauth2 endpoint}
example:
Authorization=Bearer eyJhbGci...X21BfrPguec2KECqkk
-
Success Response:
Code: 204
Content: None
-
Error Response:
Code: {HTTP_STATUS_CODE}
400
- if the data provided is inccorect401
- if the access token is not valid403
if the user using this api does not have access to this resource404
if the resource does not existContent:
{ "code": {HTTP_STATUS_CODE}, "message": {ERROR_MESSAGE}, "name": {ERROR_TYPE} }