We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

/profile/user/external/read

Returns the annotated data which has been uploaded and associated with a specific user. If no user id is provided, the uploaded data for all users for this 'type' is returned.

The user must be authenticated and have read permissions to the site group.

Request

The request object has the following fields:

Name

Type

Required

Description

id

String

No

The customer-defined identifier for the user.

type

String

Yes

The customer-specific identifier type as registered with Cxense, i.e. a

customer prefix

.

groups

List of String

No

A list of group names. The result will show a subset of profiles that include these groups.

filter

String

No

A traffic filter of type user-external with required group and optional item/items specified, see

traffic filters

format

String

No

"legacy" or "typed". "typed" format will return the results in TypedItem format.

If the 'id' of the user is specified, the response will consist a list containing a single data element if the user is know, or an empty list if the user could not be found. When the 'id' is unspecified, the data list will consist of data elements for all stored users under this customer prefix, or an empty list if there were no stored users.

Response

The response object has the following field:

Name

Type

Description

data

Array of data objects

The updated data associated with the user(s).

The data array comprise of one data object for each user which is retrieved in the read query.

Data Object

Name

Type

Description

id

String

The identifier for the user.

type

String

The customer identifier type (customer prefix) under which the user identifier is stored.

profile

Array of profile objects

The stored key-values for the user.

The Data Object contains the type and id which uniquely identifies the user, and all information which is associated with this user. This data object is similar to the request object for the /profile/user/external/update request. The profile comprise of the stored information associated to this identified user, and is defined where the /profile/user/external/update request is defined.

Examples

Bash
$ python cx.py /profile/user/external/read '{"id":"subscriber14","type":"xyz"}'
{
 "data": [
 {
 "id": "subscriber14",
 "type": "xyz",
 "profile": [
 {
 "group": "xyz-gender",
 "item": "male"
 },
 {
 "group": "xyz-interests",
 "item": "cooking"
 },
 {
 "group": "xyz-salary",
 "item": 120000
 }
 ]
 }
 ]
}

$ python cx.py /profile/user/external/read '{"id":"subscriber14","type":"xyz", "format": "typed"}'
{
 "data": [
 {
 "id": "subscriber14",
 "type": "xyz",
 "profile": [
 {
 "group": "xyz-gender",
 "item": {
 "type": "string",
 "value": "male"
 }
 },
 {
 "group": "xyz-interests",
 "item": {
 "type": "string",
 "value": "cooking"
 }
 },
 {
 "group": "xyz-salary",
 "item": {
 "type": "number",
 "value": "120000"
 }
 }
 ]
 }
 ]
}

$ python cx.py /profile/user/external/read '{"type":"xyz"}'
{
 "data": [
 {
 "id": "subscriber14",
 "type": "xyz",
 "profile": [
 {
 "group": "xyz-gender",
 "item": "male"
 },
 {
 "group": "xyz-interests",
 "item": "cooking"
 },
 {
 "group": "xyz-salary",
 "item": 120000
 }
 ]
 },
		{
 "id": "subscriber15",
 "type": "xyz",
 "profile": [
 {
 "group": "xyz-gender",
 "item": "female"
 },
 {
 "group": "xyz-interests",
 "item": "skiing"
 },
 ]
 }
 ]
}

$ python cx.py /profile/user/external/read '{"id":"subscriber14","type":"xyz", groups: ["xyz-gender"]}'
{
 "data": [
 {
 "id": "subscriber14",
 "type": "xyz",
 "profile": [
 {
 "group": "xyz-gender",
 "item": "male"
 }
 ]
 }
 ]
}

Last updated: