Replace the settings
const url = 'https://beta-api.plune.ai/v1/settings';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"statusMapping":{"additionalProperty":{"additionalProperty":"passed"}},"trustedDiscoverySources":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://beta-api.plune.ai/v1/settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "statusMapping": { "additionalProperty": { "additionalProperty": "passed" } }, "trustedDiscoverySources": [ "example" ] }'Replace, not merge: a key left out is one the owner removed. Every target of a status mapping must be one of the five statuses.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Everything a project owner can configure. Two keys today; the shape makes room for the next without another table.
object
Per source, what each raw status means here. The source key is any string — a team on a runner nobody wrote defaults for can still say what its statuses mean.
object
object
Sources whose discovered tests become cases WITHOUT passing through the review queue. The permission is granted to the source, not to each test: a discovered test already exists in your repository, so approving it one page at a time is a formality that costs ceil(N/200) decisions. Listing a source here answers all of them at once, and every case it creates carries trusted-source as the reason in the audit log.
Responses
Section titled “ Responses ”The settings as stored
Everything a project owner can configure. Two keys today; the shape makes room for the next without another table.
object
Per source, what each raw status means here. The source key is any string — a team on a runner nobody wrote defaults for can still say what its statuses mean.
object
object
Sources whose discovered tests become cases WITHOUT passing through the review queue. The permission is granted to the source, not to each test: a discovered test already exists in your repository, so approving it one page at a time is a formality that costs ceil(N/200) decisions. Listing a source here answers all of them at once, and every case it creates carries trusted-source as the reason in the audit log.
Example
{ "statusMapping": { "additionalProperty": { "additionalProperty": "passed" } }}A target status that does not exist; the message names the five
object
Example generated
{ "error": "example"}Rate-limited: either the per-route throttle or a tenant quota. Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over