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

ParameterTypeRequiredDescription
feed_keyIntegerYesUnique numeric feed identifier (→ E105 if ≤ 0)
file_keyStringYesACP file identifier from the attachments list

Query Parameters

ParameterTypeRequiredDescription
file_nameStringNoStorage entity name (entity from list API); narrows lookup
display_nameStringNoContent-Disposition filename; defaults to attachment name or entity

Error Scenarios

ScenarioHTTPError CodeMessage
Missing / invalid X-reflexis-csrf-token-X401E202 / E204Session invalid or expired
Missing or invalid feed_key (≤ 0)400E105Please provide valid feedKey.
No feed access403—Feed access denied
Feed not found, attachment not on feed, or file missing in storage404E404No data found
Unexpected server-side error500E500Unexpected server error.

Tags: MyWorkFeeds

Parameters

Path parameters

NameTypeRequiredDescription
feed_keyintegerYesUnique numeric feed identifier
file_keystringYesACP file identifier (file_key from the attachments list)

Query parameters

NameTypeRequiredDescription
display_namestringNoDownload filename for Content-Disposition
file_namestringNoStorage entity name (entity from list API)

Header parameters

NameTypeRequiredDescription
X-reflexis-csrf-token-XstringNoAuth token (session CSRF token)

Security

  • 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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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"
}