OpenAPI
Upload, access, or version-control your OpenAPI specifications directly in GitBook.
The OpenAPI endpoints let you integrate your existing or newly generated OpenAPI definitions into GitBook. This includes uploading, updating, and retrieving specs.
Attributes
objectstring · enumRequiredPossible values:
The object type, which is always "openapi-spec"
idstringRequired
Unique identifier
createdAtstring · date-timeRequired
Date of creation
updatedAtstring · date-timeRequired
Date of the last update
slugstring · min: 1 · max: 100RequiredPattern:
Slug used as reference
^[a-z0-9]+(?:-[a-z0-9]+)*$
sourceURLstring · uri · max: 2048Optional
processingStateundefined · enumRequiredPossible values:
Processing state
lastVersionstringOptional
ID of the latest version of the OpenAPI specification
lastProcessedAtstring · date-timeOptional
Date of the last processing
lastProcessErrorCodeundefined · enumOptionalPossible values:
OpenAPI processing error code
The OpenAPISpec object
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
Query parameters
pagestringOptional
Identifier of the page results to fetch.
limitnumber · max: 1000Optional
The number of results per page
Responses
200
OK
application/json
Responseall of
get
200
OK
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
Body
slugstring · min: 1 · max: 100RequiredPattern:
Slug used as reference
^[a-z0-9]+(?:-[a-z0-9]+)*$
sourceone ofRequired
or
Responses
201
OpenAPI specification has been created
application/json
400
Bad Request
application/json
post
Authorizations
Path parameters
organizationIdstringRequired
The unique id of the organization
specSlugstringRequired
Slug of the OpenAPI specification
Body
sourceone ofRequired
or
Responses
200
OpenAPI specification has been updated
application/json
201
OpenAPI specification has been created
application/json
400
Bad Request
application/json
put
Was this helpful?