Python
from openlayer import Openlayer
client = Openlayer()
commits = client.projects.commits.list("3fa85f64-5717-4562-b3fc-2c963f66afa6")
for commit in commits.items:
print(commit.id, commit.commit.message)import Openlayer from 'openlayer';
const client = new Openlayer();
const commits = await client.projects.commits.list('3fa85f64-5717-4562-b3fc-2c963f66afa6');
console.log(commits.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
commits, err := client.Projects.Commits.List(
context.TODO(),
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
openlayer.ProjectCommitListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", commits.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.projects.commits.CommitListResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
CommitListResponse commits = client.projects().commits().list("3fa85f64-5717-4562-b3fc-2c963f66afa6");
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
commits = openlayer.projects.commits.list("3fa85f64-5717-4562-b3fc-2c963f66afa6")
puts(commits)
curl --request GET \
--url https://api.openlayer.com/v1/projects/{projectId}/versions \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"dateCreated": "2024-03-22T11:31:01.185Z",
"status": "completed",
"statusMessage": "Commit successfully processed.",
"projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"commit": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"authorId": "589ece63-49a2-41b4-98e1-10547761d4b0",
"fileSize": 1024,
"message": "Updated the prompt.",
"mlModelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validationDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"trainingDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"storageUri": "s3://...",
"dateCreated": "2024-03-22T11:31:01.185Z",
"gitCommitSha": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"gitCommitRef": "main",
"gitCommitUrl": "<string>"
},
"mlModelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validationDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"trainingDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"dateArchived": "2024-03-22T11:31:01.185Z",
"passingGoalCount": 5,
"failingGoalCount": 1,
"totalGoalCount": 6,
"deploymentStatus": "Deployed",
"archived": false,
"links": {
"app": "https://app.openlayer.com/myWorkspace/3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
]
}{
"code": 123,
"error": "<string>"
}Development
List project commits
List the commits (project versions) in a project.
Python
from openlayer import Openlayer
client = Openlayer()
commits = client.projects.commits.list("3fa85f64-5717-4562-b3fc-2c963f66afa6")
for commit in commits.items:
print(commit.id, commit.commit.message)import Openlayer from 'openlayer';
const client = new Openlayer();
const commits = await client.projects.commits.list('3fa85f64-5717-4562-b3fc-2c963f66afa6');
console.log(commits.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
commits, err := client.Projects.Commits.List(
context.TODO(),
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
openlayer.ProjectCommitListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", commits.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.projects.commits.CommitListResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
CommitListResponse commits = client.projects().commits().list("3fa85f64-5717-4562-b3fc-2c963f66afa6");
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
commits = openlayer.projects.commits.list("3fa85f64-5717-4562-b3fc-2c963f66afa6")
puts(commits)
curl --request GET \
--url https://api.openlayer.com/v1/projects/{projectId}/versions \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"dateCreated": "2024-03-22T11:31:01.185Z",
"status": "completed",
"statusMessage": "Commit successfully processed.",
"projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"commit": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"authorId": "589ece63-49a2-41b4-98e1-10547761d4b0",
"fileSize": 1024,
"message": "Updated the prompt.",
"mlModelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validationDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"trainingDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"storageUri": "s3://...",
"dateCreated": "2024-03-22T11:31:01.185Z",
"gitCommitSha": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"gitCommitRef": "main",
"gitCommitUrl": "<string>"
},
"mlModelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"validationDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"trainingDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"dateArchived": "2024-03-22T11:31:01.185Z",
"passingGoalCount": 5,
"failingGoalCount": 1,
"totalGoalCount": 6,
"deploymentStatus": "Deployed",
"archived": false,
"links": {
"app": "https://app.openlayer.com/myWorkspace/3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
]
}{
"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 project 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?