Edit a build
PUT
/builds/{id}Edits a specific build
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, BuildsApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new BuildsApi(config);
const result = await api.editBuild({ "id": 123, "buildPayload": { "version": "example", "project": 123 }});console.log(result);curl --request PUT \ "https://api.testcollab.io/builds/123?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "version": "example", "environment": "example", "release_date": "example", "notes": "example", "release_notes_url": "example", "source": "manual", "vcs_provider": "example", "ci_provider": "example", "commit_sha": "example"}'Parameters
Section titled “Parameters”| Name | Location | Type | Required | Description |
|---|---|---|---|---|
id |
path | number | Yes | Build ID |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
version |
string | Yes | Human-facing version identifier of the software the tests run against. Stored trimmed, and must contain at least one letter or number — a value made only of whitespace or punctuation (” “, “-”, “.”) is rejected with a 400 (). |
environment |
string | No | Free-form environment name (e.g. Production, Staging, UAT). Optional — omit the key to leave it unchanged, or send an empty string to clear it. Any other value is stored trimmed and must contain at least one letter or number (). |
release_date |
string | No | — |
notes |
string | No | — |
release_notes_url |
string | No | — |
source |
string | No | How the build was created. Defaults to manual when omitted. Values: manual, ci. |
vcs_provider |
string | No | — |
ci_provider |
string | No | — |
commit_sha |
string | No | — |
branch |
string | No | — |
tag |
string | No | — |
repo_url |
string | No | — |
commit_url |
string | No | — |
build_number |
string | No | — |
build_url |
string | No | — |
external_ref |
string | No | — |
metadata |
object | No | Provider-specific fields |
release |
number | No | Release ID to assign this build to manually (optional; send null to unlink). A manual assignment overrides pattern auto-matching (). |
project |
number | Yes | — |
Response
Section titled “Response”200 — Updated build
| Field | Type | Required | Description |
|---|---|---|---|
id |
number | Yes | — |
version |
string | Yes | — |
environment |
string | No | — |
source |
string | Yes | Values: manual, ci. |
release_date |
string | No | — |
created_at |
string | No | — |
{ "id": 123, "version": "example", "environment": "example", "source": "manual", "release_date": "example", "created_at": "example"}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
500 |
Internal server error |