• Document Up to Date

Get Profile By Query

Returns the single profile that matches the specified query.

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/one_by_query
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
query

String


The Mongo query used to search for the
profiles.
attributesToReturn

String



The name of the attributes to return
(don’t specify to return all)

Warning

The query must not contain the $where operator, the tenant’s name (already specified) or any non-readable attribute by the application

Example

Request

GET .../api/1/profile/one_by_query?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&query=%7B%20%22username%22%3A%20%22john.doe%22%20%7D

Response

Status 200 OK

 1{
 2  "username": "john.doe",
 3  "email": "john.doe@example.com",
 4  "verified": false,
 5  "enabled": false,
 6  "createdOn": 1495748091232,
 7  "lastModified": 1495748091232,
 8  "tenant": "sample-tenant",
 9  "roles": [],
10  "attributes": {},
11  "id": "59274dfbd4c650e226b03b65"
12}

Responses

Status
Location
Response Body
200

See example above.
500

{ "message" : "Internal server error" }