The bytes of a result’s file
const url = 'https://beta-api.plune.ai/v1/files/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://beta-api.plune.ai/v1/files/example \ --header 'Authorization: Bearer <token>'Served with the type it was uploaded with, nosniff and a sandbox CSP, so a picture is only ever a picture (ADR 0040). A text — JSON too — is served as text/plain; charset=utf-8, whatever it looks like: never as HTML, and never as a JSON document a browser would open (#928); the stored type is ResultFile.contentType. Immutable under its id. A file of a run in the Bin reads as not found until the run is restored. Only for a file Plune keeps (storage: db). A file in the project’s bucket (storage: bucket) has no bytes here: 409 with code: in_bucket. A file still waiting for complete is not a file yet, and reads as not found.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”The file
No / invalid token or session
Not found or not yours
object
Example generated
{ "error": "example"}The file is in the project’s bucket: { error, code: "in_bucket" }
object
Example generated
{ "error": "example"}