listAttachments
GET
/attachments
const url = 'https://app.dev.buildtrace.eu/api/attachments?entityType=example&entityId=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';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://app.dev.buildtrace.eu/api/attachments?entityType=example&entityId=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'Authorization: Bearer <token>'Required scope: attachments:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”entityType
required
string
entityId
required
string format: uuid
Responses
Section titled “Responses”OK
Media typeapplication/json
Array<object>
object
id
required
string format: uuid
entityType
required
string
entityId
required
string format: uuid
kind
required
What the file is. MANUAL is a manual a work-instruction step follows (StepDocument); the upload route (POST /attachments, multipart) accepts the same kinds and refuses any other.
string
filename
required
string
contentType
string
sizeBytes
integer format: int64
checksumSha256
string
uploadedAt
required
string format: date-time
Example
[ { "kind": "TEST_CERTIFICATE" }]Bad request
Media typeapplication/json
object
error
required
string
Example generated
{ "error": "example"}Unauthorized