Query attachments from work requests

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.

Add-on

General use — no specific add-on required.

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/:code

Input parameters

ParameterTypeRequiredDescription
codetextNoWork request id. It can be obtained from the work request query endpoint (code field).
startintegerNoRecord 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.
limitintegerNoNumber of records the request will return. Default is 100.

Output parameters

ParameterTypeDescription
successbooleanIndicates whether the request was successful.
messagetextResponse code of the request.
dataarray of objectList of attachments. See the structure in the following table.
totalintegerTotal number of records.

Structure of each element in data:

ParameterTypeDescription
idintegerAttachment id.
id_companyintegerCompany id.
id_requestintegerWork request id.
descriptiontextAttachment name.
typeintegerAttachment type: 1 = File, 2 = Link.
signed_path_imagetextIf 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

CodeCause
401Missing or invalid authentication token.
500Internal error while processing the request.

Example

Request: (GET) https://app.fracttal.com/api/work_requests_attachments/11

Response 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
}
Response

Language
LoadingLoading…