from openlayer import Openlayer

client = Openlayer()
client.projects.commits.create(
  project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  commit={"message": "Updated the prompt"},
  storage_uri="s3://..."
)
{
  "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",
    "dateCreated": "2024-03-22T11:31:01.185Z",
    "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://...",
    "gitCommitSha": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "gitCommitRef": "main",
    "gitCommitUrl": "<string>"
  },
  "deploymentStatus": "Deployed",
  "mlModelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "validationDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "trainingDatasetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "archived": false,
  "dateArchived": "2024-03-22T11:31:01.185Z",
  "passingGoalCount": 5,
  "failingGoalCount": 1,
  "totalGoalCount": 6,
  "links": {
    "app": "https://app.openlayer.com/myWorkspace/3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}

Authorizations

Authorization
string
header
required

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

projectId
string
required

The project id.

Body

application/json
projectId
any
required
storageUri
string
required

The storage URI where the commit bundle is stored.

commit
object
required

The details of a commit (project version).

deploymentStatus
string

The deployment status associated with the commit's model.

Maximum length: 30
archived
boolean | null

Whether the commit is archived.

Response

201
application/json
Status OK.
id
string
required

The project version (commit) id.

dateCreated
string
required

The project version (commit) creation date.

status
enum<string>
required

The commit status. Initially, the commit is queued, then, it switches to running. Finally, it can be paused, failed, or completed.

Available options:
queued,
running,
paused,
failed,
completed,
unknown
statusMessage
string | null
required

The commit status message.

projectId
any
required
commit
object
required

The details of a commit (project version).

mlModelId
string | null
required

The model id.

validationDatasetId
string | null
required

The validation dataset id.

trainingDatasetId
string | null
required

The training dataset id.

dateArchived
string | null
required

The commit archive date.

passingGoalCount
integer
required

The number of tests that are passing for the commit.

Required range: x > 0
failingGoalCount
integer
required

The number of tests that are failing for the commit.

Required range: x > 0
totalGoalCount
integer
required

The total number of tests for the commit.

Required range: x > 0
deploymentStatus
string

The deployment status associated with the commit's model.

Maximum length: 30
archived
boolean | null

Whether the commit is archived.