docs: add swagger spec for accounts API (#11620)
This commit is contained in:
28
swagger/paths/application/accounts/show.yml
Normal file
28
swagger/paths/application/accounts/show.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
tags:
|
||||
- Account
|
||||
operationId: get-account-details
|
||||
summary: Get account details
|
||||
description: Get the details of the current account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_show_response'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: Account not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
43
swagger/paths/application/accounts/update.yml
Normal file
43
swagger/paths/application/accounts/update.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
tags:
|
||||
- Account
|
||||
operationId: update-account
|
||||
summary: Update account
|
||||
description: Update account details, settings, and custom attributes
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_update_payload'
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/account_detail'
|
||||
'401':
|
||||
description: Unauthorized (requires administrator role)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'404':
|
||||
description: Account not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
'422':
|
||||
description: Validation error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/bad_request_error'
|
||||
@@ -166,6 +166,15 @@
|
||||
|
||||
# ------------ Application API routes ------------#
|
||||
|
||||
# Accounts
|
||||
/api/v1/accounts/{id}:
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/account_id'
|
||||
get:
|
||||
$ref: ./application/accounts/show.yml
|
||||
patch:
|
||||
$ref: ./application/accounts/update.yml
|
||||
|
||||
# AgentBots
|
||||
/api/v1/accounts/{account_id}/agent_bots:
|
||||
parameters:
|
||||
|
||||
Reference in New Issue
Block a user