UserAttr.get - REST API


Returns data and metadata about a user attribute or attributes. There is no difference if input parameters are sent in query string or request's body.

If only the very existence of attributes needs to be checked, it is faster and less resource-extensive to invoke exists instead of using this endpoint.

While the call's Python equivalent has two versions, one for individual and the other for multiple attributes, with REST there is a single endpoint to cover both cases. Yet, just like in the Python call, it is more efficient to get multiple attributes in one REST call instead of repeatedly reading in individual ones.

  • HTTP method: GET
  • URL path: /zato/sso/user/attr


uststring---Current user's session token (UST)
current_appstring---Name of application that the call is attempted from
user_idstringYesID of the user to get an attribute or attributes of
namestringYesIf a single attribute is to be returned, the attribute's name
decryptboolYesShould the attribute's value be decrypted if it is in an encrypted form in the database
datalistYesIf multiple attributes are to be returned, this is a list of their names


cidstring---Correlation ID assigned to request
statusstring---Overall status code
sub_statuslistYesReturned only if status is not "ok", a list of error or warning codes
foundboolYesIf a single attribute was requested, indicates if it was found or not
namestringYes(Returned only if found is "true") Attribute's name rewritten from input
valuestringYes(Returned only if found is "true") Attribute's value
creation_timedatetimeYes(Returned only if found is "true") When was the attribute created
last_modifieddatetimeYes(Returned only if found is "true") When was the attribute last modified
expiration_timedatetimeYes(Returned only if found is "true") When will the attribute expire
is_encryptedstringYes(Returned only if found is "true") True if attribute's value is stored encrypted in the database, else otherwise


$ curl -XGET localhost:17010/zato/sso/user/attr -d '
    "current_ust": "gAAAAABavmAV3rw6fQUS-HgRE...",
    "current_app": "CRM",
    "user_id": "zusr6fh6fdgd4997ksjkpx7qnk659q",
    "name": "my-attribute"

    "status": "ok",
    "cid": "b67f4fd8a86c529e92be1e60",
    "found": true,
    "name": "my-attribute",
    "value": "my-value",
    "creation_time": "2028-03-27T16:42:45",
    "last_modified": "2028-03-27T16:42:45",
    "expiration_time": "9999-12-31T00:00:00",
    "is_encrypted": false