List user preferences (optional keys filter)
GET /mywork/v1/user-preferences
Operation id: getUserPreferences
Description
Returns preferences for the authenticated user from MW_USER_PREF.
v1 allowlists TASK_PINS (ordered list of feed keys). Pins are scoped to the user's home unit (org-structure), not the current session unit. Clients must not send domainId / userId / unitId — those come from the session.
Optional keys query (CSV) filters the map (e.g. keys=TASK_PINS).
Pinning capacity is gated by system code PULSE_SETUP / TASK_PIN_COUNT (default 25; 0 disables adds — see pin helpers).
See devdocs/api/nextgen/task-execution/MYWORK_API_CONTRACT_UserPreferences.md.
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 |
| Home unit id blank | 400 | E107 | Unit id is mandatory |
| Unable to fetch preference | 500 | E359 | Unable to fetch preference |
Error Codes Reference
| Code | Description |
|---|---|
E107 | Home unit id blank |
E112 | X-reflexis-csrf-token-X header is mandatory |
E202 / E204 | Invalid or expired session / token |
E359 | Unable to fetch preference |
Tags: MyWorkUserPreferences
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
keys | string | No | Optional CSV of preference keys to return (e.g. TASK_PINS) |
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 — map of preferences under user_preferences
Content type: application/json
400 — Invalid or missing request parameter
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 — map of preferences under user_preferences
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
user_preferences | object | Yes | Preference map; TASK_PINS value is an ordered array of feed key integers |
{
"type": "object",
"required": [
"status",
"user_preferences"
],
"properties": {
"status": {
"type": "string",
"enum": [
"OK"
]
},
"user_preferences": {
"type": "object",
"description": "Preference map; `TASK_PINS` value is an ordered array of feed key integers"
}
}
}
Example:
{
"status": "OK",
"user_preferences": {
"TASK_PINS": [
101,
202
]
}
}
400 — Invalid or missing request parameter
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"
}