List evidence
/api/evidenceWhat is on a case file, or on any case file. Answered entirely from the database, so listing evidence costs the store no request and no egress. Destroyed items are listed too, because a case file that looks like it never had evidence is indistinguishable from one nobody ever documented. A file taken off a case file is left out unless includeTakenOff is true. One file on two case files is listed once for each. Returns at most 500 items, newest first.
Needs the ViewEvidence permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Query Parameters
Response Body
application/json
application/problem+json
application/problem+json
curl -X GET "https://example.com/api/evidence"[ { "hash": "string", "byteSize": 0, "contentType": "string", "fileName": null, "uploaderId": null, "reportId": null, "origin": "string", "firstStoredAt": "2019-08-24T14:15:22Z", "destroyed": true, "destroyedAt": null, "destroyedBy": null, "destroyedReason": null, "attachedAt": null, "takenOffAt": null, "takenOffBy": null, "clip": null }]Finish the upload POST
Phase 3: hash it, decide what it is, and attach it. Modbot reads the staged bytes back, hashes them, decides the content type from the bytes themselves — never from the filename and never from what the client claimed — checks the size that was actually stored against the per-file limit and the per-case-file and whole-install totals, promotes the object to its content-addressed key, writes the metadata and puts the file on the case file. SVG and HTML are refused outright. Idempotent on the upload id. reportId names the case file to attach to when the upload was begun without one, so a file can be sent before its case file is written; naming a different case file from the one the upload was begun for is refused with 409. The case file must exist (404), must not be withdrawn (409), and must be the caller's own or the caller must be allowed to ban (403); with no case file at all the commit is refused with 400. clipId names a saved clip from the case file's clips list: the file must hash to what that moderator's companion reported when the clip was saved (409 when it does not, 404 when there is no such clip), and is then kept as captured, with where and when it was saved. Recorded as a fact against your account. Needs the `UploadEvidence` permission.
Get evidence details GET
Everything about a piece of evidence except its bytes. It is the file's own record, so it says nothing about which case files hold it and reportId is null. Needs the `ViewEvidence` permission.