Skip to main content
POST
/
testing
/
builds
Create a CI build
curl --request POST \
  --url https://api-v2.autoblocks.ai/testing/builds \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "gitProvider": "github",
  "repositoryName": "autoblocks/example-repo",
  "repositoryHtmlUrl": "https://github.com/autoblocks/example-repo",
  "branchName": "main",
  "isDefaultBranch": true,
  "ciProvider": "github",
  "buildHtmlUrl": "https://github.com/autoblocks/example-repo/actions/runs/123456789",
  "commitSha": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
  "commitMessage": "feat: add new feature",
  "commitCommitterName": "John Doe",
  "commitCommitterEmail": "john.doe@example.com",
  "commitAuthorName": "Jane Smith",
  "commitAuthorEmail": "jane.smith@example.com",
  "commitCommittedDate": "2024-03-20T15:30:00Z",
  "pullRequestNumber": 42,
  "pullRequestTitle": "Add new feature",
  "workflowId": "123456",
  "workflowName": "CI",
  "workflowRunNumber": 1,
  "jobName": "build-and-test",
  "autoblocksOverrides": {
    "promptRevisions": {
      "prompt-1": "rev-1",
      "prompt-2": "rev-2"
    },
    "configRevisions": {
      "config-1": "rev-1",
      "config-2": "rev-2"
    }
  }
}'
{
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

API Key created in the Autoblocks Webapp

Body

application/json

Create a CI build

gitProvider
enum<string>
required
Available options:
github
repositoryName
string
required
repositoryHtmlUrl
string
required
branchName
string
required
isDefaultBranch
boolean
required
ciProvider
enum<string>
required
Available options:
github,
codefresh
buildHtmlUrl
string
required
commitSha
string
required
commitMessage
string
required
commitCommitterName
string
required
commitAuthorName
string
required
commitCommittedDate
string<date-time>
required
commitCommitterEmail
string | null
commitAuthorEmail
string | null
pullRequestNumber
number | null
pullRequestTitle
string | null
workflowId
string | null
workflowName
string | null
workflowRunNumber
number | null
jobName
string | null
autoblocksOverrides
object | null

Response

200 - application/json

The CI build was created successfully

id
string
required
I