chore: Add Swagger docs for Platform APIs (#2349)
This commit is contained in:
40
swagger/paths/platform/account_users/create.yml
Normal file
40
swagger/paths/platform/account_users/create.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
tags:
|
||||
- Account Users
|
||||
operationId: create-an-account-user
|
||||
summary: Create an Account User
|
||||
description: Create an Account User
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
user_id:
|
||||
type: integer
|
||||
description: The ID of the user
|
||||
required: true
|
||||
role:
|
||||
type: string
|
||||
description: whether user is an administrator or agent
|
||||
required: true
|
||||
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
properties:
|
||||
account_id:
|
||||
type: integer
|
||||
description: The ID of the user
|
||||
user_id:
|
||||
type: integer
|
||||
description: The ID of the user
|
||||
role:
|
||||
type: string
|
||||
description: whether user is an administrator or agent
|
||||
|
||||
401:
|
||||
description: Unauthorized
|
||||
26
swagger/paths/platform/account_users/delete.yml
Normal file
26
swagger/paths/platform/account_users/delete.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
tags:
|
||||
- Account Users
|
||||
operationId: delete-an-account-user
|
||||
summary: Delete an Account User
|
||||
description: Delete an Account User
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
user_id:
|
||||
type: integer
|
||||
description: The ID of the user
|
||||
required: true
|
||||
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The account does not exist
|
||||
28
swagger/paths/platform/account_users/index.yml
Normal file
28
swagger/paths/platform/account_users/index.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
tags:
|
||||
- Account Users
|
||||
operationId: list-all-account-users
|
||||
summary: List all Account Users
|
||||
description: List all account users
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: 'Array of account users'
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
account_id:
|
||||
type: integer
|
||||
description: The ID of the user
|
||||
user_id:
|
||||
type: integer
|
||||
description: The ID of the user
|
||||
role:
|
||||
type: string
|
||||
description: whether user is an administrator or agent
|
||||
|
||||
401:
|
||||
description: Unauthorized
|
||||
20
swagger/paths/platform/accounts/create.yml
Normal file
20
swagger/paths/platform/accounts/create.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Accounts
|
||||
operationId: create-an-account
|
||||
summary: Create an Account
|
||||
description: Create an Account
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/account_create_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/platform_account'
|
||||
401:
|
||||
description: Unauthorized
|
||||
14
swagger/paths/platform/accounts/delete.yml
Normal file
14
swagger/paths/platform/accounts/delete.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
tags:
|
||||
- Accounts
|
||||
operationId: delete-an-account
|
||||
summary: Delete an Account
|
||||
description: Delete an Account
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The account does not exist
|
||||
16
swagger/paths/platform/accounts/show.yml
Normal file
16
swagger/paths/platform/accounts/show.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
tags:
|
||||
- Accounts
|
||||
operationId: get-details-of-an-account
|
||||
summary: Get an account details
|
||||
description: Get the details of an account
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/platform_account'
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The given account does not exist
|
||||
20
swagger/paths/platform/accounts/update.yml
Normal file
20
swagger/paths/platform/accounts/update.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Accounts
|
||||
operationId: update-an-account
|
||||
summary: Update an account
|
||||
description: Update an account's attributes
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/account_create_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/platform_account'
|
||||
401:
|
||||
description: Unauthorized
|
||||
20
swagger/paths/platform/agent_bots/create.yml
Normal file
20
swagger/paths/platform/agent_bots/create.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- AgentBots
|
||||
operationId: create-an-agent-bot
|
||||
summary: Create an Agent Bot
|
||||
description: Create an agent bot
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/agent_bot_create_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/agent_bot'
|
||||
401:
|
||||
description: Unauthorized
|
||||
14
swagger/paths/platform/agent_bots/delete.yml
Normal file
14
swagger/paths/platform/agent_bots/delete.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
tags:
|
||||
- AgentBots
|
||||
operationId: delete-an-agent-bot
|
||||
summary: Delete an AgentBot
|
||||
description: Delete an AgentBot
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The agent bot does not exist
|
||||
17
swagger/paths/platform/agent_bots/index.yml
Normal file
17
swagger/paths/platform/agent_bots/index.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
tags:
|
||||
- AgentBots
|
||||
operationId: list-all-agent-bots
|
||||
summary: List all AgentBots
|
||||
description: List all agent bots available
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: 'Array of agent bots'
|
||||
items:
|
||||
$ref: '#/definitions/agent_bot'
|
||||
401:
|
||||
description: Unauthorized
|
||||
16
swagger/paths/platform/agent_bots/show.yml
Normal file
16
swagger/paths/platform/agent_bots/show.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
tags:
|
||||
- AgentBots
|
||||
operationId: get-details-of-a-single-agent-bot
|
||||
summary: Get an agent bot details
|
||||
description: Get the details of an agent bot
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/agent_bot'
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The given agent bot ID does not exist
|
||||
20
swagger/paths/platform/agent_bots/update.yml
Normal file
20
swagger/paths/platform/agent_bots/update.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- AgentBots
|
||||
operationId: update-an-agent-bot
|
||||
summary: Update an agent bot
|
||||
description: Update an agent bot's attributes
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/agent_bot_create_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/agent_bot'
|
||||
401:
|
||||
description: Unauthorized
|
||||
20
swagger/paths/platform/users/create.yml
Normal file
20
swagger/paths/platform/users/create.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Users
|
||||
operationId: create-a-user
|
||||
summary: Create a User
|
||||
description: Create a User
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/user_create_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/user'
|
||||
401:
|
||||
description: Unauthorized
|
||||
14
swagger/paths/platform/users/delete.yml
Normal file
14
swagger/paths/platform/users/delete.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
tags:
|
||||
- Users
|
||||
operationId: delete-a-user
|
||||
summary: Delete a User
|
||||
description: Delete a User
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The user does not exist
|
||||
21
swagger/paths/platform/users/login.yml
Normal file
21
swagger/paths/platform/users/login.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
get:
|
||||
tags:
|
||||
- Users
|
||||
operationId: get-sso-url-of-a-user
|
||||
summary: Get User SSO Link
|
||||
description: Get the sso link of a user
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: SSO url to autenticate the user
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The given user does not exist
|
||||
16
swagger/paths/platform/users/show.yml
Normal file
16
swagger/paths/platform/users/show.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
tags:
|
||||
- Users
|
||||
operationId: get-details-of-a-user
|
||||
summary: Get an user details
|
||||
description: Get the details of an user
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/user'
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The given user does not exist
|
||||
20
swagger/paths/platform/users/update.yml
Normal file
20
swagger/paths/platform/users/update.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Users
|
||||
operationId: update-a-user
|
||||
summary: Update a user
|
||||
description: Update a user's attributes
|
||||
security:
|
||||
- platformAppApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/user_create_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/user'
|
||||
401:
|
||||
description: Unauthorized
|
||||
Reference in New Issue
Block a user