Get Attachments
Developing
Testing Env
Testing Env
GET
/api/v1/attachments
Last modified:2025-05-05 21:35:11
API Documentation
Get List of Attachments [GET]
URL
/api/v1/attachments
Headers
Key | Value | Required |
---|---|---|
Accept | application/json | Yes |
user-token | {{user_token}} | Yes |
secure-business-key | {{secure_business_key}} | Yes |
Accept-Language | en/ar | No |
Request Parameters (Query)
Field | Type | Description | Required | Validation |
---|---|---|---|---|
per_page | integer | Number of items per page (default: config value) | No | min:1, max:100 |
page | integer | Page number to return | No | min:1 |
Response
Success (200)
{
"status_code": 200,
"code": 1020,
"hint": "Processed Successfully",
"success": true,
"data": {
"attachments": {
"data": [
{
"id": 2,
"name": "attachment1",
"path": "uploads/projects/attachments/PROJECT_ATTACHMENTS_8_259_1636438608.pdf",
"type": "document",
"size": 220.0478515625,
"workspace_id": 8,
"assigned_to": 850,
"business_id": 259,
"created_at": "2025-05-05T19:54:27.000000Z",
"updated_at": "2025-05-05T19:54:27.000000Z"
},
{
"id": 1,
"name": "attachment1",
"path": "uploads/projects/attachments/PROJECT_ATTACHMENTS_8_259_940648048.pdf",
"type": "document",
"size": 220.0478515625,
"workspace_id": 8,
"assigned_to": 850,
"business_id": 259,
"created_at": "2025-05-05T19:44:47.000000Z",
"updated_at": "2025-05-05T19:44:47.000000Z"
}
],
"pagination": {
"current_page": 1,
"last_page": 1,
"per_page": 10,
"total": 2
}
},
"message": "تم استرجاع المرفقات بنجاح."
}
}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/api/v1/attachments' \
--header 'user-token: ' \
--header 'secure-business-key: 4765066450c0bd66325.48403130' \
--header 'Accept-Language: en' \
--header 'Accept: application/json'
Response Response Example
{
"status_code": 200,
"code": 1020,
"hint": "Processed Successfully",
"success": true,
"data": {
"attachments": {
"data": [
{
"id": 2,
"name": "attachment1",
"path": "uploads/projects/attachments/PROJECT_ATTACHMENTS_8_259_1636438608.pdf",
"type": "document",
"size": 220.0478515625,
"workspace_id": 8,
"assigned_to": 850,
"business_id": 259,
"created_at": "2025-05-05T19:54:27.000000Z",
"updated_at": "2025-05-05T19:54:27.000000Z"
},
{
"id": 1,
"name": "attachment1",
"path": "uploads/projects/attachments/PROJECT_ATTACHMENTS_8_259_940648048.pdf",
"type": "document",
"size": 220.0478515625,
"workspace_id": 8,
"assigned_to": 850,
"business_id": 259,
"created_at": "2025-05-05T19:44:47.000000Z",
"updated_at": "2025-05-05T19:44:47.000000Z"
}
],
"pagination": {
"current_page": 1,
"last_page": 1,
"per_page": 10,
"total": 2
}
},
"message": "تم استرجاع المرفقات بنجاح."
}
}
Request
Header Params
user-token
string
optional
Example:
{{user_token}}
secure-business-key
string
optional
Example:
{{secure_business_key}}
Accept-Language
string
optional
Example:
en
Accept
string
optional
Example:
application/json