Download a FILE attachment on a feed
GET /task/v1/feeds/{feed_key}/attachments/{file_key}
Operation id: getFeedAttachment
Description
Streams the binary content for a single FILE attachment on the given feed. Replaces legacy openAttachment.jsp for ACP feed attachments when the client already knows feed_key and file_key from GET /task/v1/feeds/{feed_key}/attachments.
Requires FEED_ACCESS line-of-sight and verifies that file_key is present on the feed's FEED_ATTACHMENTS JSON before reading from Mongo/GCS (fileSource=ACP).
See devdocs/api/nextgen/task-execution/MYWORK_API_CONTRACT_FeedAttachmentDownload.md.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
feed_key | Integer | Yes | Unique numeric feed identifier (→ E105 if ≤ 0) |
file_key | String | Yes | ACP file identifier from the attachments list |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_name | String | No | Storage entity name (entity from list API); narrows lookup |
display_name | String | No | Content-Disposition filename; defaults to attachment name or entity |
Error Scenarios
| Scenario | HTTP | Error Code | Message |
|---|---|---|---|
Missing / invalid X-reflexis-csrf-token-X | 401 | E202 / E204 | Session invalid or expired |
Missing or invalid feed_key (≤ 0) | 400 | E105 | Please provide valid feedKey. |
| No feed access | 403 | — | Feed access denied |
| Feed not found, attachment not on feed, or file missing in storage | 404 | E404 | No data found |
| Unexpected server-side error | 500 | E500 | Unexpected server error. |
Tags: MyWorkFeeds
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
feed_key | integer | Yes | Unique numeric feed identifier |
file_key | string | Yes | ACP file identifier (file_key from the attachments list) |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
display_name | string | No | Download filename for Content-Disposition |
file_name | string | No | Storage entity name (entity from list API) |
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
X-reflexis-csrf-token-X | string | No | Auth token (session CSRF token) |
Security
- ApiKeyHeader (apiKey)
- APIGEE API key header validated by VerifyAPIKey policy.
- AuthTokenHeader (apiKey)
- Session authentication token validated server-side against the user session store.
Responses
200 — Binary file stream with appropriate Content-Type and Content-Disposition
Content type: application/octet-stream
Content type: application/pdf
Content type: image/png
400 — E105 — invalid or missing feed_key
Content type: application/json
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
403 — Feed access denied
Content type: application/json
404 — E404 — feed, attachment, or stored file not found
Content type: application/json
500 — Unexpected server-side error
Content type: application/json
Response models
200 — Binary file stream with appropriate Content-Type and Content-Disposition
Content type: application/octet-stream
Schema
{
"type": "string",
"format": "binary"
}
Content type: application/pdf
Schema
{
"type": "string",
"format": "binary"
}
Content type: image/png
Schema
{
"type": "string",
"format": "binary"
}
400 — E105 — invalid or missing feed_key
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
Example:
{
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
}
403 — Feed access denied
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
404 — E404 — feed, attachment, or stored file not found
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
500 — Unexpected server-side error
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
Example:
{
"status": "ER",
"errorCode": "E302",
"response": "Internal server error"
}