EM Product Documetation Hub
EM API Developer Information
PUT User Search
4 min
entity management (em) contains user data that is associated to groups and roles the user, group, role and permission records work in conjunction with each other to control workflow activities and what users can or cannot do within the system roles and users are associated to groups using group management, and permissions are associated to roles using role management for more information about the data driving this function, refer to the em application data document { "name" "search users", "method" "put", "url" "/api/v4/user access/users/search", "description" "the purpose of the put search user api is for the client to obtain a complete listing of all groups, permissions, and roles for users from the server the response also includes user preferences such as preferred language and page size while the intended purpose is to retrieve information about a specific user, it may also be used to retrieve the same information for all users or users within a certain group or any other user attribute this api mimics searching for a user under administration → user management in entity management ", "tab" "examples", "examples" { "languages" \[ { "id" "8vtitnjcvptmil5cxkbxi", "language" "json", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"id\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api cakes com\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "ktyf05eq16nkvxvb5qykv", "language" "curl", "code" "curl location request put 'https //baseurl/api/v4/user access/users/search' \\\\\n header 'content type string' \\\\\n data '{\\"start\\" \\"integer\\",\\"limit\\" \\"integer\\",\\"returnnullfields\\" \\"boolean\\",\\"returnsearchresults\\" \\"string\\",\\"filters\\" \\"array\\"}'", "customlabel" "" }, { "id" "xejvvvkzxqlx2wmi4j5dg", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'put',\n 'url' 'https //baseurl/api/v4/user access/users/search',\n 'headers' {\n 'content type' 'string'\n },\n body '{\\"start\\" \\"integer\\",\\"limit\\" \\"integer\\",\\"returnnullfields\\" \\"boolean\\",\\"returnsearchresults\\" \\"string\\",\\"filters\\" \\"array\\"}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "ycmwfffkxt8odgp18ihl4", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"content type\\", \\"string\\");\n\nvar raw = \\"{\\\\\\"start\\\\\\" \\\\\\"integer\\\\\\",\\\\\\"limit\\\\\\" \\\\\\"integer\\\\\\",\\\\\\"returnnullfields\\\\\\" \\\\\\"boolean\\\\\\",\\\\\\"returnsearchresults\\\\\\" \\\\\\"string\\\\\\",\\\\\\"filters\\\\\\" \\\\\\"array\\\\\\"}\\";\n\nvar requestoptions = {\n method 'put',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //baseurl/api/v4/user access/users/search\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "lgpjl21rdz0utm9sjg3b9", "language" "python", "code" "import requests\n\nurl = \\"https //baseurl/api/v4/user access/users/search\\"\n\npayload = \\"{\\\\\\"start\\\\\\" \\\\\\"integer\\\\\\",\\\\\\"limit\\\\\\" \\\\\\"integer\\\\\\",\\\\\\"returnnullfields\\\\\\" \\\\\\"boolean\\\\\\",\\\\\\"returnsearchresults\\\\\\" \\\\\\"string\\\\\\",\\\\\\"filters\\\\\\" \\\\\\"array\\\\\\"}\\"\nheaders = {\n 'content type' 'string'\n}\n\nresponse = requests request(\\"put\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "1te54w cc7ofafvmiadnj", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //baseurl/api/v4/user access/users/search\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http put new(url)\nrequest\[\\"content type\\"] = \\"string\\"\nrequest body = \\"{\\\\\\"start\\\\\\" \\\\\\"integer\\\\\\",\\\\\\"limit\\\\\\" \\\\\\"integer\\\\\\",\\\\\\"returnnullfields\\\\\\" \\\\\\"boolean\\\\\\",\\\\\\"returnsearchresults\\\\\\" \\\\\\"string\\\\\\",\\\\\\"filters\\\\\\" \\\\\\"array\\\\\\"}\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "8vtitnjcvptmil5cxkbxi" }, "results" { "languages" \[ { "id" "9twpbcq7dy3tlumiu5cxr", "language" "200", "customlabel" "", "code" "{\n \\"name\\" \\"cake's name\\",\n}" }, { "id" "hh1 t9x1ywsqu27bqsz0u", "language" "404", "customlabel" "", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n}" } ], "selectedlanguageid" "9twpbcq7dy3tlumiu5cxr" }, "request" { "pathparameters" \[ { "name" "baseurl", "kind" "required", "type" "string", "description" "the url of the system environment target ", "children" \[] }, { "name" "token", "kind" "required", "type" "string", "description" "the authentication access token ", "children" \[] } ], "queryparameters" \[], "headerparameters" \[ { "name" "content type", "kind" "required", "type" "string", "description" "application/json", "children" \[] }, { "name" "accept", "kind" "required", "type" "string", "description" " / ", "children" \[] } ], "bodydataparameters" \[ { "name" "start", "kind" "optional", "type" "integer", "description" "the default value is 0 and indicates the results start from the beginning the start is not required unless the user desires a different value for pagination purposes ", "children" \[] }, { "name" "limit", "kind" "optional", "type" "integer", "description" "the default value is 50 and indicates the number of results returned in the response the limit is not required unless a different value is desired, up to the maximum of 1000 ", "children" \[] }, { "name" "returnnullfields", "kind" "optional", "type" "boolean", "description" "indicates whether empty/null fields should be returned in the response the default value is false when not provided ", "children" \[] }, { "name" "returnsearchresults", "kind" "optional", "type" "string", "description" "the value default is used if not provided in the request the user may request a different level of return information using the following values \n\ndefault returns the configured default fields note the client environment may be configured with different default fields \n\nbasic returns default fields plus additional fields note the client environment may be configured with different basic fields \n\nfull returns all designated user fields ", "children" \[] }, { "name" "filters", "kind" "optional", "type" "array", "description" "the list of field\ values pairs used to narrow the search response results in addition to queries fields and values the filters array is not required ", "children" \[] }, { "name" "values", "kind" "optional", "type" "string", "description" "the field name to be used as a filter in the search request the fields available for use in the filters array are indicated as filters/queries in the user search fields table ", "children" \[] }, { "name" "queries", "kind" "required", "type" "array", "description" "the list of field\ values pairs used to narrow the search response results the queries array is required note the field allnames with a value of must be used if no other specific search criteria is desired this field\ values pair returns all user records ", "children" \[] }, { "name" "field", "kind" "required", "type" "string", "description" "the field name to be used in the search query the fields available for use in the queries array are indicated as filters/queries in the user search fields table the field allnames is a special search field to indicate all user name fields are searched without having to list each field separately (i e , username, first name, last name, email) ", "children" \[] }, { "name" "values", "kind" "required", "type" "string", "description" "the value to be searched for in the respective field use if no specific values are requested for allnames ", "children" \[] }, { "name" "orders", "kind" "optional", "type" "array", "description" "the orders array is optional the field\ direction pairs provided in the array indicates the field and order of the results the default sort order (display name, ascending) will be used when orders is not provided ", "children" \[] }, { "name" "field", "kind" "optional", "type" "string", "description" "the field name to order the response on one or more field\ direction pairs may be provided in the orders array the fields available for use in the orders array are indicated as orders in the user search fields table ", "children" \[] }, { "name" "direction", "kind" "optional", "type" "string", "description" "the value asc is used to indicate ascending order and the value desc is used to indicate descending order ", "children" \[] }, { "name" "sortpriority", "kind" "optional", "type" "integer", "description" "indicates the orders field priority related to sorting ", "children" \[] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "response" \[ { "name" "id", "kind" "optional", "type" "string", "description" "id of the cake retrieved" } ] } return search results default return fields user id is active username email display name first name last name country effective date basic return fields everything in default plus last synchronized date last user agreement date member firm id member firm name external source id external hr user id idp user id idp id preferred language (id) preferred language value preferred page size (id) preferred page size value full return fields everything in default and basic plus office location override id location override value is supervisor group list role list permission list user search fields the table below outlines the fields supported for use in the queries array, filters array, and/or orders array as indicated in the description column (filters/queries, orders) supported search fields field description allnames string filters/queries a special purpose field to search upon for the provided value(s) against all name types (e g , first, last, username, display name) without having to provide each field in the request firstname string filters/queries orders the first name of the user lastname string filters/queries orders the last name of the user id integer filters/queries orders the unique object identifier of the user profile object externalhruserid string filters/queries orders an external user id that may be used by the client organization to identify the user username string filters/queries orders the user name of the user this is dependent on what the client organization uses as the username to identify the user email string filters/queries orders the email address of the user this value must be unique within the application country string filters/queries orders the name of the country where the user is located groupids integer filters/queries orders the unique object identifiers of the groups the user is a member of roleids integer filters/queries orders the unique object identifiers of the roles the user holds inactive boolean filters/queries orders indicates if the user is active the user may set their personal preferences to always include inactive records note the api response returns all users unless “isactive” is used in the request payload the user interface, on the other hand, automatically filters to only return active users unless specifically requested to include inactive the “isactive” field must be provided in the api request payload to receive the same results as the user interface by default