/v1/mappings/retirementsRetires every version of one of your mappings by its name, or with restore: true brings it back. A retired mapping is kept: each version is still listed and readable with /v1/mappings/{version}, and an invoice it made still names it. No new file is read through a retired mapping: it is not tried when a file names no mapping, and a file that names one of its versions is refused with 409 mapping_retired. Certinvo retires a mapping itself when it decides exactly what another one decides; such a retirement names no person.
Request body
application/json, required
- namestringRequired
- confirmedBystring (email)Required
The email address of the person who retires it, as for saving a mapping.
- intostring
Optional. The other mapping that holds its decisions now.
- whystring
Optional. Why, in words.
- restoreboolean
Optional.
truebrings a retired mapping back.
Status codes
| Status | Meaning |
|---|---|
200 |
The mapping was already retired, or already live. Nothing was written; the body is its state. |
201 |
{name, retired, into, why, by, at}: the row written. |
400 |
The body is not a retirement (invalid_retirement, invalid_json), or no person who may act here was named (unknown_confirming_user). |
401 |
No usable credential was sent (invalid_credentials). |
404 |
You have no saved mapping of that name (unknown_mapping_config). |
/v1/mappings/retirementscurl -X POST https://api.certinvo.com/v1/mappings/retirements \
-H "Authorization: Bearer $CERTINVO_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @body.jsonimport { readFile } from 'node:fs/promises'
const response = await fetch(`https://api.certinvo.com/v1/mappings/retirements`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
'Content-Type': 'application/json',
},
body: await readFile('body.json'),
})
console.log(response.status, await response.json())import os
import requests
response = requests.post(
"https://api.certinvo.com/v1/mappings/retirements",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
data=open("body.json", "rb"),
)
print(response.status_code, response.text)