feat: update mgmt api docs (#28116)

Co-authored-by: phamhieu <689843+phamhieu@users.noreply.github.com>
This commit is contained in:
github-actions[bot]andphamhieu authored and GitHub committed 2024-07-22 16:55:59 +00:00
1 parent e1ac4ad5bb
commit f9aac31adb
2 files changed
+822 -6

No files matched your search

+1 -1
View File
@@ -1 +1 @@
{"openapi":"3.0.0","paths":{"/v1/branches/{branch_id}":{"get":{"operationId":"v1-get-a-branch-config","summary":"Get database branch config","description":"Fetches configurations of the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchDetailResponse"}}}},"500":{"description":"Failed to retrieve database branch"}},"tags":["Environments"],"security":[{"bearer":[]}]},"patch":{"operationId":"v1-update-a-branch-config","summary":"Update database branch config","description":"Updates the configuration of the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBranchBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchResponse"}}}},"500":{"description":"Failed to update database branch"}},"tags":["Environments"],"security":[{"bearer":[]}]},"delete":{"operationId":"v1-delete-a-branch","summary":"Delete a database branch","description":"Deletes the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchDeleteResponse"}}}},"500":{"description":"Failed to delete database branch"}},"tags":["Environments"],"security":[{"bearer":[]}]}},"/v1/branches/{branch_id}/reset":{"post":{"operationId":"v1-reset-a-branch","summary":"Resets a database branch","description":"Resets the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchResetResponse"}}}},"500":{"description":"Failed to reset database branch"}},"tags":["Environments"],"security":[{"bearer":[]}]}},"/v1/projects":{"get":{"operationId":"v1-list-all-projects","summary":"List all projects","description":"Returns a list of all projects you've previously created.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1ProjectResponse"}}}}}},"tags":["Projects"],"security":[{"bearer":[]}]},"post":{"operationId":"v1-create-a-project","summary":"Create a project","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateProjectBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ProjectResponse"}}}}},"tags":["Projects"],"security":[{"bearer":[]}]}},"/v1/organizations":{"get":{"operationId":"v1-list-all-organizations","summary":"List all organizations","description":"Returns a list of organizations that you currently belong to.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationResponseV1"}}}}},"500":{"description":"Unexpected error listing organizations"}},"tags":["Organizations"],"security":[{"bearer":[]}]},"post":{"operationId":"v1-create-an-organization","summary":"Create an organization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationBodyV1"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseV1"}}}},"500":{"description":"Unexpected error creating an organization"}},"tags":["Organizations"],"security":[{"bearer":[]}]}},"/v1/oauth/authorize":{"get":{"operationId":"v1-authorize-user","summary":"[Beta] Authorize user through oauth","parameters":[{"name":"client_id","required":true,"in":"query","schema":{"type":"string"}},{"name":"response_type","required":true,"in":"query","schema":{"enum":["code","token","id_token token"],"type":"string"}},{"name":"redirect_uri","required":true,"in":"query","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","schema":{"type":"string"}},{"name":"state","required":false,"in":"query","schema":{"type":"string"}},{"name":"response_mode","required":false,"in":"query","schema":{"type":"string"}},{"name":"code_challenge","required":false,"in":"query","schema":{"type":"string"}},{"name":"code_challenge_method","required":false,"in":"query","schema":{"enum":["plain","sha256","S256"],"type":"string"}}],"responses":{"303":{"description":""}},"tags":["OAuth"],"security":[{"oauth2":["read"]}]}},"/v1/oauth/token":{"post":{"operationId":"v1-exchange-oauth-token","summary":"[BeLine truncated
{"openapi":"3.0.0","paths":{"/v1/branches/{branch_id}":{"get":{"operationId":"v1-get-a-branch-config","summary":"Get database branch config","description":"Fetches configurations of the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchDetailResponse"}}}},"500":{"description":"Failed to retrieve database branch"}},"tags":["Environments"],"security":[{"bearer":[]}]},"patch":{"operationId":"v1-update-a-branch-config","summary":"Update database branch config","description":"Updates the configuration of the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBranchBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchResponse"}}}},"500":{"description":"Failed to update database branch"}},"tags":["Environments"],"security":[{"bearer":[]}]},"delete":{"operationId":"v1-delete-a-branch","summary":"Delete a database branch","description":"Deletes the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchDeleteResponse"}}}},"500":{"description":"Failed to delete database branch"}},"tags":["Environments"],"security":[{"bearer":[]}]}},"/v1/branches/{branch_id}/reset":{"post":{"operationId":"v1-reset-a-branch","summary":"Resets a database branch","description":"Resets the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchResetResponse"}}}},"500":{"description":"Failed to reset database branch"}},"tags":["Environments"],"security":[{"bearer":[]}]}},"/v1/projects":{"get":{"operationId":"v1-list-all-projects","summary":"List all projects","description":"Returns a list of all projects you've previously created.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1ProjectResponse"}}}}}},"tags":["Projects"],"security":[{"bearer":[]}]},"post":{"operationId":"v1-create-a-project","summary":"Create a project","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateProjectBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ProjectResponse"}}}}},"tags":["Projects"],"security":[{"bearer":[]}]}},"/v1/organizations":{"get":{"operationId":"v1-list-all-organizations","summary":"List all organizations","description":"Returns a list of organizations that you currently belong to.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationResponseV1"}}}}},"500":{"description":"Unexpected error listing organizations"}},"tags":["Organizations"],"security":[{"bearer":[]}]},"post":{"operationId":"v1-create-an-organization","summary":"Create an organization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationBodyV1"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseV1"}}}},"500":{"description":"Unexpected error creating an organization"}},"tags":["Organizations"],"security":[{"bearer":[]}]}},"/v1/oauth/authorize":{"get":{"operationId":"v1-authorize-user","summary":"[Beta] Authorize user through oauth","parameters":[{"name":"client_id","required":true,"in":"query","schema":{"type":"string"}},{"name":"response_type","required":true,"in":"query","schema":{"enum":["code","token","id_token token"],"type":"string"}},{"name":"redirect_uri","required":true,"in":"query","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","schema":{"type":"string"}},{"name":"state","required":false,"in":"query","schema":{"type":"string"}},{"name":"response_mode","required":false,"in":"query","schema":{"type":"string"}},{"name":"code_challenge","required":false,"in":"query","schema":{"type":"string"}},{"name":"code_challenge_method","required":false,"in":"query","schema":{"enum":["plain","sha256","S256"],"type":"string"}}],"responses":{"303":{"description":""}},"tags":["OAuth"],"security":[{"oauth2":["read"]}]}},"/v1/oauth/token":{"post":{"operationId":"v1-exchange-oauth-token","summary":"[BeLine truncated
@@ -1586,7 +1586,121 @@
"type": "string"
},
"data": {
"type": "object"
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object"
}
},
"messages": {
"type": "array",
"items": {
"type": "object"
}
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"hostname": {
"type": "string"
},
"ssl": {
"type": "object",
"properties": {
"status": {
"required": true,
"type": "string"
},
"validation_records": {
"required": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"txt_name": {
"type": "string"
},
"txt_value": {
"type": "string"
}
},
"required": [
"txt_name",
"txt_value"
]
}
},
"validation_errors": {
"required": false,
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}
}
}
},
"ownership_verification": {
"type": "object",
"properties": {
"type": {
"required": true,
"type": "string"
},
"name": {
"required": true,
"type": "string"
},
"value": {
"required": true,
"type": "string"
}
}
},
"custom_origin_server": {
"type": "string"
},
"verification_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
},
"required": [
"id",
"hostname",
"ssl",
"ownership_verification",
"custom_origin_server",
"status"
]
}
},
"required": [
"success",
"errors",
"messages",
"result"
]
}
},
"required": [
@@ -1708,7 +1822,121 @@
"type": "string"
},
"data": {
"type": "object"
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object"
}
},
"messages": {
"type": "array",
"items": {
"type": "object"
}
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"hostname": {
"type": "string"
},
"ssl": {
"type": "object",
"properties": {
"status": {
"required": true,
"type": "string"
},
"validation_records": {
"required": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"txt_name": {
"type": "string"
},
"txt_value": {
"type": "string"
}
},
"required": [
"txt_name",
"txt_value"
]
}
},
"validation_errors": {
"required": false,
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}
}
}
},
"ownership_verification": {
"type": "object",
"properties": {
"type": {
"required": true,
"type": "string"
},
"name": {
"required": true,
"type": "string"
},
"value": {
"required": true,
"type": "string"
}
}
},
"custom_origin_server": {
"type": "string"
},
"verification_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
},
"required": [
"id",
"hostname",
"ssl",
"ownership_verification",
"custom_origin_server",
"status"
]
}
},
"required": [
"success",
"errors",
"messages",
"result"
]
}
},
"required": [
@@ -1776,7 +2004,121 @@
"type": "string"
},
"data": {
"type": "object"
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object"
}
},
"messages": {
"type": "array",
"items": {
"type": "object"
}
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"hostname": {
"type": "string"
},
"ssl": {
"type": "object",
"properties": {
"status": {
"required": true,
"type": "string"
},
"validation_records": {
"required": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"txt_name": {
"type": "string"
},
"txt_value": {
"type": "string"
}
},
"required": [
"txt_name",
"txt_value"
]
}
},
"validation_errors": {
"required": false,
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}
}
}
},
"ownership_verification": {
"type": "object",
"properties": {
"type": {
"required": true,
"type": "string"
},
"name": {
"required": true,
"type": "string"
},
"value": {
"required": true,
"type": "string"
}
}
},
"custom_origin_server": {
"type": "string"
},
"verification_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
},
"required": [
"id",
"hostname",
"ssl",
"ownership_verification",
"custom_origin_server",
"status"
]
}
},
"required": [
"success",
"errors",
"messages",
"result"
]
}
},
"required": [
@@ -1844,7 +2186,121 @@
"type": "string"
},
"data": {
"type": "object"
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object"
}
},
"messages": {
"type": "array",
"items": {
"type": "object"
}
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"hostname": {
"type": "string"
},
"ssl": {
"type": "object",
"properties": {
"status": {
"required": true,
"type": "string"
},
"validation_records": {
"required": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"txt_name": {
"type": "string"
},
"txt_value": {
"type": "string"
}
},
"required": [
"txt_name",
"txt_value"
]
}
},
"validation_errors": {
"required": false,
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}
}
}
},
"ownership_verification": {
"type": "object",
"properties": {
"type": {
"required": true,
"type": "string"
},
"name": {
"required": true,
"type": "string"
},
"value": {
"required": true,
"type": "string"
}
}
},
"custom_origin_server": {
"type": "string"
},
"verification_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
},
"required": [
"id",
"hostname",
"ssl",
"ownership_verification",
"custom_origin_server",
"status"
]
}
},
"required": [
"success",
"errors",
"messages",
"result"
]
}
},
"required": [
@@ -3406,6 +3862,9 @@
"initiated_at": {
"type": "string"
},
"latest_status_at": {
"type": "string"
},
"target_version": {
"type": "number"
},
@@ -3450,6 +3909,7 @@
},
"required": [
"initiated_at",
"latest_status_at",
"target_version",
"status"
]
@@ -9834,6 +10294,240 @@
"branch_name"
]
},
"ValidationRecord": {
"type": "object",
"properties": {
"txt_name": {
"type": "string"
},
"txt_value": {
"type": "string"
}
},
"required": [
"txt_name",
"txt_value"
]
},
"ValidationError": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"CustomHostnameDetails": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"hostname": {
"type": "string"
},
"ssl": {
"type": "object",
"properties": {
"status": {
"required": true,
"type": "string"
},
"validation_records": {
"required": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"txt_name": {
"type": "string"
},
"txt_value": {
"type": "string"
}
},
"required": [
"txt_name",
"txt_value"
]
}
},
"validation_errors": {
"required": false,
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}
}
}
},
"ownership_verification": {
"type": "object",
"properties": {
"type": {
"required": true,
"type": "string"
},
"name": {
"required": true,
"type": "string"
},
"value": {
"required": true,
"type": "string"
}
}
},
"custom_origin_server": {
"type": "string"
},
"verification_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
},
"required": [
"id",
"hostname",
"ssl",
"ownership_verification",
"custom_origin_server",
"status"
]
},
"CfResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object"
}
},
"messages": {
"type": "array",
"items": {
"type": "object"
}
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"hostname": {
"type": "string"
},
"ssl": {
"type": "object",
"properties": {
"status": {
"required": true,
"type": "string"
},
"validation_records": {
"required": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"txt_name": {
"type": "string"
},
"txt_value": {
"type": "string"
}
},
"required": [
"txt_name",
"txt_value"
]
}
},
"validation_errors": {
"required": false,
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}
}
}
},
"ownership_verification": {
"type": "object",
"properties": {
"type": {
"required": true,
"type": "string"
},
"name": {
"required": true,
"type": "string"
},
"value": {
"required": true,
"type": "string"
}
}
},
"custom_origin_server": {
"type": "string"
},
"verification_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
},
"required": [
"id",
"hostname",
"ssl",
"ownership_verification",
"custom_origin_server",
"status"
]
}
},
"required": [
"success",
"errors",
"messages",
"result"
]
},
"UpdateCustomHostnameResponse": {
"type": "object",
"properties": {
@@ -9851,7 +10545,121 @@
"type": "string"
},
"data": {
"type": "object"
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object"
}
},
"messages": {
"type": "array",
"items": {
"type": "object"
}
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"hostname": {
"type": "string"
},
"ssl": {
"type": "object",
"properties": {
"status": {
"required": true,
"type": "string"
},
"validation_records": {
"required": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"txt_name": {
"type": "string"
},
"txt_value": {
"type": "string"
}
},
"required": [
"txt_name",
"txt_value"
]
}
},
"validation_errors": {
"required": false,
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
}
}
}
},
"ownership_verification": {
"type": "object",
"properties": {
"type": {
"required": true,
"type": "string"
},
"name": {
"required": true,
"type": "string"
},
"value": {
"required": true,
"type": "string"
}
}
},
"custom_origin_server": {
"type": "string"
},
"verification_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
},
"required": [
"id",
"hostname",
"ssl",
"ownership_verification",
"custom_origin_server",
"status"
]
}
},
"required": [
"success",
"errors",
"messages",
"result"
]
}
},
"required": [
@@ -10346,6 +11154,9 @@
"initiated_at": {
"type": "string"
},
"latest_status_at": {
"type": "string"
},
"target_version": {
"type": "number"
},
@@ -10390,6 +11201,7 @@
},
"required": [
"initiated_at",
"latest_status_at",
"target_version",
"status"
]
@@ -10406,6 +11218,9 @@
"initiated_at": {
"type": "string"
},
"latest_status_at": {
"type": "string"
},
"target_version": {
"type": "number"
},
@@ -10450,6 +11265,7 @@
},
"required": [
"initiated_at",
"latest_status_at",
"target_version",
"status"
]