An existing profile can be retrieved by calling the url /v1/companies/<companyId>/buckets/<bucketId>/profiles/<profileId>. The method should be GET and a successful profile get will result in a response status 200 OK.
Required permission profile.read
Request Headers
Header | Required | Acceptable Value(s) | Description |
---|---|---|---|
Accept | Yes | application/json, application/javascript, image/* | Image response will return a 1x1 pixel result. |
Accept-encoding | No | gzip | Caller can request a gzipped response from the API and set the Accept-encoding as gzip. |
Query Parameters
Key | Required | Description |
---|---|---|
app_key | No | An app key refers to a collectApp. If an app key is specified, only the profile data that was added as the collectApp and the data of those apps that are allowed through the configured whitelist and/or blacklist will be retrieved. If no app key is specified then collectApp web along with its configured whitelist and/or blacklist will be used. |
max_return_size | No | Max return size refers to the size of the profile to be returned to the caller. If no max_return_size is specified, the profile of size 500 is returned to the caller. Please read the documentation about profile trimming to learn more about how the profile is trimmed to the specified size. |
max_return_events | No | Max return events refers to the the total number of events to be returned to the caller. The returned events can be distributed over several sessions. The max_return_events can be less than expected in the response if the profile does not have enough events or if the profile becomes larger than the max_return_size. |
Response Headers
Header | Description |
---|---|
Content-type | Content type of the response body. |
Vary | Will contain the Accept-encoding header. |
Content-encoding | Will contain encoding "gzip". |
Example: Get an existing profile
{ "profile":{ "id":"<profileId>", "version":"1.0", "createdAt":<timestamp milliseconds>, "sessions":[ { "id":"<sessionId>", "createdAt":<timestamp milliseconds>, "collectApp":"<collect app name>", "section":"<section name>", "data":{ "key":"value" }, "services":[ { "id":"geo", "data":{ "countryCode":0, "countryName":"<a country>", "region":"<a region>", "city":"<a city>", "postalCode":null, "latitude":0.0, "longitude":0.0, "dmaCode":0, "areaCode":0, "metroCode":0 } } ], "events":[ { "id":"<eventId>", "createdAt":<timestamp milliseconds>, "definitionId":"<definitionId>", "data":{ "key":"value" }, "services":[ ] } ] } ], "attributes":[ { "collectApp": "<collect app name>", "section": "<section name>", "data": { "key": "value" } } ], "services":[ ] }, "links":{ "self":"http://<hostname>/v1/companies/<companyId>/buckets/<bucketId>/profiles/<profileId>" } } |