Skip to content

API reference

Remove a sample from a kept draft

Mappings API

DELETE/v1/mappings/drafts/{id}/samples/{sha256}

The sample leaves the draft’s corpus. The draft is made again from the samples left, and every decision is applied again; one that no longer applies is named in notApplied. When the last sample of a draft started from the model leaves, the draft is the model’s empty card again, with its decisions. A draft for a registered model, or a new version of a saved mapping, is made from samples, so its last sample cannot be removed.

Path parameters

  • idstring (uuid)Required

    The draft's id, as POST /v1/mappings/drafts answered it.

  • sha256stringRequired

    The sample's sha256, as the draft lists it in samples.

Status codes

Status Meaning
200 The draft, as GET /v1/mappings/drafts/{id} answers it.
401 No usable credential was sent (invalid_credentials).
404 This company has no such draft (unknown_mapping_draft), or the draft holds no sample with that sha256 (unknown_sample).
409 mapping_draft_finalized: the draft is finalized and never changes. last_sample_needed: the draft is made from samples, so its last one stays until another is added.
413 A sample left holds more than one request may carry once read (file_too_large_to_read). Nothing was changed.
422 The samples left cannot be profiled together (several_sources, not_one_source, unreadable_file, unprofilable_sample). Nothing was changed.
503 The profiler did not answer (profiler_unavailable). Nothing was changed.
DELETE/v1/mappings/drafts/{id}/samples/{sha256}
Example
curl -X DELETE https://api.certinvo.com/v1/mappings/drafts/$DRAFT_ID/samples/$SAMPLE_SHA256 \
  -H "Authorization: Bearer $CERTINVO_API_KEY"
const draftId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'
const sampleSha256 = 'value'

const response = await fetch(`https://api.certinvo.com/v1/mappings/drafts/${draftId}/samples/${sampleSha256}`, {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
  },
})
console.log(response.status, await response.json())
import os

import requests

draft_id = "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"
sample_sha256 = "value"

response = requests.delete(
    f"https://api.certinvo.com/v1/mappings/drafts/{draft_id}/samples/{sample_sha256}",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)
200
No response body.
Success response
DELETE
/v1/mappings/drafts/{id}/samples/{sha256}
Remove a sample from a kept draft
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Variables2
›Headers2
›Code Snippet
curl -X DELETE "https://api.certinvo.com/v1/mappings/drafts/{id}/samples/{sha256}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close