Projects

The endpoints managing project resources are located under the /projects path.

Project Object

A project is the top-level organizational unit in Composable Prompts. It contains all the interactions, environments, and execution runs associated with a specific project.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the project

  • Name
    name
    Type
    string
    Description

    Display name of the project.

  • Name
    account
    Type
    string
    Description

    The ID of the account (i.e. organization) which owns the project.

  • Name
    created_at
    Type
    Date
    Description

    Date and time when the project was created.

  • Name
    updated_at
    Type
    Date
    Description

    Date and time when the project was last updated.

Project

{
  "name": "Experiments",
  "account": "652d77895674c387e105948c",
  "created_at": "2023-11-10T09:37:34.067Z",
  "updated_at": "2023-11-10T09:37:34.067Z",
  "id": "654df9de09676ad3b8631dc3"
}

List projects
GET /projects

Get the list of projects in the current organziation.
The organization is determined by the token used to authenticate the request.

Parameters

No parameters.

Returns

A list of project references. A project reference is a subset of the project object.

Request

curl https://api.composableprompts.com/api/v1/projects \
  -H "Accept: application/json"
  -H "Authorization: Bearer {token}"

Response

[
  {
    "name": "Experiments",
    "account": "652d77895674c387e105948c",
    "members": [],
    "created_at": "2023-11-10T09:37:34.067Z",
    "updated_at": "2023-11-10T09:37:34.067Z",
    "id": "654df9de09676ad3b8631dc3"
  },
  {
    "name": "Documentation",
    "account": "652d77895674c387e105948c",
    "members": [],
    "created_at": "2023-11-08T14:25:18.059Z",
    "updated_at": "2023-11-08T14:25:18.059Z",
    "id": "654b9a4eab198fd8d8b7f8d2"
  },
  ...
]

Retrieve a project
GET /projects/:projectId

Get a project object given its ID.
The organization is determined by the token used to authenticate the request.

Parameters

No parameters.

Returns

A project object.

Request

curl https://api.composableprompts.com/api/v1/projects/654df9de09676ad3b8631dc3 \
  -H "Accept: application/json"
  -H "Authorization: Bearer {token}"

Response

{
  "name": "Experiments",
  "account": "652d77895674c387e105948c",
  "members": [],
  "created_at": "2023-11-10T09:37:34.067Z",
  "updated_at": "2023-11-10T09:37:34.067Z",
  "id": "654df9de09676ad3b8631dc3"
}

Was this page helpful?