Attachments
Update a batch of attachments
API Reference
- Introduction
- Authentication
- Authorization
- Endpoints
- Me
- Announcements
- Attachments
- Awards
- Cache
- Calendars
- Categories
- Comments
- Documents
- Events
- Forms
- Groups
- Images
- Messages
- Newsfeed
- Positions
- Qualifications
- Ranks
- Records
- Roster
- Settings
- Specialties
- Statuses
- Submissions
- Tasks
- Units
- Users
- GETGet a list of users
- POSTCreate user
- GETGet user
- DELDelete user
- PATCHUpdate user
- POSTCreate a batch of users
- DELDelete a batch of users
- PATCHUpdate a batch of users
- Attachments
- GETGet a list of attachments
- POSTCreate attachment
- GETGet attachment
- DELDelete attachment
- PATCHUpdate attachment
- POSTCreate a batch of attachments
- DELDelete a batch of attachments
- PATCHUpdate a batch of attachments
- POSTAttach attachments
- DELDetach attachments
- PATCHSync attachments
- PATCHToggle attachments
- PATCHUpdate pivot
- GET
- Fields
- Position
- Rank
- Specialty
- Status
- Tasks
- Unit
- Assignment Records
- Award Records
- Combat Records
- Qualification Records
- Rank Records
- Service Records
- Status Records
- GET
Attachments
Update a batch of attachments
PATCH
/
{version}
/
users
/
{user}
/
attachments
/
batch
curl --request PATCH \
--url https://api.perscom.io/{version}/users/{user}/attachments/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"resources": {
"{key}": {
"name": "<string>"
}
}
}'
{
"data": [
{
"id": 123,
"name": "<string>",
"filename": "<string>",
"model_type": "<string>",
"model_id": 123,
"path": "<string>",
"attachment_url": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The API version to use.
Available options:
v1
, v2
Body
application/json
Response
200
application/json
OK
The file to be uploaded.
The date the resource was created. Stored in UTC.
The date the resource was updated. Stored in UTC.
Was this page helpful?
curl --request PATCH \
--url https://api.perscom.io/{version}/users/{user}/attachments/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"resources": {
"{key}": {
"name": "<string>"
}
}
}'
{
"data": [
{
"id": 123,
"name": "<string>",
"filename": "<string>",
"model_type": "<string>",
"model_id": 123,
"path": "<string>",
"attachment_url": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}