Record a recent search on redirect

POST /indexer/v1/recent-searches/add

Operation id: addRecentSearch

Description

Explicit write path — clients call this after the user picks a search result and is redirected. /indexer/v1/search/data never persists recents as a side-effect.

See devdocs/api/nextgen/indexer/INDEXER_API_CONTRACT_RecentSearches.md.

Tags: IndexerRecentSearches

Parameters

Query parameters

NameTypeRequiredDescription
application_idstringYesApp scope (e.g. 100) or sentinel ALL — mandatory (E501)
department_idstringNo
end_datestringNo
profile_idstringNo
result_countintegerNoHit count from client; defaults to 1 when omitted
search_textstringYesQuery text — mandatory (E539)
searched_on_allbooleanNo
start_datestringNo

Security

  • AuthTokenHeader (apiKey)
    • Session authentication token validated server-side against the user session store.

Responses

200 — Success — {status: OK, message: "Recent search added successfully."}

Content type: application/json

400 — Invalid or missing request parameter

Content type: application/json

401 — Invalid or missing X-reflexis-csrf-token-X (HTTP 401)

Content type: application/json

500 — Unexpected server-side error

Content type: application/json

Response models

200 — Success — {status: OK, message: "Recent search added successfully."}

Content type: application/json

Schema

JSON object (structure varies by endpoint). Field names are snake_case in responses.

{
  "type": "object",
  "description": "JSON object (structure varies by endpoint). Field names are snake_case in responses."
}

400 — Invalid or missing request parameter

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYes
api_error_codestringYesApplication-level error code (e.g. E504, E515, E539)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "api_error_code": "E504",
    "response": "page_type is mandatory"
  },
  "required": [
    "status",
    "api_error_code",
    "response"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ER"
      ]
    },
    "api_error_code": {
      "type": "string",
      "description": "Application-level error code (e.g. E504, E515, E539)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

401 — Invalid or missing X-reflexis-csrf-token-X (HTTP 401)

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYes
api_error_codestringYesApplication-level error code (e.g. E504, E515, E539)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "api_error_code": "E504",
    "response": "page_type is mandatory"
  },
  "required": [
    "status",
    "api_error_code",
    "response"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ER"
      ]
    },
    "api_error_code": {
      "type": "string",
      "description": "Application-level error code (e.g. E504, E515, E539)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

Example:

{
  "status": "ER",
  "api_error_code": "E202",
  "response": "User session is invalid"
}

500 — Unexpected server-side error

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYes
api_error_codestringYesApplication-level error code (e.g. E504, E515, E539)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "api_error_code": "E504",
    "response": "page_type is mandatory"
  },
  "required": [
    "status",
    "api_error_code",
    "response"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ER"
      ]
    },
    "api_error_code": {
      "type": "string",
      "description": "Application-level error code (e.g. E504, E515, E539)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

Example:

{
  "status": "ER",
  "api_error_code": "E500",
  "response": "Internal server error"
}