What publishing a dossier would do, without publishing it
POST /v1/sources/{id}/dossiers/check- quién puede llamarla
- Cualquiera
- sin clave y sin sesión
- cuán reciente
- Nunca en caché
- cada respuesta lleva la altura del índice y la del nodo
En esta página
The dry run of import_dossier: the same parser, the same guards, nothing written. Per dossier, the campaign it would write, bind or join, each entity it would create or attach to an existing one, as the import resolves it (resolved_to is the id the import writes to when it is not the one declared, so a software declared under an id that a threat actor holds is created with that id followed by -malware, the two never being one entity), and each member with the state it would land in (current, provisional, held, known, skipped), its chain check against the index, the collisions that would hold it, and the claims and campaigns btcintel already holds on its subject; errors lists what would fail the whole import. A dossier that holds a record that is not text PostgreSQL stores (an escaped surrogate outside a pair, bytes that are not UTF-8, a NUL) is rejected, as the import rejects it whole: its records are named, and the other dossiers are reported as the import would write them. Open to every tier under its quota: the Research agent reads it before it sends a dossier, the CEO before it publishes one.
Parámetros
| Nombre | Dónde | Tipo | Obligatorio | Qué hace |
|---|---|---|---|---|
id | ruta | string | obligatorio | A dossier source: btcintel-dossiers. |
dossier | cuerpo | object | obligatorio | One incident, schema version 1: the campaign, the entities it needs and one member per Bitcoin mainnet subject, each citing the public pages that name it. Other chains go in refs; a victim carries no abuse word; a person is never an entity; an actor is named only with an authority's page. |
note | cuerpo | string | opcional | Kept on the fetch: the validation the CEO made before publishing. Ignored by the check. |
El cuerpo es application/json.
esquema DossierPush
dossierDossier obligatorio — One incident, schema version 1: the campaign, the entities it needs and one member per Bitcoin mainnet subject, each citing the public pages that name it. Other chains go in refs; a victim carries no abuse word; a person is never an entity; an actor is named only with an authority's page.versioninteger obligatorio — The dossier's schema version: 1, the only one the parser reads. · uno de 1keystring obligatorio — The incident's slug; one dossier per incident, and the key never changes.retiredboolean — Withdraws every member the dossier ever named, with a date; a retired dossier lists no member.campaignobject obligatorio — The incident: its kind, title, summary, day and abuse word, the entities it names, and its context links.kindstring obligatorio — An event: concept (event:hack, event:theft, event:scam_campaign, event:ransomware_incident, event:seizure).titlestring obligatorio — The campaign's title. Required and never blank.summarystring obligatorio — What the cited pages state, nothing more: no actor, no figure a page does not give.occurred_atstring (date) obligatorio — The day the incident happened, YYYY-MM-DD.occurred_precisionstring — How fineoccurred_atis known:day(when left out),monthoryear. · uno de "day", "month", "year"abusestring obligatorio — The campaign's abuse word (abuse:theft, abuse:scam, …); a victim never carries it.joinsstring — An existing campaign for the same incident to join instead of writing one.entitiesarray de object — The entities the campaign names, each with its role in it. An actor needs anauthority_datapage and is never declared inentities.idstring obligatorio — The entity's id: one the dossier declares inentities, or one btcintel already holds.rolestring obligatorio — The entity's part in the incident. · uno de "victim", "actor", "authority"evidencearray de object — The pages that name the entity in that role.
refsarray de object — Context links: the victim's statement, the write-ups, another chain's tracker. Never a member.titlestring obligatorio — The link's title. Required and never blank.urlstring obligatorio — The link, an http(s) address.
entitiesarray de object — The entities the dossier declares. Each is written, or goes to the entity that answers to its name; never a person, a threat actor or a malware family.idstring obligatorio — The entity's id. Required.namestring obligatorio — The entity's name. Required and never blank.kindstring obligatorio — An entity: concept; never a person, a threat actor or a malware family.descriptionstring — What the entity is.aliasesarray de string — Other names the entity goes by.identifiersarray de object — The entity's ids in other registries.schemestring obligatorio — The registry the id belongs to. Required.valuestring obligatorio — The id in that registry. Required.urlstring — The entity's entry in that registry.
membersarray de object — One member for each subject, each citing the pages that name it. At least one, unless the dossier is retired; a retired dossier lists none.subjectobject obligatorio — The member's subject, each at most once in the dossier.kindstring obligatorio — The subject's kind. A sweep is a transaction; a member of any other role is an address or an outpoint. · uno de "address", "tx", "outpoint"keystring obligatorio — The subject's key. Required.
rolestring obligatorio — The member's part in the incident: a victim, a sweep, a vault or a cash-out. · uno de "victim", "sweep", "vault", "cash_out"chain_factstring obligatorio — Checked against the index when the member is written. · uno de "funded", "spent", "confirmed"first_reported_atstring (date) — The day the subject was first reported, YYYY-MM-DD. Without it, the earliestpage_dateof its evidence.derived_fromobject — The sweep of this dossier the address is a direct output of; such a vault needs no page of its own and inherits the sweep's class and corroboration.kindstring obligatorio — Alwaystx. · uno de "tx"keystring obligatorio — The txid of a sweep this dossier lists.
evidencearray de object — The pages that name the subject: at least oneurlentry, unless the member is derived from a sweep.kindstring obligatorio — What the entry is: a page (url), a transaction (txid) or a Nostr event (nostr_event). · uno de "url", "txid", "nostr_event"valuestring obligatorio — The page's http(s) address, the transaction's txid in 64 lowercase hex, or the event's id.authorstring — An organisation, or the handle as the page shows it.page_datestring (date) — The page's date, YYYY-MM-DD. Required on aurlentry.quotestring — Verbatim. · como mucho 300 caracteresclassstring — What the page earns; the first url entry sets the member's confidence class. · uno de "authority_data", "service_data", "trusted_provider", "web_crawl"notestring — A note on the entry.
notestring — Kept on the fetch: the validation the CEO made before publishing. Ignored by the check. · como mucho 2000 caracteres
Qué responde
The report.
| Campo | Tipo | Qué lleva |
|---|---|---|
source | string | The source checked: the id of the path. |
parser_version | string | The parser that read the bundle, with its version. |
sha256 | string | Of the bundle as read; the fetch an import would cite. |
records | integer | The records the parser made of the bundle: one for each campaign, entity and member, a repeat counted once. |
errors | array | What would fail the whole import: a join to a missing or retracted event, an entity named but neither existing nor declared, a word outside the vocabulary. |
dossiers | array | One entry for each dossier of the bundle, by key. |
dossiers[].key | string | The dossier's key. |
dossiers[].retired | boolean | True when the dossier is retired. Absent otherwise. |
dossiers[].campaign | object | What the import would do with the dossier's campaign. |
dossiers[].entities | array | The entities the dossier declares, each with what the import would do with it. |
dossiers[].members | array | One entry for each member, with the state its import would land in. |
dossiers[].expires | array | Current members the source names in the campaign that this push leaves out: the import would delist them with a date. A dossier is sent whole. |
dossiers[].summary | object | The members counted by what would become of them: current, provisional, held, known and skipped, and expires for the ones the push would delist; for a rejected dossier, rejected, its records the import rejects. |
dossiers[].rejected | array | For a rejected dossier, its records as the import's run names them: by position among the bundle's records and by key when the key is text, never by content, those rejected with their dossier marked (its dossier). Absent otherwise. |
esquema DossierCheckReport
sourcestring obligatorio — The source checked: the id of the path.parser_versionstring obligatorio — The parser that read the bundle, with its version.sha256string obligatorio — Of the bundle as read; the fetch an import would cite.recordsinteger obligatorio — The records the parser made of the bundle: one for each campaign, entity and member, a repeat counted once.errorsarray de string obligatorio — What would fail the whole import: a join to a missing or retracted event, an entity named but neither existing nor declared, a word outside the vocabulary.dossiersarray de object obligatorio — One entry for each dossier of the bundle, by key.keystring — The dossier's key.retiredboolean — True when the dossier is retired. Absent otherwise.campaignobject — What the import would do with the dossier's campaign.actionstring —new: the event would be written.bound: the key already has its event.joins: it would bind to the eventjoinsnames.nothing: a retired key that was never imported.rejected: a record of the dossier is not text PostgreSQL stores, so the import writes nothing of the dossier and withdraws nothing it stated before;rejectednames its records, and the dossier is not read further. · uno de "new", "bound", "joins", "nothing", "rejected"event_idstring — The event the campaign is bound to or joins, evt_<n>. Absent for a new one, and when nothing would be done.titlestring — The campaign's title, as the dossier gives it.kindstring — The campaign's kind, as the dossier gives it.kind_in_vocabularyboolean — False when that kind is not in the vocabulary (errorssays so), or the dossier isrejected.entitiesobject — The entities the campaign names, each id with its role. Absent when it names none.
entitiesarray de object — The entities the dossier declares, each with what the import would do with it.idstring — The entity's id, as the dossier declares it.namestring — Its name, as declared.kindstring — Its kind, as declared.kind_in_vocabularyboolean — False when that kind is not in the vocabulary;errorsthen says so.actionstring — created: the import makes the entity; exists: the record's own is there; attaches: it joins another. · uno de "exists", "attaches", "created"resolved_tostring — The id the import writes to when it is notid: the entity joined, or the id made for the record.
membersarray de object — One entry for each member, with the state its import would land in.subjectstring — The member's subject askind:key, canonicalised when it parses.rolestring — The member's role.classstring — The confidence class it would carry, asconfidence:<class>: its firsturlentry's, or web_crawl.corroboratedboolean — True when an authority's page, or two pages by different authors on different hosts, name the subject, or another source already names it in the campaign.chain_factstring — The fact on the chain the dossier states of the subject: funded, spent or confirmed.chain_checkstring — What the lookup of that fact found. Absent for a member skipped before the lookup. · uno de "verified", "mismatch", "not_checkable"observedstring — What the chain showed, or why the fact could not be looked up.would_bestring — The state the member would land in:current;provisionalwhile one source alone names it;heldfor a chain mismatch or a collision;knownwhen the same row is already published;skippedwhen it cannot be a member. · uno de "current", "provisional", "held", "known", "skipped"reasonstring — Why it would land so. Absent for acurrentmember.collisionsarray de string — Claims of another source that name the subject as a service, ann_<n>. Absent when there is none, and for a cash-out.campaignsarray de string — Other campaigns the subject is already a member of: the same incident joins them.existing_claimsarray de string — Up to five claims of other sources on the subject outside any campaign, each asann_<n> (source: label). Absent when there is none.
expiresarray de string — Current members the source names in the campaign that this push leaves out: the import would delist them with a date. A dossier is sent whole.summaryobject — The members counted by what would become of them: current, provisional, held, known and skipped, andexpiresfor the ones the push would delist; for arejecteddossier,rejected, its records the import rejects.rejectedarray de string — For arejecteddossier, its records as the import's run names them: by position among the bundle's records and by key when the key is text, never by content, those rejected with their dossier marked(its dossier). Absent otherwise.
Errores
| Estado | Código | Cuándo |
|---|---|---|
| 400 | invalid_input | The source's parser declares no dossiers, the body is not a dossier, or it carries a private key (a Nostr nsec1, a WIF key or an extended private key such as xprv), which the answer never repeats (invalid_input). |
| 404 | not_found | not_found: what the path names is not known: not in the index (for a transaction, not in the node's mempool either), or no such record. The message says which. |
| 413 | too_large | Body over the size cap (too_large). |
| 422 | parse_failed | The parser refused the dossier (parse_failed): the message names the first refusal. |
| 429 | quota_exceeded | quota_exceeded: the caller's tier ran out of requests for the minute or the day. Retry-After says when to try again; every rate-limited answer carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and X-RateLimit-Tier. While the deployment runs in log-only mode the decision is logged instead and X-RateLimit-Policy: log-only is set. |
Cada uno llega en el sobre de error único, y ninguno se guarda en caché: un error lleva Cache-Control: no-store.
Ejemplo
curl y jq, en cualquier shell.
curl -s -X POST https://api.btcintel.io/v1/sources/ransomwhere/dossiers/check \
-H 'Content-Type: application/json' \
-d '{"dossier":{"version":1,"key":"bc1qz654h5qcqzalv6ltpxsk4ksdcc3e20wkedqntgnarv3a0t2e2p7scr48pl","campaign":{"kind":"address","title":"…","summary":"…","occurred_at":"…","abuse":"…"}}}' | jq