Python
from openlayer import Openlayer
client = Openlayer()
client.projects.list()import Openlayer from 'openlayer';
const openlayer = new Openlayer();
await openlayer.projects.list();
package main
import (
"context"
"github.com/openlayer-ai/openlayer-go"
"github.com/openlayer-ai/openlayer-go/option"
)
client := openlayer.NewClient()
client.Projects.List(context.TODO(), openlayer.ProjectListParams{})
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.ProjectListParams;
import com.openlayer.api.models.ProjectListResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
ProjectListParams params = ProjectListParams.builder().build();
ProjectListResponse response = client.projects().list(params);
curl --request GET \
--url https://api.openlayer.com/v1/projects \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workspaceId": "055fddb1-261f-4654-8598-f6347ee46a09",
"creatorId": "589ece63-49a2-41b4-98e1-10547761d4b0",
"name": "My Project",
"dateCreated": "2024-03-22T11:31:01.185Z",
"dateUpdated": "2024-03-22T11:31:01.185Z",
"versionCount": 2,
"inferencePipelineCount": 1,
"goalCount": 10,
"developmentGoalCount": 5,
"monitoringGoalCount": 5,
"links": {
"app": "https://app.openlayer.com/myWorkspace/3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"description": "My project description.",
"purpose": "Answer customer billing questions.",
"modelTypes": [
"llm"
],
"modelDeveloper": "Acme AI",
"dataRetentionDays": 30,
"gitRepo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gitId": 123,
"dateConnected": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z",
"name": "<string>",
"private": true,
"slug": "<string>",
"url": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gitAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"branch": "<string>",
"rootDir": "<string>"
}
}
]
}{
"code": 123,
"error": "<string>"
}Projects
List projects
List your workspace’s projects.
Python
from openlayer import Openlayer
client = Openlayer()
client.projects.list()import Openlayer from 'openlayer';
const openlayer = new Openlayer();
await openlayer.projects.list();
package main
import (
"context"
"github.com/openlayer-ai/openlayer-go"
"github.com/openlayer-ai/openlayer-go/option"
)
client := openlayer.NewClient()
client.Projects.List(context.TODO(), openlayer.ProjectListParams{})
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.ProjectListParams;
import com.openlayer.api.models.ProjectListResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
ProjectListParams params = ProjectListParams.builder().build();
ProjectListResponse response = client.projects().list(params);
curl --request GET \
--url https://api.openlayer.com/v1/projects \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workspaceId": "055fddb1-261f-4654-8598-f6347ee46a09",
"creatorId": "589ece63-49a2-41b4-98e1-10547761d4b0",
"name": "My Project",
"dateCreated": "2024-03-22T11:31:01.185Z",
"dateUpdated": "2024-03-22T11:31:01.185Z",
"versionCount": 2,
"inferencePipelineCount": 1,
"goalCount": 10,
"developmentGoalCount": 5,
"monitoringGoalCount": 5,
"links": {
"app": "https://app.openlayer.com/myWorkspace/3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"description": "My project description.",
"purpose": "Answer customer billing questions.",
"modelTypes": [
"llm"
],
"modelDeveloper": "Acme AI",
"dataRetentionDays": 30,
"gitRepo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gitId": 123,
"dateConnected": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z",
"name": "<string>",
"private": true,
"slug": "<string>",
"url": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gitAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"branch": "<string>",
"rootDir": "<string>"
}
}
]
}{
"code": 123,
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.
Query Parameters
The page to return in a paginated query.
Required range:
x >= 1Maximum number of items to return per page.
Required range:
1 <= x <= 100Filter list of items by project name.
Filter list of items by task type.
Available options:
llm-base, tabular-classification, tabular-regression, text-classification Response
Status OK.
Show child attributes
Show child attributes
Was this page helpful?
⌘I

