openapi: 3.1.0 info: title: APIGen Connectors Projects 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: Projects description: Manage API generation projects. paths: /projects: get: operationId: listProjects summary: APIGen List Projects description: Returns a paginated list of projects for the authenticated user. tags: - Projects parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: A list of projects. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Project' total: type: integer '401': $ref: '#/components/responses/Unauthorized' post: operationId: createProject summary: APIGen Create a Project description: Creates a new API generation project. tags: - Projects requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProjectInput' responses: '201': description: Project created. content: application/json: schema: $ref: '#/components/schemas/Project' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /projects/{projectId}: get: operationId: getProject summary: APIGen Get a Project description: Returns a single project by ID. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' responses: '200': description: A project. content: application/json: schema: $ref: '#/components/schemas/Project' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateProject summary: APIGen Update a Project description: Updates an existing project. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProjectInput' responses: '200': description: Project updated. content: application/json: schema: $ref: '#/components/schemas/Project' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationError' delete: operationId: deleteProject summary: APIGen Delete a Project description: Deletes a project and all associated resources. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' responses: '204': description: Project deleted. '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /projects/{projectId}/apis: get: operationId: listApis summary: APIGen List APIs in a Project description: Returns all APIs belonging to a project. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: A list of APIs. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Api' total: type: integer '401': $ref: '#/components/responses/Unauthorized' post: operationId: createApi summary: APIGen Create an API description: Creates a new API within a project. You can provide a prompt for AI-powered generation or supply an existing OpenAPI specification. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ApiInput' responses: '201': description: API created. content: application/json: schema: $ref: '#/components/schemas/Api' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /projects/{projectId}/apis/{apiId}: get: operationId: getApi summary: APIGen Get an API description: Returns a single API by ID. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/ApiId' responses: '200': description: An API. content: application/json: schema: $ref: '#/components/schemas/Api' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateApi summary: APIGen Update an API description: Updates an existing API definition. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/ApiId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ApiInput' responses: '200': description: API updated. content: application/json: schema: $ref: '#/components/schemas/Api' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/ValidationError' delete: operationId: deleteApi summary: APIGen Delete an API description: Deletes an API and its endpoints. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/ApiId' responses: '204': description: API 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' 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 Limit: name: limit in: query schema: type: integer default: 20 maximum: 100 Offset: name: offset in: query schema: type: integer default: 0 schemas: ApiInput: type: object properties: name: type: string minLength: 1 maxLength: 255 description: type: string version: type: string prompt: type: string description: Natural language prompt for AI-powered API generation. specUrl: type: string format: uri description: URL to an existing OpenAPI specification to import. required: - name ProjectInput: type: object properties: name: type: string minLength: 1 maxLength: 255 description: type: string required: - name Project: type: object properties: id: type: string format: uuid name: type: string description: type: string status: type: string enum: - active - archived createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - id - name - status - createdAt - updatedAt Api: type: object properties: id: type: string format: uuid projectId: type: string format: uuid name: type: string description: type: string version: type: string generationSource: type: string enum: - prompt - spec - manual status: type: string enum: - draft - generated - published createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - id - projectId - name - version - status - 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 securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT apiKey: type: apiKey in: header name: X-API-Key