mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-02 02:26:57 +00:00
Merge pull request #12769 from nocodb/docs/swagger-30dec-2
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
"Fields",
|
||||
"View Filters",
|
||||
"View Sorts",
|
||||
"Scripts"
|
||||
"Scripts",
|
||||
"API Tokens"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -5601,6 +5602,166 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v3/meta/tokens": {
|
||||
"get": {
|
||||
"summary": "List API tokens",
|
||||
"description": "Retrieve a list of all API tokens for the organization.\n\n**Note**: \nAPI Token APIs are available only with self-hosted **Enterprise** plans and cloud-hosted **Enterprise** plans.\n> **Beta**: These APIs are currently in beta and subject to change in future releases.",
|
||||
"tags": [
|
||||
"API Tokens"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"xc-token": []
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of API tokens",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ApiTokenV3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/UnauthorizedV3"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/ForbiddenV3"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalServerErrorV3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"summary": "Create API token",
|
||||
"description": "Create a new API token for the organization.\n\n**Note**: API Token APIs are available only with self-hosted **Enterprise** plans and cloud-hosted **Enterprise** plans.\n> **Beta**: These APIs are currently in beta and subject to change in future releases.",
|
||||
"tags": [
|
||||
"API Tokens"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"xc-token": []
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"title"
|
||||
],
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "Title / description for the API token",
|
||||
"example": "Github Integration"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Created API token",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiTokenWithTokenV3"
|
||||
},
|
||||
"examples": {
|
||||
"created": {
|
||||
"value": {
|
||||
"id": 5,
|
||||
"title": "Github Integration",
|
||||
"token": "wxAFzFO2wwOf9ozVRjragBJ7KPWMaW2OGpklGqHh",
|
||||
"created_at": "2025-12-30 15:17:24+00:00",
|
||||
"updated_at": "2025-12-30 15:17:24+00:00"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequestV3"
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/UnauthorizedV3"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/ForbiddenV3"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalServerErrorV3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v3/meta/tokens/{tokenId}": {
|
||||
"delete": {
|
||||
"summary": "Delete API token",
|
||||
"description": "Delete an API token by its ID.\n\n**Note**: API Token APIs are available only with self-hosted **Enterprise** plans and cloud-hosted **Enterprise** plans.\n> **Beta**: These APIs are currently in beta and subject to change in future releases.",
|
||||
"tags": [
|
||||
"API Tokens"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"xc-token": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"description": "ID of the API token to delete",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"example": "5"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Deleted API token",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiTokenV3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/UnauthorizedV3"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/ForbiddenV3"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFoundV3"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalServerErrorV3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -10592,6 +10753,59 @@
|
||||
"created_at",
|
||||
"updated_at"
|
||||
]
|
||||
},
|
||||
"ApiTokenV3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "Token ID",
|
||||
"example": 5
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "Token title / description",
|
||||
"example": "Github Integration"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Token creation timestamp",
|
||||
"example": "2025-12-30 15:17:24+00:00"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Token last update timestamp",
|
||||
"example": "2025-12-30 15:17:24+00:00"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"created_at",
|
||||
"updated_at"
|
||||
]
|
||||
},
|
||||
"ApiTokenWithTokenV3": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ApiTokenV3"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string",
|
||||
"description": "The actual API token value (only returned on creation)",
|
||||
"example": "wxAFzFO2wwOf9ozVRjragBJ7KPWMaW2OGpklGqHh"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"token"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
@@ -10626,6 +10840,62 @@
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"BadRequestV3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UnauthorizedV3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ForbiddenV3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Accessing api token api require enterprise plan"
|
||||
}
|
||||
}
|
||||
},
|
||||
"NotFoundV3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"InternalServerErrorV3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
"xc-token": {
|
||||
"name": "Auth Token ",
|
||||
@@ -10664,4 +10934,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user