Feed visibility preflight for pin-open UX
GET /task/v1/feeds/{feed_key}/visibility
Operation id: getFeedVisibility
Description
Lightweight visibility preflight for pin-open UX. Returns whether the feed is owned under the requested view_type (MV / SV / DV) and, when not, a singular suggested view to switch to.
UX-only: Clients should call this before opening a pinned feed. Nextgen GET /details does not hard-block on this evaluator (inbox-visible feeds can still load when LOS differs). Use outcome for pin-open UI (OPEN / SWITCH_VIEW / UNAVAILABLE toast), not as a details ACL.
Legacy /service/feed/* and FEED_ACCESS are unchanged.
Contract: devdocs/api/nextgen/task-execution/MYWORK_API_CONTRACT_FeedVisibility.md. Pin CRUD: mywork/v1/user-preferences (see MyWork OpenAPI).
Path Parameters
| Parameter | Type | Required | Constraints | Description |
|---|---|---|---|---|
feed_key | Integer | Yes | ≥ 1 | Unique feed identifier (→ E105 if ≤ 0 or missing) |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
view_type | String | No | session current / MV | MV, SV, or DV (→ E210 if invalid) |
Response Fields (feed_visibility)
| Field | Type | Description |
|---|---|---|
feed_key | Integer | Feed identifier |
exists | Boolean | Whether the feed row was found |
same_unit | Boolean | Feed unit matches session unit |
current_view_type | String | Requested / resolved view (MV/SV/DV) |
visible_in_current | Boolean | Owned under current_view_type |
visible_in | String[] | Views where the feed is owned |
permitted_views | String[] | Views the user may switch into (RSP menu + applicable functions) |
suggested_view | String|null | Singular suggested view when not visible in current |
suggested_dept_id | String|null | Dept for DV switch |
suggested_dept_label | String|null | Display label for suggested dept |
outcome | String | OPEN | SWITCH_VIEW | UNAVAILABLE |
feed_user_id | String|null | Assignment snapshot used for MV/DV evaluation |
feed_dept_id | String|null | Assignment dept |
feed_profile_id | String|null | Assignment profile |
outcome
| Value | Meaning |
|---|---|
OPEN | Owned under requested view_type — client may call /details |
SWITCH_VIEW | Not in current; use singular suggested_view (+ dept when DV) |
UNAVAILABLE | Missing, wrong unit, or not owned under any permitted view |
Ownership is evaluated on this feed row only (no cluster parent/child fallback), matching list LOS.
Error Scenarios
| Scenario | HTTP | Error Code | Message |
|---|---|---|---|
Missing X-reflexis-csrf-token-X header | 400 | E112 | X-reflexis-csrf-token-X header is mandatory |
| Invalid or expired token | 401 | E204 / E202 | Invalid session / token |
feed_key ≤ 0 or missing | 400 | E105 | Please provide valid feedKey / feed_key is mandatory |
Invalid view_type | 400 | E210 | Invalid view_type value. Allowed: MV, SV, DV. |
Error Codes Reference
| Code | Description |
|---|---|
E105 | Invalid or missing feed_key |
E112 | X-reflexis-csrf-token-X header is mandatory |
E202 / E204 | Invalid or expired session / token |
E210 | Invalid view_type |
Tags: MyWorkFeeds
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
feed_key | integer | Yes | Unique numeric feed identifier |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
view_type | string | No | View to evaluate. Defaults to session current / MV. |
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 — Success — {status: OK, feed_visibility: {...}}
Content type: application/json
400 — E105 invalid feed_key / E210 invalid view_type
Content type: application/json
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
500 — Unexpected server-side error
Content type: application/json
Response models
200 — Success — {status: OK, feed_visibility: {...}}
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
feed_visibility | object | Yes |
{
"type": "object",
"required": [
"status",
"feed_visibility"
],
"properties": {
"status": {
"type": "string",
"enum": [
"OK"
]
},
"feed_visibility": {
"type": "object",
"required": [
"feed_key",
"exists",
"same_unit",
"visible_in_current",
"visible_in",
"permitted_views",
"outcome"
],
"properties": {
"feed_key": {
"type": "integer"
},
"exists": {
"type": "boolean"
},
"same_unit": {
"type": "boolean"
},
"current_view_type": {
"type": "string",
"nullable": true
},
"visible_in_current": {
"type": "boolean"
},
"visible_in": {
"type": "array",
"items": {
"type": "string"
}
},
"permitted_views": {
"type": "array",
"items": {
"type": "string"
}
},
"suggested_view": {
"type": "string",
"nullable": true
},
"suggested_dept_id": {
"type": "string",
"nullable": true
},
"suggested_dept_label": {
"type": "string",
"nullable": true
},
"outcome": {
"type": "string",
"enum": [
"OPEN",
"SWITCH_VIEW",
"UNAVAILABLE"
]
},
"feed_user_id": {
"type": "string",
"nullable": true
},
"feed_dept_id": {
"type": "string",
"nullable": true
},
"feed_profile_id": {
"type": "string",
"nullable": true
}
}
}
}
}
Example:
{
"status": "OK",
"feed_visibility": {
"feed_key": 63691034,
"exists": true,
"same_unit": true,
"current_view_type": "MV",
"visible_in_current": false,
"visible_in": [
"SV",
"DV"
],
"permitted_views": [
"MV",
"SV",
"DV"
],
"suggested_view": "SV",
"suggested_dept_id": null,
"suggested_dept_label": null,
"outcome": "SWITCH_VIEW",
"feed_user_id": "other.user",
"feed_dept_id": "10",
"feed_profile_id": "MGR"
}
}
400 — E105 invalid feed_key / E210 invalid view_type
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"
}
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"
}