openapi: 3.1.0 info: title: DeveloperHub.io Documentation Pages API description: 'REST API for the DeveloperHub.io developer documentation platform. Programmatically manage documentation projects, pages, versions, API references, reader access, and audit data. Authentication uses an X-Api-Key header generated from the DeveloperHub platform. ' version: 1.0.0 contact: name: DeveloperHub url: https://docs.developerhub.io servers: - url: https://api.developerhub.io/api/v1 description: DeveloperHub API v1 security: - ApiKeyAuth: [] tags: - name: Pages paths: /documentation/{id}/page: post: summary: Create a page operationId: createPage tags: - Pages parameters: - name: id in: path required: true schema: type: string description: Documentation (section) ID requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PageCreate' responses: '200': description: Page created content: application/json: schema: $ref: '#/components/schemas/Page' /page: get: summary: Retrieve page by slug operationId: getPageBySlug tags: - Pages parameters: - name: slug in: query required: true schema: type: string responses: '200': description: Page content: application/json: schema: $ref: '#/components/schemas/Page' /page/{id}: get: summary: Read page details operationId: getPage tags: - Pages parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: Page content: application/json: schema: $ref: '#/components/schemas/Page' put: summary: Update a page operationId: updatePage tags: - Pages parameters: - $ref: '#/components/parameters/IdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PageUpdate' responses: '200': description: Updated page content: application/json: schema: $ref: '#/components/schemas/Page' delete: summary: Delete a page operationId: deletePage tags: - Pages parameters: - $ref: '#/components/parameters/IdPath' responses: '204': description: Deleted /page/{id}/publish: put: summary: Publish a page operationId: publishPage tags: - Pages parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: Published components: schemas: PageUpdate: type: object properties: title: type: string slug: type: string content: type: string PageCreate: type: object required: - title properties: title: type: string slug: type: string content: type: string Page: type: object properties: id: type: string slug: type: string title: type: string content: type: string status: type: string enum: - draft - published versionId: type: string documentationId: type: string parameters: IdPath: name: id in: path required: true schema: type: string securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-Api-Key