APIGen Endpoints API

Define and manage API endpoints.

OpenAPI Specification

apigen-endpoints-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: APIGen Connectors Endpoints API
  description: The APIGen API provides programmatic access to the APIGen AI-powered API generation platform. It allows you to manage projects, design and generate APIs, define endpoints and schemas, configure connectors to external data sources, deploy APIs to various environments, run automated tests, and manage users and API tokens.
  version: 1.0.0
  contact:
    name: APIGen Support
    url: https://www.apigen.com/support
    email: support@apigen.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://api.apigen.com/v1
  description: Production
security:
- bearerAuth: []
- apiKey: []
tags:
- name: Endpoints
  description: Define and manage API endpoints.
paths:
  /projects/{projectId}/apis/{apiId}/endpoints:
    get:
      operationId: listEndpoints
      summary: APIGen List Endpoints
      description: Returns all endpoints for an API.
      tags:
      - Endpoints
      parameters:
      - $ref: '#/components/parameters/ProjectId'
      - $ref: '#/components/parameters/ApiId'
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: A list of endpoints.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Endpoint'
                  total:
                    type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createEndpoint
      summary: APIGen Create an Endpoint
      description: Creates a new endpoint for an API.
      tags:
      - Endpoints
      parameters:
      - $ref: '#/components/parameters/ProjectId'
      - $ref: '#/components/parameters/ApiId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndpointInput'
      responses:
        '201':
          description: Endpoint created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Endpoint'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /projects/{projectId}/apis/{apiId}/endpoints/{endpointId}:
    get:
      operationId: getEndpoint
      summary: APIGen Get an Endpoint
      description: Returns a single endpoint by ID.
      tags:
      - Endpoints
      parameters:
      - $ref: '#/components/parameters/ProjectId'
      - $ref: '#/components/parameters/ApiId'
      - $ref: '#/components/parameters/EndpointId'
      responses:
        '200':
          description: An endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Endpoint'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateEndpoint
      summary: APIGen Update an Endpoint
      description: Updates an existing endpoint.
      tags:
      - Endpoints
      parameters:
      - $ref: '#/components/parameters/ProjectId'
      - $ref: '#/components/parameters/ApiId'
      - $ref: '#/components/parameters/EndpointId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndpointInput'
      responses:
        '200':
          description: Endpoint updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Endpoint'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
    delete:
      operationId: deleteEndpoint
      summary: APIGen Delete an Endpoint
      description: Deletes an endpoint.
      tags:
      - Endpoints
      parameters:
      - $ref: '#/components/parameters/ProjectId'
      - $ref: '#/components/parameters/ApiId'
      - $ref: '#/components/parameters/EndpointId'
      responses:
        '204':
          description: Endpoint deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Endpoint:
      type: object
      properties:
        id:
          type: string
          format: uuid
        apiId:
          type: string
          format: uuid
        path:
          type: string
        method:
          type: string
          enum:
          - GET
          - POST
          - PUT
          - PATCH
          - DELETE
        summary:
          type: string
        description:
          type: string
        requestSchema:
          type: object
        responseSchema:
          type: object
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - apiId
      - path
      - method
      - createdAt
      - updatedAt
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
    EndpointInput:
      type: object
      properties:
        path:
          type: string
        method:
          type: string
          enum:
          - GET
          - POST
          - PUT
          - PATCH
          - DELETE
        summary:
          type: string
        description:
          type: string
        requestSchema:
          type: object
        responseSchema:
          type: object
      required:
      - path
      - method
  parameters:
    ApiId:
      name: apiId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    ProjectId:
      name: projectId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    EndpointId:
      name: endpointId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        default: 20
        maximum: 100
    Offset:
      name: offset
      in: query
      schema:
        type: integer
        default: 0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key