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

AcceptYesapplication/json, application/javascript, image/*Image response will return a 1x1 pixel result.
Accept-encodingNogzip

Caller can request a gzipped response from the API and set the Accept-encoding as gzip.


Query Parameters

Key

Required

Description

app_keyNoAn 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_sizeNo

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_eventsNoMax 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-typeContent type of the response body.
VaryWill contain the Accept-encoding header.
Content-encodingWill contain encoding "gzip".


Example: Get an existing profile

Response Body
{
   "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://&lt;hostname&gt;/v1/companies/&lt;companyId&gt;/buckets/&lt;bucketId&gt;/profiles/&lt;profileId>"
   }
}