Skip to content

Instantly share code, notes, and snippets.

@torabian
Created April 14, 2020 22:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save torabian/8285a30117fdc13442a211f3f951b08a to your computer and use it in GitHub Desktop.
API reference. (Auto genreated by cypress, do not change this document)
## Create a role definitions for team
**URL:** [post] /api/role
### Description:
## Headers (sample)
```
{
"x-token": "your_access_key_token_after_signin_or_signup",
"x-team": 1
}
```
## Request body (sample)
```
{
"title": "TEAM_MANAGER",
"permissions": [
"CREATE_TEAM",
"DELETE_TEAM",
"EDIT_TEAM",
"INVITE_TEAM_MEMBER"
]
}
```
## Response body (sample)
```
{
"apiVersion": "beta",
"data": {
"items": [
{
"title": "TEAM_MANAGER",
"permissions": [
"CREATE_TEAM",
"DELETE_TEAM",
"EDIT_TEAM",
"INVITE_TEAM_MEMBER"
],
"id": 9,
"user": 11,
"team": 11,
"readonly": false,
"createdAt": "2020-04-13T23:19:03.259Z",
"updatedAt": "2020-04-13T23:19:03.259Z"
}
]
}
}
```
-----------------------------------------------------------
## Get a role definition
**URL:** [post] /api/role/9
### Description:
## Headers (sample)
```
{
"x-token": "your_access_key_token_after_signin_or_signup",
"x-team": 1
}
```
## Request body (sample)
```
{}
```
## Response body (sample)
```
{
"apiVersion": "beta",
"data": {
"items": [
{
"title": "TEAM_MANAGER",
"user": 11,
"team": 11,
"readonly": false,
"permissions": [
"CREATE_TEAM",
"DELETE_TEAM",
"EDIT_TEAM",
"INVITE_TEAM_MEMBER"
],
"id": 9,
"createdAt": "2020-04-13T23:19:03.000Z",
"updatedAt": "2020-04-13T23:19:03.000Z"
}
]
}
}
```
-----------------------------------------------------------
## Update a role definition
**URL:** [post] /api/role
### Description:
## Headers (sample)
```
{
"x-token": "your_access_key_token_after_signin_or_signup",
"x-team": 1
}
```
## Request body (sample)
```
{
"title": "Role new name",
"id": 9
}
```
## Response body (sample)
```
{
"apiVersion": "beta",
"data": {
"items": [
{
"title": "Role new name",
"user": 11,
"team": 11,
"readonly": false,
"permissions": null,
"id": 9,
"createdAt": "2020-04-13T23:19:03.000Z",
"updatedAt": "2020-04-13T23:19:03.000Z"
}
]
}
}
```
-----------------------------------------------------------
## Delete a role
**URL:** [delete] /api/role/9
### Description:
## Headers (sample)
```
{
"x-token": "your_access_key_token_after_signin_or_signup",
"x-team": 1
}
```
## Request body (sample)
```
{}
```
## Response body (sample)
```
{
"apiVersion": "beta",
"data": {
"items": [
{
"title": "Role new name",
"user": 11,
"team": 11,
"readonly": 0,
"permissions": null,
"id": 9,
"createdAt": "2020-04-13T23:19:03.000Z",
"updatedAt": "2020-04-13T23:19:03.000Z"
}
]
}
}
```
-----------------------------------------------------------
## Get all roles in the team
**URL:** [get] /api/roles
### Description:
## Headers (sample)
```
{
"x-token": "your_access_key_token_after_signin_or_signup",
"x-team": 1
}
```
## Request body (sample)
```
{}
```
## Response body (sample)
```
{
"apiVersion": "beta",
"data": {
"items": [
{
"title": "Team Admin",
"user": 11,
"team": 11,
"readonly": true,
"permissions": [
"*.*"
],
"id": 8,
"createdAt": "2020-04-13T23:19:02.000Z",
"updatedAt": "2020-04-13T23:19:02.000Z"
}
]
}
}
```
-----------------------------------------------------------
## Get all possible permissions in the software
**URL:** [get] /api/available-permissions
### Description:
## Headers (sample)
```
{
"x-token": "your_access_key_token_after_signin_or_signup",
"x-team": 1
}
```
## Request body (sample)
```
{}
```
## Response body (sample)
```
{
"apiVersion": "beta",
"data": {
"items": [
"ADD_MEMBER_TO_TEAM",
"REMOVE_MEMBER_FROM_TEAM",
"READ_PROFILE_DATA",
"READ_PAYMENTS",
"READ_TEAM",
"WRITE_TEAM",
"READ_ROLES",
"WRITE_ROLES",
"VIEW_MEMBER_DASHBOARD",
"VIEW_ACCOUNTANT_DASHBOARD",
"READ_SERVICE_PACKAGE",
"WRITE_SERVICE_PACKAGE",
"WRITE_PAYMENTS",
"WRITE_PROFILE_DATA"
]
}
}
```
-----------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment