get
https://app.fracttal.com/api/work_requests_attachments/:code/
This endpoint returns all the attachments (files and links) linked to work requests, or to a specific work request. Each attachment indicates its type in the type field.
The code URL parameter is the work request id. It can be obtained from the work request query endpoint (code field).
GET https://app.fracttal.com/api/work_requests_attachments/:codeInput parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | text | No | Work request id. It can be obtained from the work request query endpoint (code field). |
start | integer | No | Record number where the query will start. Default is 0. All queries are limited to 100 records; when there are more, use this parameter for pagination. |
limit | integer | No | Number of records the request will return. Default is 100. |
Output parameters
| Parameter | Type | Description |
|---|---|---|
success | boolean | Indicates whether the request was successful. |
message | text | Response code of the request. |
data | array of object | List of attachments. See the structure in the following table. |
total | integer | Total number of records. |
Structure of each element in data:
| Parameter | Type | Description |
|---|---|---|
id | integer | Attachment id. |
id_company | integer | Company id. |
id_request | integer | Work request id. |
description | text | Attachment name. |
type | integer | Attachment type: 1 = File, 2 = Link. |
signed_path_image | text | If the attachment is a file (type = 1), the file download URL, valid for 24 hours. If it is a link (type = 2), the link URL exactly as it was registered. |
Errors
| Code | Cause |
|---|---|
401 | Missing or invalid authentication token. |
500 | Internal error while processing the request. |
Example
Request: (GET) https://app.fracttal.com/api/work_requests_attachments/11
Response 200
200{
"success": true,
"message": "200",
"data": [
{
"id": 3,
"id_company": 1,
"id_request": 11,
"description": "foto_tablero_electrico.png",
"type": 1,
"signed_path_image": "https://fracttal-fs.s3.amazonaws.com/company_1/.request/11/foto_tablero_electrico.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=86400&X-Amz-Signature=abc123"
},
{
"id": 4,
"id_company": 1,
"id_request": 11,
"description": "Supplier manual",
"type": 2,
"signed_path_image": "https://ejemplo.com/manuales/tablero-electrico"
}
],
"total": 2
}