Skip to main content

Get Tool OpenAPI Schema

Used to retrieve the OpenAPI schema for a specific tool. This generates a standard OpenAPI specification document that describes all the tool's actions, parameters, and responses.

API Endpoint

PropertyValue
Request MethodGET
Request URLhttps://api.seliseblocks.com/tools/{tool_id}/schema/openapi

Request

Request Example

curl -X GET 'https://api.seliseblocks.com/tools/{tool_id}/schema/openapi?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'

Path Parameters

FieldTypeRequiredDescription
tool_idstringYesThe unique identifier of the tool.

Query Parameters

FieldTypeRequiredDescription
project_keystringNoThe project key for your project.

Request Headers

FieldTypeRequiredDescription
acceptstringYesAccepted response format. Use application/json
note

OpenAPI Schema Generation

  • The schema is generated dynamically based on current tool configuration
  • Follows OpenAPI 3.0 specification standard
  • Includes all active actions and their parameters
  • Authentication details are included (credentials are excluded)
  • The schema can be used with standard OpenAPI tools
tip

Use cases for OpenAPI schema:

  • Generating client SDKs in various programming languages
  • Importing into API testing tools like Postman or Insomnia
  • Creating API documentation with tools like Swagger UI
  • Validating API requests and responses
  • Integrating with API gateway or management platforms
  • Sharing API specifications with external developers
  • Version control for API changes

The OpenAPI schema includes:

  • Complete endpoint definitions for all actions
  • Request parameter schemas with types and validation rules
  • Response schemas with expected formats
  • Authentication and security requirements
  • Server information and base URLs
  • Tags and categorization for actions

Response

Success Response (200 OK)

Returns the OpenAPI schema for the tool.

{
"tool_id": "tool_123",
"schema_type": "openapi",
"schema": {
"openapi": "3.0.0",
"info": {
"title": "Customer API",
"description": "API for managing customer data and interactions",
"version": "1.2.0"
},
"servers": [
{
"url": "https://api.example.com/v1",
"description": "Production server"
}
],
"paths": {
"/customers/{id}": {
"get": {
"summary": "Get Customer",
"description": "Retrieve customer information by ID",
"operationId": "get_customer",
"tags": ["Customers"],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "Customer ID"
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"customer_id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
]
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
}
},
"generated_at": "2026-01-12T07:46:20.316Z",
"actions_count": 15,
"project_key": "YOUR_PROJECT_KEY"
}

Response Fields

FieldTypeDescription
tool_idstringUnique identifier of the tool.
schema_typestringType of schema returned (always "openapi").
schemaobjectComplete OpenAPI specification document.
generated_atstringISO 8601 timestamp when the schema was generated.
actions_countintegerNumber of actions included in the schema.
project_keystringThe project key for the tool.

OpenAPI Schema Structure

The schema object follows the OpenAPI 3.0 specification and includes:

SectionDescription
openapiOpenAPI specification version (e.g., "3.0.0")
infoAPI metadata including title, description, and version
serversArray of server URLs where the API is hosted
pathsAll API endpoints with operations (GET, POST, etc.)
componentsReusable components including schemas and security schemes
tagsTags for organizing and categorizing operations
securityGlobal security requirements

Info Section Fields

FieldTypeDescription
titlestringDisplay name of the API.
descriptionstringDetailed description of the API.
versionstringCurrent version of the API.

Server Section Fields

FieldTypeDescription
urlstringBase URL for the API server.
descriptionstringDescription of the server (e.g., "Production", "Staging").

Path Operation Fields

Each operation in the paths section includes:

FieldTypeDescription
summarystringBrief summary of what the operation does.
descriptionstringDetailed description of the operation.
operationIdstringUnique identifier for the operation.
tagsarrayTags for categorization.
parametersarrayInput parameters for the operation.
requestBodyobjectRequest body schema (for POST/PUT/PATCH).
responsesobjectExpected responses with status codes.
securityarraySecurity requirements for this operation.

Error Response (422 Unprocessable Entity)

Returns validation error details when the request parameters are invalid.

{
"detail": [
{
"loc": [
"path",
"tool_id"
],
"msg": "tool not found",
"type": "value_error.notfound"
}
]
}

Error Response Fields

FieldTypeDescription
detailarrayArray of validation error objects.
locarrayLocation of the error in the request (e.g., path, query).
msgstringHuman-readable error message.
typestringError type identifier.

Error Codes

Status CodeDescriptionResponse Type
200Successful ResponseSuccess
400Bad Request - Invalid requestBad Request
404Not Found - Tool does not existNot Found
422Validation Error - Invalid request parametersUnprocessable Entity