CI Testing

These endpoints allow you to programmatically retrieve information about CI test runs and results.

GEThttps://api.autoblocks.ai/testing/ci/tests/<testExternalId>/runs

Get a list of CI test runs

This endpoint returns a list of all runs for a specific CI test.

Code samples for getting a list of CI test runs

GET
https://api.autoblocks.ai/testing/ci/tests/<testExternalId>/runs
curl 'https://api.autoblocks.ai/testing/ci/tests/<testExternalId>/runs' \
  --header "Authorization: Bearer $AUTOBLOCKS_API_KEY"
{
  "runs": [
    {
      "id": "cljzx8zhd00077w3sqredd0fz"
    },
    {
      "id": "cljzx8zhd00077w3sqredd0fz"
    }
  ]
}
GEThttps://api.autoblocks.ai/testing/ci/runs/<runId>/results

Get a list of CI test results

This endpoint returns a list of all results for a specific CI test run.

Code samples for getting a list of CI test results

GET
https://api.autoblocks.ai/testing/ci/runs/<runId>/results
curl 'https://api.autoblocks.ai/testing/ci/runs/<runId>/results' \
  --header "Authorization: Bearer $AUTOBLOCKS_API_KEY"
{
  "results": [
    {
      "id": "clvods6wq0003m44zc8sizv2l"
    },
    {
      "id": "cljzxfcxr00077w1yvis84a72"
    }
  ]
}
GEThttps://api.autoblocks.ai/testing/ci/results/<testCaseResultId>

Get a specific CI test result

This endpoint returns the details of a specific CI test result.

Code samples for getting a specific CI test result

GET
https://api.autoblocks.ai/testing/ci/results/<testCaseResultId>
curl 'https://api.autoblocks.ai/testing/ci/results/<testCaseResultId>' \
  --header "Authorization: Bearer $AUTOBLOCKS_API_KEY"
{
  "testCaseResult": {
    "id": "cllmhfrrj0000q5php84hn6os",
    "runId": "cljzx8zhd00077w3sqredd0fz",
    "hash": "def456ghi789",
    "datasetItemId": "cljzx8zhd00077w3sqredd0fz",
    "durationMs": 2000,
    "events": [
      {
        "id": "cljzxfcxr00077w1yvis84a72",
        "trace_id": "cljzx8zhd00077w3sqredd0fz",
        "message": "ci_test_start",
        "timestamp": 1636329600000,
        "properties" : {}
      },
    {
      "id": "cllmhfrrj0000q5php84hn6os",
      "trace_id": "cljzx8zhd00077w3sqredd0fz",
      "message": "ci_test_end",
      "timestamp": 1636329602000,
      "properties" : {}
    }
  ],
  "body": {
    // Result body content (type depends on the test case)
  },
  "output": {
    // Result output content (type depends on the test case)
  },
  "evaluations": [
    {
      "evaluatorId": "accuracy",
      "score": 0.88,
      "passed": true,
      "threshold": {
        "gte": 0.85
      },
      "assertions": [
        {
          "passed": true,
          "required": true,
          "criterion": "Test criterion",
          "metadata": {
            "notes": "Passed CI requirements"
          }
        },
      ],
      "metadata": {
        "notes": "Performed well on key metrics"
        }
      }
    ]
  }
}

Note: The body and output fields in the response will have types that depend on the specific test case. They are represented as generic objects in this schema.