Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

4.0 KB
Raw Blame
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json
imports:
  commons: ./commons.yml
  pagination: ./utils/pagination.yml

service:
  auth: true
  base-path: /api/public
  endpoints:
    getOrganizationMemberships:
      docs: Get all memberships for the organization associated with the API key (requires organization-scoped API key)
      method: GET
      path: /organizations/memberships
      response: MembershipsResponse

    updateOrganizationMembership:
      docs: Create or update a membership for the organization associated with the API key (requires organization-scoped API key)
      method: PUT
      path: /organizations/memberships
      request: MembershipRequest
      response: MembershipResponse

    deleteOrganizationMembership:
      docs: Delete a membership from the organization associated with the API key (requires organization-scoped API key)
      method: DELETE
      path: /organizations/memberships
      request: DeleteMembershipRequest
      response: MembershipDeletionResponse

    getProjectMemberships:
      docs: Get all memberships for a specific project (requires organization-scoped API key)
      method: GET
      path: /projects/{projectId}/memberships
      path-parameters:
        projectId: string
      response: MembershipsResponse

    updateProjectMembership:
      docs: Create or update a membership for a specific project (requires organization-scoped API key). The user must already be a member of the organization.
      method: PUT
      path: /projects/{projectId}/memberships
      path-parameters:
        projectId: string
      request: MembershipRequest
      response: MembershipResponse

    deleteProjectMembership:
      docs: Delete a membership from a specific project (requires organization-scoped API key). The user must be a member of the organization.
      method: DELETE
      path: /projects/{projectId}/memberships
      path-parameters:
        projectId: string
      request: DeleteMembershipRequest
      response: MembershipDeletionResponse

    getOrganizationProjects:
      docs: Get all projects for the organization associated with the API key (requires organization-scoped API key)
      method: GET
      path: /organizations/projects
      response: OrganizationProjectsResponse

    getOrganizationApiKeys:
      docs: Get all API keys for the organization associated with the API key (requires organization-scoped API key)
      method: GET
      path: /organizations/apiKeys
      response: OrganizationApiKeysResponse

types:
  MembershipRole:
    enum:
      - OWNER
      - ADMIN
      - MEMBER
      - VIEWER

  MembershipRequest:
    properties:
      userId: string
      role: MembershipRole

  DeleteMembershipRequest:
    properties:
      userId: string

  MembershipResponse:
    properties:
      userId: string
      role: MembershipRole
      email: string
      name: string

  MembershipDeletionResponse:
    properties:
      message: string
      userId: string

  MembershipsResponse:
    properties:
      memberships: list<MembershipResponse>

  OrganizationProject:
    properties:
      id: string
      name: string
      metadata: optional<map<string, unknown>>
      createdAt: datetime
      updatedAt: datetime

  OrganizationProjectsResponse:
    properties:
      projects: list<OrganizationProject>

  OrganizationApiKey:
    properties:
      id: string
      createdAt: datetime
      expiresAt:
        type: optional<datetime>
        docs: Expiration timestamp. Null if the key does not expire.
      lastUsedAt: optional<datetime>
      name:
        type: optional<nullable<string>>
        docs: Name of the API key. Contains the same value as note; null if no name was provided.
      note:
        type: optional<string>
        availability:
          status: deprecated
          message: Use name instead.
        docs: Deprecated alias for name. Contains the same value as name.
      publicKey: string
      displaySecretKey: string

  OrganizationApiKeysResponse:
    properties:
      apiKeys: list<OrganizationApiKey>