HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


## Endpoints

Note

Replace each {x} placeholder in the following endpoints with an appropriate value.

### TrackEvents

Column Title
Column Title
GET/api/v1.0/trackevents/?$filter={1}&$skip={2}&$top={3}&$orderBy={4}

### Profiles

Column Title
Column Title
GET/api/v1.0/profiles/?$filter={1}&$skip={2}&$top={3}&$orderBy={4}

## Usage

The `querystring` parameters are named according to the [Microsoft Rest API Guidelines](🔗).

  • `$filter` – Required. Filters the results to be returned. See [Filter operations](🔗).

Note

If your filter contains special characters, make sure that they are URL-encoded. See <https://www.url-encode-decode.com/>

  • `$skip` – Returns results from the specified offset.

  • `$top`_Optional_. Returns the specified number of results.

    • Together the `$skip` and `$top` parameters are used for client-driven paging. See also [Client-driven paging](🔗).

    • If not specified, default values are: `$skip=0` `$top=100`.

    • The result window size is limited and must fit the top 10000 records, so the sum of `$skip` and `$top` values must be less than 10000.

  • `$orderBy`_Optional_. Sorts the results according to the specified property. See [Sorting collections](🔗).

Note

Wildcard searching with \* is **not** supported.

### TrackEvents



Note

The `Payload` object in `TrackEvent` is a dynamic object and is defined by a specific tracking implementation.

### Profiles



### Segments



## Search specifying JSON property name

You can search anything by specifying the JSON property name as the field in the filter.

### TrackEvents



### Profiles



### Segments



## Search within nested objects

To search within nested objects, use the dot notation to build up the field name in the filter.

For example using `TrackEvent`, see the following `Payload` object example from the tracking as implemented in the Optimizely Customized Commerce Quicksilver sample site.



### TrackEvents

When filtering based on email in a user object in `Payload`, use the following field name:



### Profiles

When filtering based on `Email` in the `Info` object, use the following field name:



## Responses

Responses are in JSON format. There are the following types of responses:

  • Successful response. Contains the following properties:

    • `total` – Total number of results on the server regardless of paging.

    • `count` – Number of results returned for the current request. Affected by the $top parameter.

    • `items` – Collection of results.

  • Error response. Returns error which contains:

    • `code` – HTTP response code.

    • `message` – Error message or description.

See [ErrorResponse](🔗) in the Microsoft Rest API Guidelines.

## Date and time format

The following standard for date and time is supported: **ISO 8601 (UTC)**

Examples:

  • Date: 2017-10-09

  • Combined date and time in UTC: 2017-10-09T06:22:28+00:002017-10-09T06:22:28Z

## Examples

**Profiles filtered by device id**



**Profiles filtered by email**



**Sorting of profiles on Name**



**Sorting of events on CountryCode**



**Profiles within a time range**



**Events within a date range belonging to a specific profile**



**Events within a time range belonging to a specific device**



**Paging of events that occurred before a specific date (returns page 3 with a page size of 10 results)**



**Specify precedence using parentheses**

If not supplied, logical operators are evaluated left to right.



**Total number of events for URL**



**Get segment by name**



**Get segment by Id**



**JSON response with count and total**


Date:**2017-10-09**
Combined date and time in [UTC](🔗):**2017-10-09T06:22:28+00:00** <br>**2017-10-09T06:22:28Z** <br>**20171009T062228Z**

## Related topic

  • [Microsoft REST API Guidelines](🔗)