openapi: 3.1.0
info:
title: CircleCI REST API v1 Artifact Test Metadata API
description: The CircleCI REST API v1 is the legacy API that provides access to build information, project details, and user data. While still available, CircleCI recommends migrating to the v2 API for newer features and improved functionality. The v1 API supports operations for retrieving build details, triggering builds, managing SSH keys, and accessing test metadata. Authentication is handled through API tokens passed as query parameters or HTTP headers.
version: '1.1'
contact:
name: CircleCI Support
url: https://support.circleci.com
termsOfService: https://circleci.com/terms-of-service/
servers:
- url: https://circleci.com/api/v1.1
description: CircleCI Production API v1.1
security:
- apiToken: []
tags:
- name: Test Metadata
description: Endpoints for retrieving test metadata collected during builds.
paths:
/project/{vcs-type}/{username}/{project}/{build_num}/tests:
get:
operationId: listBuildTests
summary: List test metadata for a build
description: Returns test metadata collected from the specified build, sourced from JUnit XML or similar test result files.
tags:
- Test Metadata
parameters:
- $ref: '#/components/parameters/VcsTypeParam'
- $ref: '#/components/parameters/UsernameParam'
- $ref: '#/components/parameters/ProjectParam'
- $ref: '#/components/parameters/BuildNumParam'
responses:
'200':
description: Successfully retrieved test metadata
content:
application/json:
schema:
type: object
properties:
tests:
type: array
items:
$ref: '#/components/schemas/TestMetadata'
description: List of test results
'401':
description: Unauthorized
components:
parameters:
BuildNumParam:
name: build_num
in: path
required: true
description: The build number
schema:
type: integer
ProjectParam:
name: project
in: path
required: true
description: The repository name
schema:
type: string
VcsTypeParam:
name: vcs-type
in: path
required: true
description: The version control system type
schema:
type: string
enum:
- github
- bitbucket
UsernameParam:
name: username
in: path
required: true
description: The organization or user name
schema:
type: string
schemas:
TestMetadata:
type: object
properties:
message:
type: string
description: The test message
file:
type: string
description: The file containing the test
source:
type: string
description: The source of the test
run_time:
type: number
format: float
description: The run time of the test in seconds
result:
type: string
enum:
- success
- failure
- skipped
description: The test result
name:
type: string
description: The name of the test
classname:
type: string
description: The class name of the test
securitySchemes:
apiToken:
type: apiKey
in: header
name: Circle-Token
description: Personal API token for authenticating with the CircleCI API. Can also be passed as a query parameter.
externalDocs:
description: CircleCI API v1 Reference
url: https://circleci.com/docs/api/v1/