Impersonate a user - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

As a USERS_ADMIN user, it is possible to impersonate another user's search or AI query by adding the FT-Impersonate-User-Id header parameter, and assigning it a userId as value in selected web services.

The value of the FT-Impersonate-User-Id header parameter must match a userId provided by the Search users web service. Impersonating another user can be useful to test access rules, for example.

The USERS_ADMIN must authenticate when impersonating another user.

Impersonation is possible in the following search web services:

Impersonation is also possible in the following AI-related web services:

Example

In the following example, a curl command uses the FT-Impersonate-User-Id header parameter:

curl --request POST 'https://docs.fluidtopics.com/api/khub/maps/search' \
--header 'Ft-Calling-App: antidot/doc' \
--header 'Ft-Calling-App-Version: master-48257' \
--header 'Authorization: Bearer kljJFLS45fdsar4asdrgKGjdfKJLSUON' \
--header 'Content-Type: application/json' \
--header 'FT-Impersonate-User-Id: 756e38ed-bbc2-447a-985c-f2c7cc50f4ef7' \
--data '{
  "query": "API"
}'

Using the FT-Impersonate-User-Id header parameter can return the following error codes:

Return code Description
200 OK The request is valid and returns data.
400 BAD REQUEST No user exists with this ID.
401 UNAUTHORIZED The authorization header was not provided or is invalid.
403 FORBIDDEN The user or API key does not have the ADMIN or USERS_ADMIN role.