Python
from openlayer import Openlayer
client = Openlayer()
projects = client.governance.frameworks.list_projects("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
for project in projects.items:
print(project.id, project.name)import Openlayer from 'openlayer';
const client = new Openlayer();
const projects = await client.governance.frameworks.listProjects('5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b');
console.log(projects.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
projects, err := client.Governance.Frameworks.ListProjects(
context.TODO(),
"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
openlayer.GovernanceFrameworkListProjectsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", projects.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.governance.frameworks.FrameworkListProjectsResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
FrameworkListProjectsResponse projects = client.governance().frameworks().listProjects("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b");
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
projects = openlayer.governance.frameworks.list_projects("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
puts(projects)
curl --request GET \
--url https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/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",
"source": "web",
"taskType": "llm-base",
"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>"
}Governance
List a framework's projects
List the projects a framework applies to.
Python
from openlayer import Openlayer
client = Openlayer()
projects = client.governance.frameworks.list_projects("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
for project in projects.items:
print(project.id, project.name)import Openlayer from 'openlayer';
const client = new Openlayer();
const projects = await client.governance.frameworks.listProjects('5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b');
console.log(projects.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
projects, err := client.Governance.Frameworks.ListProjects(
context.TODO(),
"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
openlayer.GovernanceFrameworkListProjectsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", projects.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.governance.frameworks.FrameworkListProjectsResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
FrameworkListProjectsResponse projects = client.governance().frameworks().listProjects("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b");
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
projects = openlayer.governance.frameworks.list_projects("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
puts(projects)
curl --request GET \
--url https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/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",
"source": "web",
"taskType": "llm-base",
"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.
Path Parameters
The framework id.
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 <= 100Response
Status OK.
Show child attributes
Show child attributes
Was this page helpful?