Ardent v1-projects API

The v1-projects API from Ardent — 2 operation(s) for v1-projects.

OpenAPI Specification

ardent-v1-projects-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  description: Public Ardent API. Generated by scripts/export_public_openapi.py — do not edit by hand.
  title: Ardent v1-api-keys v1-projects API
  version: v1
servers:
- url: https://api.tryardent.com
tags:
- name: v1-projects
paths:
  /v1/projects:
    get:
      operationId: list_projects_endpoint_v1_projects_get
      parameters:
      - in: query
        name: org_id
        required: true
        schema:
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - bearerAuth: []
      summary: List Projects Endpoint
      tags:
      - v1-projects
    post:
      operationId: create_project_endpoint_v1_projects_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectRow'
          description: The created project row.
        '409':
          description: A project with this name already exists.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - bearerAuth: []
      summary: Create Project Endpoint
      tags:
      - v1-projects
  /v1/projects/{project_id}:
    delete:
      operationId: delete_project_endpoint_v1_projects__project_id__delete
      parameters:
      - in: path
        name: project_id
        required: true
        schema:
          title: Project Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: 'Deleted. Body is `{"message": "Project deleted"}`.'
        '403':
          description: Not authorized to delete this project.
        '404':
          description: Project not found (or not visible to the caller).
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - bearerAuth: []
      summary: Delete Project Endpoint
      tags:
      - v1-projects
    get:
      operationId: get_project_endpoint_v1_projects__project_id__get
      parameters:
      - in: path
        name: project_id
        required: true
        schema:
          title: Project Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectRow'
          description: Successful Response
        '404':
          description: Project not found (or not visible to the caller).
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - bearerAuth: []
      summary: Get Project Endpoint
      tags:
      - v1-projects
    patch:
      operationId: update_project_endpoint_v1_projects__project_id__patch
      parameters:
      - in: path
        name: project_id
        required: true
        schema:
          title: Project Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectRow'
          description: The updated project row.
        '400':
          description: No fields to update.
        '404':
          description: Project not found (or not visible to the caller).
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - bearerAuth: []
      summary: Update Project Endpoint
      tags:
      - v1-projects
components:
  schemas:
    ProjectListResponse:
      properties:
        projects:
          description: Projects visible to the caller.
          items:
            $ref: '#/components/schemas/ProjectRow'
          title: Projects
          type: array
      required:
      - projects
      title: ProjectListResponse
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ProjectRow:
      additionalProperties: true
      properties:
        created_at:
          description: When the project was created.
          title: Created At
          type: string
        id:
          description: Project ID.
          title: Id
          type: string
        name:
          description: Project name.
          title: Name
          type: string
        org_id:
          description: Organization the project belongs to.
          title: Org Id
          type: string
      required:
      - id
      - org_id
      - name
      - created_at
      title: ProjectRow
      type: object
    CreateProjectRequest:
      properties:
        name:
          description: Project name (1-100 characters).
          maxLength: 100
          minLength: 1
          title: Name
          type: string
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Organization to create the project in. Inferred from your auth when omitted.
          title: Org Id
      required:
      - name
      title: CreateProjectRequest
      type: object
    UpdateProjectRequest:
      properties:
        name:
          anyOf:
          - maxLength: 100
            minLength: 1
            type: string
          - type: 'null'
          description: New project name (1-100 characters).
          title: Name
      title: UpdateProjectRequest
      type: object
  securitySchemes:
    bearerAuth:
      description: Ardent API key (sk-ard_live_… / sk-ard_test_…) or a dashboard session token.
      scheme: bearer
      type: http