Get Profiles By Attribute Value
Returns the list of profiles that have the given attribute with the given value.
Resource Information
This service uses the tomcat application on port 8080 by default. To see a list of default ports click here
The context for this API is /crafter-profile
, please prefix the API URLs with this context.
HTTP Verb
|
GET
|
URL
|
/api/1/profile/by_existing_attribute |
Response Formats
|
JSON |
Parameters
Name
|
Type
|
Required
|
Description
|
---|---|---|---|
accessTokenId
|
String
|
✓
|
The access token ID of the application
making the call
|
tenantName
|
String
|
✓
|
The tenant’s name
|
attributeName
|
String
|
✓
|
The name of the attribute the profiles
must have
|
attributeName
|
String
|
✓
|
The value of the attribute the profiles
must have
|
sortBy
|
String
|
Profile attribute to sort the list by
|
|
sortOrder
|
String
|
The sort order (either ASC or DESC)
|
|
attributesToReturn
|
String
|
The name of the attributes to return
(don’t specify to return all)
|
Example
Request
GET .../api/1/profile/by_existing_attribute?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&attributeName=lastName&attributeValue=Doe
Response
Status 200 OK
1[
2 {
3 "username": "john.doe",
4 "email": "john.doe@example.com",
5 "verified": false,
6 "enabled": false,
7 "createdOn": 1495828439317,
8 "lastModified": 1495829514251,
9 "tenant": "sample-tenant",
10 "roles": [
11 "APP_TEST",
12 "APP_REPORT"
13 ],
14 "attributes": {
15 "firstName": "John",
16 "lastName": "Doe"
17 },
18 "id": "592887d7d4c650213cc2f400"
19 }
20]
Responses
Status
|
Location
|
Response Body
|
---|---|---|
200
|
See example above.
|
|
500
|
{ "message" : "Internal server error" } |