Salta ai contenuti

Attachment

Questi contenuti non sono ancora disponibili nella tua lingua.

Manage file attachments, including upload, update, delete, and search.
Attachments can be linked to projects or other entities and support metadata and advanced filtering.

Version
2.0.0
OpenAPI version
3.0.0
POST
/v2/attachment/index

Returns a paginated and filterable list of attachments.
Use POST to allow complex filters via JSON payload.

Parameters for searching attachments

object
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: attachment_path
key
string
value
string
searchText
string
root_path
string
parent_path
string
Example
{
"key": "project_name",
"value": "My Project",
"per-page": 10,
"page": 1,
"sort": "attachment_path"
}

List of attachments

Array<object>
object
attachment_id
required
string
452b7448dce72057574d59f93d456ed0
attachment_path
required
string
/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/list-dpi.xlsx
data

File metadata

string
{
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": "137863",
"project_id": "569bc3c7-ead1-41e8-85ab-fdccf7085c5f",
"project_name": "My project"
}
Example
{
"attachment_id": "452b7448dce72057574d59f93d456ed0",
"attachment_path": "/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/list-dpi.xlsx",
"data": {
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": "137863",
"project_id": "569bc3c7-ead1-41e8-85ab-fdccf7085c5f",
"project_name": "My project"
}
}
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

GET
/v2/attachment/view/{id}

Retrieve an attachment by its unique ID.

id
required
string format: uuid

ID of the attachment to retrieve

mode
string
default: download
Allowed values: download inline

Establish the fetch mode

Attachment found

object
attachment_id
required
string
452b7448dce72057574d59f93d456ed0
attachment_path
required
string
/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/list-dpi.xlsx
data

File metadata

string
{
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": "137863",
"project_id": "569bc3c7-ead1-41e8-85ab-fdccf7085c5f",
"project_name": "My project"
}
Example
{
"attachment_id": "452b7448dce72057574d59f93d456ed0",
"attachment_path": "/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/list-dpi.xlsx",
"data": {
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": "137863",
"project_id": "569bc3c7-ead1-41e8-85ab-fdccf7085c5f",
"project_name": "My project"
}
}

Attachment not found

POST
/v2/attachment/create

Upload a new attachment file or create a directory.

object
path
required

The new file or directory path

string
Myfile.extension
replace

For file creation only. It replaces existing file with the new one. It is ignored if you are creating a directory.

integer
1
file

File to upload. If empty, creates a directory.

string format: binary

Attachment created successfully

object
attachment_id
required
string
452b7448dce72057574d59f93d456ed0
attachment_path
required
string
/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/list-dpi.xlsx
data

File metadata

string
{
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": "137863",
"project_id": "569bc3c7-ead1-41e8-85ab-fdccf7085c5f",
"project_name": "My project"
}
Example
{
"attachment_id": "452b7448dce72057574d59f93d456ed0",
"attachment_path": "/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/list-dpi.xlsx",
"data": {
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": "137863",
"project_id": "569bc3c7-ead1-41e8-85ab-fdccf7085c5f",
"project_name": "My project"
}
}

Bad request

Conflict. Destination path already exists

File size is too large

Failed to create for unknown reason

PUT
/v2/attachment/update/{id}

Rename or move an attachment by its unique ID.

id
required
string format: uuid

ID of the attachment to update

Attachment object with updated data

object
path
string
/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/list-dpi.xlsx
Example
{
"path": "/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/renamed-file.xlsx"
}

Attachment updated successfully

object
attachment_id
required
string
452b7448dce72057574d59f93d456ed0
attachment_path
required
string
/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/list-dpi.xlsx
data

File metadata

string
{
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": "137863",
"project_id": "569bc3c7-ead1-41e8-85ab-fdccf7085c5f",
"project_name": "My project"
}
Example
{
"attachment_id": "452b7448dce72057574d59f93d456ed0",
"attachment_path": "/projects/569bc3c7-ead1-41e8-85ab-fdccf7085c5f/renamed-file.xlsx"
}

Bad request

Attachment not found

Conflict. Destination path already exists

Unable to rename file or directory

DELETE
/v2/attachment/delete/{id}

Delete an attachment by its unique ID.
If force=true, all related entities will also be deleted.

id
required
string format: uuid

ID of the attachment to delete

force
boolean

Force the deletion of the entity and all related entities

Attachment deleted successfully

If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned