Change a request type
const url = 'https://api.pealboard.com/v1/portals/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/request-types/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","form":[{"key":"example","label":"example","type":"text","required":false,"options":["example"],"helpText":"example"}],"destination":{"repositoryId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","labels":[],"projectNodeId":"example","initialFieldValues":{},"issueType":"example"},"statusMap":[{"when":{"kind":"closed","stateReason":"completed"},"status":"Open"}],"position":1}'};
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://api.pealboard.com/v1/portals/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/request-types/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "form": [ { "key": "example", "label": "example", "type": "text", "required": false, "options": [ "example" ], "helpText": "example" } ], "destination": { "repositoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "labels": [], "projectNodeId": "example", "initialFieldValues": {}, "issueType": "example" }, "statusMap": [ { "when": { "kind": "closed", "stateReason": "completed" }, "status": "Open" } ], "position": 1 }'Changing statusMap changes the status word every existing request of this type shows, at once and retroactively. That is the intended behaviour — status is derived and never stored — and it is recorded in the audit log.
Access. Requires the admin role or above (admin, owner). Changing a destination changes where every future submission of this kind lands. API-key scope: portals:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”From GET /v1/portals.
From GET /v1/portals.
A UUID this API issued.
A UUID this API issued.
Request Body
Section titled “Request Body”object
object
The key a submission sends this field’s value under.
The heading this field becomes in the issue body.
Text is one line and textarea is many. select needs options; every other type ignores them.
object
Where the issue is created. Required.
object
First match wins, in the order given. An empty list means the default rules in ADR 0009.
Responses
Section titled “Responses”The request type.
object
A UUID this API issued.
A UUID this API issued.
object
The key a submission sends this field’s value under.
The heading this field becomes in the issue body.
Text is one line and textarea is many. select needs options; every other type ignores them.
object
A UUID this API issued.
object
First match wins, in the order given. An empty list means the default rules in ADR 0009.
Example
{ "form": [ { "type": "text", "required": false } ], "statusMap": [ { "when": { "kind": "closed", "stateReason": "completed" }, "status": "Open" } ]}No valid credentials.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}Authenticated, but not permitted.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}No such resource, or it is not visible to you.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The request conflicts with the current state.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The request did not match the expected shape.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}Rate limited. Retry after the interval in the header.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}GitHub or another dependency refused or did not answer. Nothing in the workspace changed.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}