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

ParameterTypeRequiredConstraintsDescription
feed_keyIntegerYes≥ 1Unique feed identifier (→ E105 if ≤ 0 or missing)

Query Parameters

ParameterTypeRequiredDefaultDescription
view_typeStringNosession current / MVMV, SV, or DV (→ E210 if invalid)

Response Fields (feed_visibility)

FieldTypeDescription
feed_keyIntegerFeed identifier
existsBooleanWhether the feed row was found
same_unitBooleanFeed unit matches session unit
current_view_typeStringRequested / resolved view (MV/SV/DV)
visible_in_currentBooleanOwned under current_view_type
visible_inString[]Views where the feed is owned
permitted_viewsString[]Views the user may switch into (RSP menu + applicable functions)
suggested_viewString|nullSingular suggested view when not visible in current
suggested_dept_idString|nullDept for DV switch
suggested_dept_labelString|nullDisplay label for suggested dept
outcomeStringOPEN | SWITCH_VIEW | UNAVAILABLE
feed_user_idString|nullAssignment snapshot used for MV/DV evaluation
feed_dept_idString|nullAssignment dept
feed_profile_idString|nullAssignment profile

outcome

ValueMeaning
OPENOwned under requested view_type — client may call /details
SWITCH_VIEWNot in current; use singular suggested_view (+ dept when DV)
UNAVAILABLEMissing, 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

ScenarioHTTPError CodeMessage
Missing X-reflexis-csrf-token-X header400E112X-reflexis-csrf-token-X header is mandatory
Invalid or expired token401E204 / E202Invalid session / token
feed_key ≤ 0 or missing400E105Please provide valid feedKey / feed_key is mandatory
Invalid view_type400E210Invalid view_type value. Allowed: MV, SV, DV.

Error Codes Reference

CodeDescription
E105Invalid or missing feed_key
E112X-reflexis-csrf-token-X header is mandatory
E202 / E204Invalid or expired session / token
E210Invalid view_type

Tags: MyWorkFeeds

Parameters

Path parameters

NameTypeRequiredDescription
feed_keyintegerYesUnique numeric feed identifier

Query parameters

NameTypeRequiredDescription
view_typestringNoView 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

PropertyTypeRequiredDescription
statusstringYes
feed_visibilityobjectYes
{
  "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

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"
}

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"
}