openapi: 3.0.1 info: title: Openlayer Commits API description: The Openlayer REST API for AI evaluation, testing, and observability. Manage projects, commit model versions and datasets, run and evaluate tests, create inference pipelines for production monitoring, and stream production inference data into Openlayer. All requests are authenticated with a Bearer API key. termsOfService: https://www.openlayer.com/terms contact: name: Openlayer Support url: https://www.openlayer.com/docs email: support@openlayer.com version: '1.0' servers: - url: https://api.openlayer.com/v1 description: Openlayer production API security: - api_key: [] tags: - name: Commits description: Project versions (commits) and their test results. paths: /projects/{projectId}/versions: get: operationId: listCommits tags: - Commits summary: List project commits description: List the commits (versions) for a project. parameters: - $ref: '#/components/parameters/ProjectId' - name: page in: query required: false schema: type: integer default: 1 - name: perPage in: query required: false schema: type: integer default: 100 responses: '200': description: A paginated list of commits. content: application/json: schema: $ref: '#/components/schemas/CommitList' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createCommit tags: - Commits summary: Create a project commit description: Create a new commit (version) within a project. parameters: - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateCommitRequest' responses: '201': description: The created commit. content: application/json: schema: $ref: '#/components/schemas/Commit' '401': $ref: '#/components/responses/Unauthorized' /versions/{projectVersionId}: get: operationId: retrieveCommit tags: - Commits summary: Retrieve a commit description: Retrieve a single commit (project version) by its id. parameters: - $ref: '#/components/parameters/ProjectVersionId' responses: '200': description: The requested commit. content: application/json: schema: $ref: '#/components/schemas/Commit' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /versions/{projectVersionId}/results: get: operationId: listCommitTestResults tags: - Commits summary: List commit test results description: List the test results for a commit (project version). parameters: - $ref: '#/components/parameters/ProjectVersionId' - name: status in: query description: Filter by result status (running, passing, failing, error). required: false schema: type: string - name: type in: query required: false schema: type: string responses: '200': description: A list of test results. content: application/json: schema: $ref: '#/components/schemas/TestResultList' '401': $ref: '#/components/responses/Unauthorized' components: responses: Unauthorized: description: Authentication failed or the API key is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' parameters: ProjectId: name: projectId in: path required: true description: The unique identifier of the project. schema: type: string format: uuid ProjectVersionId: name: projectVersionId in: path required: true description: The unique identifier of the project version (commit). schema: type: string format: uuid schemas: Commit: type: object properties: id: type: string format: uuid projectId: type: string format: uuid status: type: string description: Commit status, e.g. queued, running, paused, failed, completed, unknown. statusMessage: type: string nullable: true commit: type: object properties: id: type: string authorId: type: string nullable: true message: type: string dateCreated: type: string format: date-time dateCreated: type: string format: date-time passingGoalCount: type: integer nullable: true failingGoalCount: type: integer nullable: true totalGoalCount: type: integer nullable: true links: type: object properties: app: type: string required: - id - projectId - status CommitList: type: object properties: items: type: array items: $ref: '#/components/schemas/Commit' TestResult: type: object properties: id: type: string format: uuid projectVersionId: type: string format: uuid nullable: true inferencePipelineId: type: string format: uuid nullable: true status: type: string description: Result status, e.g. running, passing, failing, skipped, error. statusMessage: type: string nullable: true dateCreated: type: string format: date-time dateUpdated: type: string format: date-time dateDataStarts: type: string format: date-time nullable: true dateDataEnds: type: string format: date-time nullable: true goal: $ref: '#/components/schemas/Test' goalId: type: string format: uuid nullable: true required: - id - status Test: type: object properties: id: type: string format: uuid projectVersionId: type: string format: uuid nullable: true name: type: string description: type: string nullable: true type: type: string description: The test type (integrity, consistency, performance). subtype: type: string nullable: true archived: type: boolean dateCreated: type: string format: date-time dateUpdated: type: string format: date-time creatorId: type: string format: uuid nullable: true usesMlModel: type: boolean nullable: true usesValidationDataset: type: boolean nullable: true usesTrainingDataset: type: boolean nullable: true usesProductionData: type: boolean nullable: true thresholds: type: array items: type: object properties: measurement: type: string operator: type: string value: oneOf: - type: number - type: string - type: boolean - type: array items: {} required: - id - name - type CreateCommitRequest: type: object properties: commit: type: object properties: message: type: string required: - message storageUri: type: string description: The storage URI (e.g. s3://...) where the committed bundle was uploaded. archived: type: boolean nullable: true deploymentStatus: type: string nullable: true required: - commit - storageUri TestResultList: type: object properties: items: type: array items: $ref: '#/components/schemas/TestResult' Error: type: object properties: code: type: string message: type: string required: - message securitySchemes: api_key: type: http scheme: bearer bearerFormat: apiKey description: Pass your Openlayer API key as a Bearer token in the Authorization header.