Version: 0.0.1
- path: /api/v1/session
- methods: ['POST', 'OPTIONS']
- type: list
Login Resource.
Login System with Email and Password. Return User_Id, Role and Token(Token used until logout )
```bash
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--body "{ \
"email": "[email protected]", \
"password": "123" \
}" \
https://api_baseurl/api/v1/session
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json"
}
body = {
"email": "[email protected]",
"password": "123",
}
req = requests.post("https://api_baseurl/api/v1/session",
header=header, data=json.dumps(body))
```
#### Response:
```json
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"token": "asdljfsl394whefsudfo9sdfysdf"
}
}
```
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
token | string | False | True | Access token. | None | None |
string | True | False | Email for user.Max length 70 Character | None | None | |
password | string | True | False | Password for user.Max length 128 Character | None | None |
- path: /api/v1/session/logout
- methods: ['DELETE', 'OPTIONS']
- type: object
Logout resource. User logout and used token invalidated.(token is disposable) If "others" parameters is true then users all token deleted except that used this request
Logout User Account and Invalidate user token.
```bash
#bash
curl \
--request DELETE \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/session/logout
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.GET("https://api_baseurl/api/v1/session/logout,
header=header)
```
##### Response:
202 OK.
```json
{
"meta": {
"params": {
"indent": 0
}
},
"content": null
}
```
If "others" parameters is true then users all token deleted except that used this request
```bash
#bash
curl \
--request DELETE \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/session/logout?others=True
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.GET("https://api_baseurl/api/v1/session/logout?others=True,
header=header)
```
##### Response:
202 OK.
```json
{
"meta": {
"params": {
"indent": 0
}
},
"content": null
}
```
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
others | bool | False | False | This parameter is user delete token parameter. If it is true users all token deleted | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
token | string | False | True | Access token | None | None |
- path: /api/v1/forgot-password
- methods: ['POST', 'OPTIONS']
- type: list
Forgot Password Resource
#### POST:
Send reset password email. We send to reset link your email address. You can reset your password using these
link in 5 hours
#### Request:
```bash
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: eyJ0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"email": "[email protected]", \
}" \
https://api_baseurl/api/v1/forgot-password
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"email": "[email protected]"
}
req = requests.post("https://api_baseurl/api/v1/forgot-password",
header=header, data=json.dumps(body))
```
#### Response:
201 Accepted:
```json
{
"meta": {
"params": {
"indent": 0
}
},
}
```
#### Possible Errors
- __Not Found__
- __Unauthorized__
- __Failed Dependency__ :An Error occur on 3rd part service. Please retry after a few minutes.
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
string | True | False | Email for user.Max length 70 Character | None | None |
- path: /api/v1/reset-password
- methods: ['PUT', 'OPTIONS']
- type: object
Reset Password Resource
#### PUT:
Reset Password with reset_token and new password
#### Request:
```bash
#bash
curl \
--request PUT \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"password": "123", \
"resetToken": "sdfsdfsdf23423dasdasdasd" \
}" \
https://api_baseurl/api/v1/reset-password
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"password": "123",
"resetToken": "asdfsdfsdfsdfsdf234234"
}
req = requests.put("https://api_baseurl/api/v1/reset-password",
header=header, data=json.dumps(body))
```
##### Response:
202 Accepted.
```json{
"meta": {
"params": {
"indent": 0
}
}
}
```
#### Possible Error
- __Not Found_
- __Invalid Params__
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
resetToken | string | True | False | Forgot Password Token | None | None |
password | string | True | False | New password for user. Max length 128 Character | None | None |
- path: /api/v1/account
- methods: ['GET', 'PUT', 'DELETE', 'OPTIONS']
- type: object
Account get, update and delete resource
Update account field
#bash
curl \
--request PUT \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"organizationName": "Updated Example Organization", \
"address": "Updated_Example Address, A Street No 5.", \
"phone": "12345670001", \
"email": "[email protected]" \
}" \
https://api_baseurl/api/v1/account
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"organizationName": "Updated_Example Organization",
"address": "Updated_Example Address, A Street No 5.",
"phone": "12345678901",
"email": "[email protected]"
}
req = requests.put("https://api_baseurl/api/v1/account",
header=header, data=json.dumps(body))
202 Accepted.
{
"meta":{
"params": {
"indent": 0
}
},
"content": {
"organizationName": "Updated_Example Organization",
"address": "Updated_Example Address, A Street No 5.",
"phone": "12345670001",
"email": "[email protected]",
}
}
- Conflict: Email address already used
Delete account (all connected field deleted (users, services, consumers, projects)
#bash
curl \
--request DELETE \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/account
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.delete("https://api_baseurl/api/v1/account",
header=header)
202 Accepted.
Get account information
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/account
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.get("https://api_baseurl/api/v1/account",
header=header)
200 Accepted.
{
"meta":{
"params": {
"indent": 0
}
},
"content": {
"organizationName": "Example Organization",
"address": "Example Address, A Street No 5.",
"phone": "12345670001",
"email": "[email protected]",
}
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
organizationName | string | False | False | Organization Name.Max Organization Name length 100 Character | None | None |
address | string | False | False | Address. Max Address length 200 Character | None | None |
phone | string | False | False | Phone Number, length must be 11 character. | None | None |
string | False | False | Email for Account.Max Email length 70 Character | None | None |
- path: /api/v1/register
- methods: ['POST', 'OPTIONS']
- type: list
Allows to Post Register New Account
####### Code Example:
Create a new account
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--body "{ \
"organizationName": "Example Organization", \
"email": "[email protected]" \
}" \
https://api_baseurl/api/v1/register
#python
import requests
import json
header = {'Content-Type': 'application/json'}
body = {
"organizationName": "Example Organization",
"email": "[email protected]"
}
req = requests.post("https://api_baseurl/api/v1/register",
header=header, data=json.dumps(body))
201 Created.
{
"meta":{
"params": {
"indent": 0
}
},
"content": {
"organizationName": "Example Organization",
"email": "[email protected]",
"registrationId": "f200baccded4413a81f9a381063c435c",
}
}
- Conflict: Email address already used
- Failed Dependency :An Error occur on 3rd part service. Please retry after a few minutes.
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
testing | bool | False | False | Testing mode parameter. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
organizationName | string | False | False | Organization name.Max length 100 Character | None | None |
string | False | False | Email for account.Max length 70 Character | None | None | |
registrationId | string | False | True | Registered account id. | None | None |
- path: /api/v1/register/{registration_id}
- methods: ['PUT', 'OPTIONS']
- type: object
Allows to update with Approve Code and Password
####### Code Example:
Update account with approve code and password. Create User with admin role
#bash
curl \
--request PUT \
--header "Content-Type: application/json" \
--body "{ \
"approveCode": "595819dca81e3ae6f81f4a39bd0470103044f936f6dd971803a23", \
"email": "[email protected]", \
"password": "123", \
"firstName": "emre", \
"lastName": "dönmesz" \
}" \
https://api_baseurl/api/v1/register/{registration_id}
#python
import requests
import json
header = {'Content-Type': 'application/json'}
body = {
"approveCode": "22f2a019590595819dca81e3ae6f81f4a39bd0470103044f936f6dd971803a23",
"email": "[email protected]",
"password": "123",
"firstName": "emre",
"lastName": "dönmezs"
}
req = requests.put("https://api_baseurl/api/v1/register/{registration_id}",
header=header, data=json.dumps(body))
202 Accepted:
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"id": "90c4cc8b11ab49a58ecb4b799faa8979",
"token": asdaskdh2uhehdasdhaksd,
"email": "[email protected]",
"firstName": "emre",
"lastName": "dönmezs"
}
}
Warning
In order to obtain the token, after approving the account it is necessary to be logged in. The response of the login request will include the token.
- Not Found: Request invalid registration id.
- Not Found: Request invalid approve code
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
id | string | False | True | ID | None | None |
string | False | False | Email for user.Max length 70 Character | None | None | |
password | string | True | False | Password for user.Max length 128 Character | None | None |
approveCode | string | True | False | Approve code to activate the account. | None | None |
firstName | string | False | False | Name of user.Max length 32 Character | None | None |
lastName | string | False | False | Last Name of user.Max length 32 Character | None | None |
token | string | False | True | User token | None | None |
- path: /api/v1/register/approve-code
- methods: ['POST', 'OPTIONS']
- type: list
Allows to resend approve code
####### Code Example:
Resend account approve code
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--body "{ \
"email": "[email protected]", \
}" \
https://api_baseurl/api/v1/register/approve-code
#python
import requests
import json
header = {'Content-Type': 'application/json'}
body = {
"email": "[email protected]",
}
req = requests.post("https://api_baseurl/api/v1/register/approve-code",
header=header, data=json.dumps(body))
202 Accepted:
{
"meta": {
"params": {
"indent": 0
}
}
}
- Not Found: These email address does not exist
- Failed Dependency :An Error occur on 3rd part service. Please retry after a few minutes.
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
testing | bool | False | False | Testing mode parameter. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
string | True | False | Email for account.Max length 70 Character | None | None |
- path: /api/v1/admins
- methods: ['GET', 'POST', 'OPTIONS']
- type: list
Allows to list and create admin
Create a new user with admin role
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: eyJ0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"email": "[email protected]", \
"password": "123", \
"firstName": "emre", \
"lastName": "dönmesz" \
}" \
https://api_baseurl/api/v1/admins
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"email": "[email protected]",
"password": "123",
"firstName": "emre",
"lastName": "dönmezs"
}
req = requests.post("https://api_baseurl/api/v1/admins",
header=header, data=json.dumps(body))
201 Accepted:
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"id": "3a033bb9d86443c4a82a98a575c6a461",
"token": "ExlQUMQ8YNyLfUdYf7rmldGI79KQcIz8nwX1NcFC5o",
"email": "[email protected]",
"role": "admin",
"firstName": "emre",
"lastName": "dönmez"
}
}
- Conflict
- Unauthorized
Retrieve account admins.
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/admins
#pyhon
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.post("https://api_baseurl/api/v1/admins",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": [
{
"id": "fc236ae7e97f4afbb638f2f3075eee1c",
"email": "[email protected]",
"firstName": "emre",
"lastName": "dönmez"
"role": "admin",
"token": null,
},
{
"id": "b0cbdd61cff843fdaf5a8c62cbbe460e",
"email": "[email protected]",
"firstName": "emre2",
"lastName": "dönmez2"
"role": "admin",
"token": null,
},
{
"id": "d31703ec133246f8ab6ee62176aa16f1",
"email": "[email protected]",
"firstName": "emre3",
"lastName": "dönmez3"
"role": "admin",
"token": null,
}
]
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
id | string | False | True | ID | None | None |
token | string | False | True | Access token | None | None |
string | False | False | Email for user.Max length 70 Character | None | None | |
password | string | True | False | Password for user.Max length 128 Character | None | None |
role | string | False | True | Role of user. | None | None |
firstName | string | False | False | Name of user.Max length 32 Character | None | None |
lastName | string | False | False | Last Name of user.Max length 32 Character | None | None |
- path: /api/v1/admins/{admin_id}
- methods: ['GET', 'PUT', 'DELETE', 'OPTIONS']
- type: object
Allows to get and update admin with id.
Retrieve admin user with id.
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/admins/{admin_id}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.get("https://api_baseurl/api/v1/admins/{admin_id}",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"email": "[email protected]",
"role": "admin",
"firstName": "ahmet",
"lastName": "mehmet"
}
}
Update admin user with id.
#bash
curl \
--request PUT \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"email": "[email protected]", \
"password": "123", \
"firstName": "mehmet", \
"lastName": "ahmet" \
}" \
https://api_baseurl/api/v1/admins/{admin_id}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"email": "[email protected]",
"password": "123",
"firstName": "mehmet",
"lastName": "ahmet"
}
req = requests.put("https://api_baseurl/api/v1/admins/{admin_id}",
header=header, data=json.dumps(body))
202 Accepted.
"meta": {
"params": {
"indent": 0
}
},
"content": {
"email": "[email protected]",
"role": "admin",
"firstName": "mehmet",
"lastName": "ahmet"
}
}
- _Conflict
- Bad Request
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
string | False | False | Email for user.Max length 70 Character | None | None | |
password | string | True | False | Password for user.Max length 128 Character | None | None |
role | string | False | True | Role of user. | None | None |
firstName | string | False | False | Name of user.Max length 32 Character | None | None |
lastName | string | False | False | Last Name of user.Max length 32 Character | None | None |
token | string | False | True | Access token. | None | None |
- path: /api/v1/billings
- methods: ['GET', 'POST', 'OPTIONS']
- type: list
Allows to list and create billing
Create a new user with billing role
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"email": "[email protected]", \
"password": "123", \
"firstName": "emre", \
"lastName": "dönmesz" \
}" \
https://api_baseurl/api/v1/billings
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"email": "[email protected]",
"password": "123",
"firstName": "emre",
"lastName": "dönmezs"
}
req = requests.post("https://api_baseurl/api/v1/billings",
header=header, data=json.dumps(body))
201 Accepted:
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"id": "3a033bb9d86443c4a82a98a575c6a461",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTA4MTkyNTQsImlhdCI6MTUxMDIxNDQ1NCwic3ViIjoiM2EwMzNiYjlkODY0NDNjNGE4MmE5OGE1NzVjNmE0NjEiLCJyb2wiOjIsInRlbmFudF9pZCI6bnVsbCwiYWNjb3VudF9pZCI6ImYyMDBiYWNjZGVkNDQxM2E4MWY5YTM4MTA2M2M0MzVjIn0.pExlQUMQ8YNyLfUdYf7rmldGI79KQcIz8nwX1NcFC5o",
"email": "[email protected]",
"role": "billing",
"firstName": "emre",
"lastName": "dönmez"
}
}
- Conflict
- Unauthorized
Retrieve user billing
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/billings
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.get("https://api_baseurl/api/v1/billings",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": [
{
"id": "fc236ae7e97f4afbb638f2f3075eee1c",
"email": "[email protected]",
"firstName": "emre",
"lastName": "dönmez"
"role": "billing",
"token": null,
},
{
"id": "b0cbdd61cff843fdaf5a8c62cbbe460e",
"email": "[email protected]",
"firstName": "emre2",
"lastName": "dönmez2"
"role": "billing",
"token": null,
},
{
"id": "d31703ec133246f8ab6ee62176aa16f1",
"email": "[email protected]",
"firstName": "emre3",
"lastName": "dönmez3"
"role": "billing",
"token": null,
}
]
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
id | string | False | True | ID | None | None |
token | string | False | True | Access token | None | None |
string | False | False | Email for user.Max length 70 Character | None | None | |
password | string | True | False | Password for user.Max length 128 Character | None | None |
role | string | False | True | Role of user. | None | None |
firstName | string | False | False | Name of user.Max length 32 Character | None | None |
lastName | string | False | False | Last Name of user.Max length 32 Character | None | None |
- path: /api/v1/billings/{billing_id}
- methods: ['GET', 'PUT', 'DELETE', 'OPTIONS']
- type: object
Allows to get and update billing with id.
Retrieve billing user with id.
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/billings/{billing_id}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTA4MTkyNTQsImlhdCI6MTUxMDIxNDQ1NCwic3ViIjoiOTBjNGNjOGIxMWFiNDlhNThlY2I0Yjc5OWZhYTg5NzkiLCJyb2wiOjIsInRlbmFudF9pZCI6bnVsbCwiYWNjb3VudF9pZCI6ImYyMDBiYWNjZGVkNDQxM2E4MWY5YTM4MTA2M2M0MzVjIn0.0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.post("https://api_baseurl/api/v1/billings/hsdkfsd8f7sdf7s6df6rewyr",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"email": "[email protected]",
"role": "billing",
"firstName": "ahmet",
"lastName": "mehmet"
}
}
Update billing user with id.
#bash
curl \
--request PUT \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"email": "[email protected]", \
"password": "123", \
"firstName": "mehmet", \
"lastName": "ahmet" \
}" \
https://api_baseurl/api/v1/billings/{billing_id}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"email": "[email protected]",
"password": "123",
"firstName": "mehmet",
"lastName": "ahmet"
}
req = requests.put("https://api_baseurl/api/v1/billings/{billing_id}",
header=header, data=json.dumps(body))
202 Accepted.
"meta": {
"params": {
"indent": 0
}
},
"content": {
"email": "[email protected]",
"role": "billing",
"firstName": "mehmet",
"lastName": "ahmet"
}
}
- _Conflict
- Bad Request
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
string | False | False | Email for user.Max length 70 Character | None | None | |
password | string | True | False | Password for user.Max length 128 Character | None | None |
role | string | False | True | Role of user. | None | None |
firstName | string | False | False | Name of user.Max length 32 Character | None | None |
lastName | string | False | False | Last Name of user.Max length 32 Character | None | None |
token | string | False | True | Access token. | None | None |
- path: /api/v1/developers
- methods: ['GET', 'POST', 'OPTIONS']
- type: list
Allows to list and create developer
Create a new user with developer role
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"email": "[email protected]", \
"password": "123", \
"firstName": "emre", \
"lastName": "dönmesz" \
}" \
https://api_baseurl/api/v1/developers
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTA4MTkyNTQsImlhdCI6MTUxMDIxNDQ1NCwic3ViIjoiOTBjNGNjOGIxMWFiNDlhNThlY2I0Yjc5OWZhYTg5NzkiLCJyb2wiOjIsInRlbmFudF9pZCI6bnVsbCwiYWNjb3VudF9pZCI6ImYyMDBiYWNjZGVkNDQxM2E4MWY5YTM4MTA2M2M0MzVjIn0.0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"email": "[email protected]",
"password": "123",
"firstName": "emre",
"lastName": "dönmezs"
}
req = requests.post("https://api_baseurl/api/v1/developers",
header=header, data=json.dumps(body))
201 Accepted:
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"id": "3a033bb9d86443c4a82a98a575c6a461",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTA4MTkyNTQsImlhdCI6MTUxMDIxNDQ1NCwic3ViIjoiM2EwMzNiYjlkODY0NDNjNGE4MmE5OGE1NzVjNmE0NjEiLCJyb2wiOjIsInRlbmFudF9pZCI6bnVsbCwiYWNjb3VudF9pZCI6ImYyMDBiYWNjZGVkNDQxM2E4MWY5YTM4MTA2M2M0MzVjIn0.pExlQUMQ8YNyLfUdYf7rmldGI79KQcIz8nwX1NcFC5o",
"email": "[email protected]",
"role": "developer",
"firstName": "emre",
"lastName": "dönmez"
}
}
- Conflict
- Unauthorized
Retrieve account developers.
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/developers
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.get("https://api_baseurl/api/v1/developers",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": [
{
"id": "fc236ae7e97f4afbb638f2f3075eee1c",
"email": "[email protected]",
"firstName": "emre",
"lastName": "dönmez"
"role": "developer",
"token": null,
},
{
"id": "b0cbdd61cff843fdaf5a8c62cbbe460e",
"email": "[email protected]",
"firstName": "emre2",
"lastName": "dönmez2"
"role": "developer",
"token": null,
},
{
"id": "d31703ec133246f8ab6ee62176aa16f1",
"email": "[email protected]",
"firstName": "emre3",
"lastName": "dönmez3"
"role": "developer",
"token": null,
}
]
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
id | string | False | True | ID | None | None |
token | string | False | True | Access token | None | None |
string | False | False | Email for user.Max length 70 Character | None | None | |
password | string | True | False | Password for user.Max length 128 Character | None | None |
role | string | False | True | Role of user. | None | None |
firstName | string | False | False | Name of user.Max length 32 Character | None | None |
lastName | string | False | False | Last Name of user.Max length 32 Character | None | None |
- path: /api/v1/developers/{developer_id}
- methods: ['GET', 'PUT', 'DELETE', 'OPTIONS']
- type: object
Allows to get and update developer with id.
Retrieve developer user with id.
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/developers/{developer_id}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.get("https://api_baseurl/api/v1/developers/{developer_id}",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"email": "[email protected]",
"role": "developer",
"firstName": "ahmet",
"lastName": "mehmet"
}
}
Update developer user with id.
#bash
curl \
--request PUT \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"email": "[email protected]", \
"password": "123", \
"firstName": "mehmet", \
"lastName": "ahmet" \
}" \
https://api_baseurl/api/v1/developers/{developer_id}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"email": "[email protected]",
"password": "123",
"firstName": "mehmet",
"lastName": "ahmet"
}
req = requests.post("https://api_baseurl/api/v1/developers/{developer_id}",
header=header, data=json.dumps(body))
202 Accepted.
"meta": {
"params": {
"indent": 0
}
},
"content": {
"email": "[email protected]",
"role": "developers",
"firstName": "mehmet",
"lastName": "ahmet"
}
}
- _Conflict
- Bad Request
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
string | False | False | Email for user.Max length 70 Character | None | None | |
password | string | True | False | Password for user.Max length 128 Character | None | None |
role | string | False | True | Role of user. | None | None |
firstName | string | False | False | Name of user.Max length 32 Character | None | None |
lastName | string | False | False | Last Name of user.Max length 32 Character | None | None |
token | string | False | True | Access token. | None | None |
- path: /api/v1/me
- methods: ['GET', 'OPTIONS']
- type: object
Allow to get user information
### Code Examples
#### GET:
Retrieve user information with token.
#### Request:
```bash
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/me
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.get("https://api_baseurl/api/v1/me",
header=header)
```
##### Response:
200 OK.
```json
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"email": "[email protected]",
"role": "admin",
"id": 123123123123,
"firstName": "ahmet",
"lastName": "mehmet"
}
}
```
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
id | string | False | True | ID | None | None |
string | False | True | Email for user.Max length 70 Character | None | None | |
role | string | False | True | Role of user. | None | None |
firstName | string | False | True | Name of user.Max length 32 Character | None | None |
lastName | string | False | True | Last Name of user.Max length 32 Character | None | None |
- path: /api/v1/projects
- methods: ['GET', 'POST', 'OPTIONS']
- type: list
Allows to create and list project
####### Code Example:
Create a new project
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION : sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr" \
--body "{ \
"name": "Aka Project", \
"description": "Super top secret project!" \
}" \
https://api_baseurl/api/v1/projects
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr"
}
body = {
"name": "Aka Project",
"description": "Super top secret project!"
}
req = requests.post("https://api_baseurl/api/v1/projects",
header=header, data=json.dumps(body))
201 Created.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"name": "Aka Project",
"description": "Super top secret project!",
"id": "1aa36f61f9c14156a900921abb04af56",
"userLimit": null,
"userUsed": null
}
}
List projects
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr" \
https://api_baseurl/api/v1/projects
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr"
}
req = requests.get("https://api_baseurl/api/v1/projects",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": [
{
"name": "Aka Project",
"description": "Super top secret project!",
"id": "1aa36f61f9c14156a900921abb04af56",
"userLimit": 10,
"userUsed": 0
},
{
"name": "Zetaops Project",
"description": "secret project!",
"id": "asdasd1aa36f61f9c14156a900921abb04af56",
"userLimit": 10,
"userUsed": 0
}
]
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
name | string | False | False | Project name.Max length 70 Character | None | None |
description | string | False | False | Project description.Max length 200 Character | None | None |
id | string | False | True | ID | None | None |
userLimit | int | False | True | User limit of service. | None | None |
userUsed | int | False | True | User used of service. | None | None |
services | None | False | True | Project's active services | None | None |
- path: /api/v1/projects/{project_id}
- methods: ['GET', 'PUT', 'OPTIONS']
- type: object
Allows to update and retrieve project with project id
####### Code Example:
Update project with project id
#bash
curl \
--request PUT \
--header "Content-Type: application/json" \
--header "AUTHORIZATION": sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr" \
--body "{ \
"name": "Aka Project!..", \
"description": "Super top secret project!", \
}" \
https://api_baseurl/api/v1/projects/{projectId}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr"
}
body = {
"name": "Aka Project!..",
"description": "Super top secret project!"
}
req = requests.put("https://api_baseurl/api/v1/projects/{projectId}",
header=header, data=json.dumps(body))
202 Accepted.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"name": "Aka Project!..",
"description": "Super top secret project!",
"id": "1aa36f61f9c14156a900921abb04af56",
"userLimit": 10,
"userUsed": 0
}
}
Retrieve project with id
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION": Token sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr" \
https://api_baseurl/api/v1/projects/{projectId}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr"
}
req = requests.get("https://api_baseurl/api/v1/projects/{projectId}",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"name": "Aka Project",
"description": "Super top secret project!",
"id": "1aa36f61f9c14156a900921abb04af56",
"services": ["roc", "push"]
"userLimit": 10,
"userUsed": 0
}
}
- Not Found_
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
name | string | False | False | Project name.Max length 70 Character | None | None |
description | string | False | False | Project description.Max length 200 Character | None | None |
id | string | False | True | ID | None | None |
userLimit | int | False | True | User limit of service. | None | None |
userUsed | int | False | True | User used of service. | None | None |
services | None | False | True | Project's active services | None | None |
- path: /api/v1/projects/{project_id}/api
- methods: ['GET', 'PUT', 'OPTIONS']
- type: object
Project Google Server API Key, Google Project Number, Apns IOS Push Certification Resource. You can get and update using this resource.
### Code Examples
#### GET:
Get Google Server API Key, Google Project Number, Apns IOS Push Certification
#### Request:
```bash
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
https://api_baseurl/api/v1/projects/{project_id}/api
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
req = requests.get("https://api_baseurl/api/v1/projects/{project_id}/api",
header=header)
```
##### Response:
200 OK.
```json
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"fcmApiKeys": "asdasdasdas123123",
"fcmProjectNumber": "12312312qweqweq213",
"apnsCert": "Yga25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=",
"id": "c3c0a4864a054b6da3c642588c594fc3"
}
}
```
#### PUT:
Update Google Server API Key, Google Project Number, Apns IOS Push Certification
#### Request:
```bash
#bash
curl \
--request PUT \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: 0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w" \
--body "{ \
"fcmApiKeys": "asdasdasdas123123", \
"fcmProjectNumber": "12312312qweqweq213", \
"apnsCert": "ZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=" \
}" \
https://api_baseurl/api/v1/projects/{project_id}/api
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "0sOEQfyptM0ZG7kJYkNxmswp_p5y9iX5t61KI1qH83w"
}
body = {
"fcmApiKeys": "asdasdasdas123123",
"fcmProjectNumber": "12312312qweqweq213",
"apnsCert": "asd2342j3423942342343VyZS4="
}
req = requests.put("https://api_baseurl/api/v1/projects/{project_id}/api",
header=header, data=json.dumps(body))
```
##### Response:
202 Accepted.
```json{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"fcmApiKeys": "asdasdasdas123123",
"fcmProjectNumber": "12312312qweqweq213",
"apnsCert": "HRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=",
"id": "c3c0a4864a054b6da3c642588c594fc3"
}
}
```
#### Possible Error
- __Bad Request__
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
fcmApiKeys | string | False | False | Fcm API Key | None | None |
fcmProjectNumber | string | False | False | Fcm Project Number | None | None |
apnsCert | string | False | False | Apns Cert | None | None |
id | string | False | True | ID | None | None |
- path: /api/v1/services
- methods: ['GET', 'POST', 'OPTIONS']
- type: list
Allows to create and list service catalog
Create service catalog item (You Must be Root)
```bash
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
--body "{ \
"codeName":"roc", \
"name":"Real Time Online Chat", \
"description":"Real Time Online Chat is funny!" \
}" \
https://api_baseurl/api/v1/services
```
```python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
body = {
"codeName":"roc",
"name":"Real Time Online Chat",
"description":"Real Time Online Chat is funny!"
}
req = requests.post("https://api_baseurl/api/v1/services",
header=header, data=json.dumps(body))
```
201 Accepted.
```json
{
"codeName":"roc",
"name":"Real Time Online Chat",
"description":"Real Time Online Chat is funny!"
}
```
Get all service catalogs
```bash
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
https://api_baseurl/api/v1/services
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
req = requests.get("https://api_baseurl/api/v1/services",
header=header)
```
200 OK.
```json
{
"meta": {
"params": {
"indent": 0
}
},
"content": [
{
"name": "Real Time Online Chat",
"description": "Real Time Online Chat is funny!",
"codeName": "roc"
}
]
}
```
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
name | string | False | False | Service Catalog name | None | None |
description | string | False | False | Service Catalog description | None | None |
codeName | string | False | False | Code name of the service. | None | None |
- path: /api/v1/projects/{project_id}/services
- methods: ['POST', 'OPTIONS']
- type: list
Allows to create attachment between service and project
```bash
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
--body "{ \
"serviceCatalogCode":"roc", \
"name":"message", \
"description":"fff" \
}" \
https://api_baseurl/api/v1/projects/{project_id}/services
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
body = {
"codeName":"roc",
"name":"message",
"description":"fff"
}
req = requests.post("https://api_baseurl/api/v1/projects/{project_id}/services",
header=header, data=json.dumps(body))
```
201 Created.
```json
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"id": "316589e74d52490e93a88fdf21c6f2ad",
"itemLimit": 0,
"name": "message",
"description": "fff",
"serviceCatalogCode": "roc"
}
}
```
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
id | string | False | True | ID | None | None |
itemLimit | int | False | True | Item limit of service. | None | None |
itemUsed | int | False | True | Item used of service. | None | None |
name | string | False | False | Service name.Max length 70 Character | None | None |
description | string | False | False | Service description.Max length 200 Character | None | None |
serviceCatalogCode | string | False | False | Code name of the service. | None | None |
- path: /api/v1/projects/{project_id}/services/{service_catalog_code}
- methods: ['GET', 'DELETE', 'OPTIONS']
- type: object
Allows to delete attachment between project and service
Retrieve service with project_id and service_catalog_code
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION": Token sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr" \
https://api_baseurl/api/v1/projects/{project_id}/services/{service_catalog_code}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdkjfhskjfk32kjh42kj2h342kh34h2k3h4kkhjsdhjkhwr"
}
req = requests.get("https://api_baseurl/api/v1/projects/{project_id}/services/{service_catalog_code}",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"id": "316589e74d52490e93a88fdf21c6f2ad",
"itemLimit": 100,
"itemUsed": 10,
"name": "message",
"description": "fff",
"serviceCatalogCode": "roc"
}
}
- Not Found_
```bash
#bash
curl \
--request DELETE \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
https://api_baseurl/api/v1/projects/{project_id}/services/{service_catalog_code}
```
```python
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
req = requests.delete("https://api_baseurl/api/v1/projects/{project_id}/services/{service_catalog_code}",
header=header)
```
202 Accepted.
json { "meta": { "params": { "indent": 0 } }, "content": null }
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
id | string | False | True | ID | None | None |
itemLimit | int | False | True | Item limit of service. | None | None |
itemUsed | int | False | True | Item used of service. | None | None |
name | string | False | False | Service name.Max length 70 Character | None | None |
description | string | False | False | Service description.Max length 200 Character | None | None |
serviceCatalogCode | string | False | False | Code name of the service. | None | None |
- path: /api/v1/consumers
- methods: ['GET', 'POST', 'OPTIONS']
- type: list
Allows to create and list consumer
####### Code Example:
Creates a new consumer, returns consumer id
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: CI6ImYyMDBiYWNjZGVkNDQxM2E4MiX5I1qH83w" \
--body "{}" \
https://api_baseurl/api/v1/consumers
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "CI6ImYyMDBiYWNjZGVkNDQxM2E4MiX5I1qH83w"
}
body = {}
req = requests.post("https://api_baseurl/api/v1/consumers",
header=header, data=json.dumps(body))
201 Created.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"id": "f074d1b87c774ddfa685b224567b803d"
}
}
List consumers
#bash
curl \
--request GET \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
https://api_baseurl/api/v1/consumers
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
req = requests.get("https://api_baseurl/api/v1/consumers",
header=header)
200 OK.
{
"meta": {
"params": {
"indent": 0
}
},
"content": [
{
"id": "f074d1b87c774ddfa685b224567b803d"
},
{
"id": "1fcedd8e7ac345e8ba60db07ae4fb59a"
},
{
"id": "5af03d9fa2ed4f12950717f4d32bd679"
}
]
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
id | string | False | True | ID of consumer. | None | None |
- path: /api/v1/projects/{project_id}/consumers/{consumer_id}
- methods: ['DELETE', 'OPTIONS']
- type: object
Allows to delete attachment (between project and consumer)
####### Code Example:
Delete project consumer
#bash
curl \
--request DELETE \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
https://api_baseurl/api/v1/projects/$project_id/consumers/$consumer_id
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
req = requests.delete("https://api_baseurl/api/v1/projects/$project_id/consumers/{consumer_id}",
header=header)
202 Accepted.
{
"meta": {
"params": {
"indent": 0
}
},
"content": null
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
None |
- path: /api/v1/projects/{project_id}/consumers
- methods: ['POST', 'OPTIONS']
- type: list
Allows to create attachment with project to consumer
####### Code Example:
Create a project consumer
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
--body "{ \
"consumerId": "f074d1b87c774ddfa685b224567b803d" \
}" \
https://api_baseurl/api/v1/projects/{project_id}/consumers
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
body = {
"consumerId": "f074d1b87c774ddfa685b224567b803d"
}
req = requests.post("https://api_baseurl/api/v1/projects/{project_id}/consumers",
header=header, data=json.dumps(body))
201 Created.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"consumerId": "f074d1b87c774ddfa685b224567b803d"
}
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
consumerId | string | False | False | List of consumer_id's | None | None |
- path: /api/v1/consumer-tokens
- methods: ['POST', 'OPTIONS']
- type: list
Allows to create consumer token
#bash
curl \
--request POST \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
--body "{ \
"consumerId":"$consumer1_id", \
"projectId":"$project_id", \
"serviceCatalogCode":"$service_catalog_code" \
}" \
https://api_baseurl/api/v1/consumer-tokens
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
body = {
"consumerId":"$consumer1_id",
"projectId":"$project_id",
"serviceCatalogCode":"$service_catalog_code"
}
req = requests.post("https://api_baseurl/api/v1/consumer-tokens,
header=header, data=json.dumps(body))
201 Created.
{
"meta": {
"params": {
"indent": 0
}
},
"content": {
"consumerId": null,
"projectId": null,
"serviceCatalogCode": null,
"token": "5b72837976e9e81409962c38ad07495c1b4884f7729381ebcaacf41f1c9452a7"
}
}
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
consumerId | string | False | False | Consumer ID | None | None |
projectId | string | False | False | Project ID | None | None |
serviceCatalogCode | string | False | False | Service Code | None | None |
token | string | False | True | Refresh Token | None | None |
- path: /api/v1/consumer-tokens/{token_id}/projects/{project_id}/services/{service_catalog_code}
- methods: ['DELETE', 'OPTIONS']
- type: object
Allows to delete consumer token
#bash
curl \
--request DELETE \
--header "Content-Type: application/json" \
--header "AUTHORIZATION: sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs" \
https://api_baseurl/api/v1/consumer-tokens/{consumer_token}/projects/{project_id}/services/{service_catalog_code}
#python
import requests
import json
header = {
"Content-Type": "application/json",
"AUTHORIZATION": "sdfjskdjhsrk3hfksejhfksefhskefhskeh12123kjhkasdhaıs"
}
req = requests.delete("https://api_baseurl/api/v1/consumer-tokens/{consumer_token}/projects/{project_id}/services/{service_cagalog_code},
header=header, data=json.dumps(body))
201 Created.
Param | type | default | required | details | spec | many | label |
---|---|---|---|---|---|---|---|
indent | integer | 0 | False | JSON output indentation. Set to 0 if output should not be formated. | None | False | None |
Field | type | write_only | read_only | details | spec | label |
---|---|---|---|---|---|---|
None |
All rights reserved zops.io, generated at 26 Feb 2018 14:33