Skip to main content

Get files for a Session

GET /api/v1/session/{sessionId}/files​

Description​

Get all files uploaded during the session. The files are accessible as long as the user cookie is alive.

Request Parameters (path)​

NameDescriptionRequiredTypeDefault Value
sessionIdThe identifier of the sessionYesuuid

Response​

HTTP Status Codes​

CodeDescription
200Success, returns a File[]
401Unauthorized, missing X-Red-Robin-API-Key header
403Forbidden, invalid X-Red-Robin-API-Key header
404Not found, invalid configuration

File​

NameDescriptionTypeExample
mimeTypeFile mimetypestringimage/jpeg
downloadUrlUrl to access the filestringhttps://visibatriage.com/api/v1/file/123

Example Usage​

GET /api/v1/session/{sessionId}/files
const headers = new Headers();
headers.append('X-Red-Robin-API-Key', 'API_KEY');
headers.append('Content-Type', 'application/json');

const requestOptions = {
method: 'GET',
headers: headers,
};

fetch('https://se.visibatriage.com/api/v1/session/{sessionId}/files', requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));

Example Success Response​

[
{
"mimeType": "image/jpeg",
"downloadUrl": "https://visibatriage.com/api/v1/file/123"
}
]