UserAttr.exists - REST API


Returns a boolean flag or flags to indicate, respectively, if an input attribute or attributes exist for a user.

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

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 check multiple attributes in one REST call instead of repeatedly checking multiple attributes.

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


Name Datatype Optional Notes
ust string --- Current user's session token (UST)
current_app string --- Name of application that the call is attempted from
user_id string Yes ID of the user to check an attribute or attributes of
name string Yes If a single attribute is to be checked, the attribute's name
data list Yes If multiple attributes are to be checked, this is a list of their names


Name Datatype Optional Notes
cid string --- Correlation ID assigned to request
status string --- Overall status code
sub_status list Yes Returned only if status is not "ok", a list of error or warning codes
result bool/list --- If a single attribute was requested, a boolean flag to express if that attribute exists or not. With multiple attributes, a list of dictionaries with flags, one for each input attribute name.


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

    "status": "ok",
    "cid": "22fdd109d125f302d3c862db",
    "result": true