Introduction
The SiteSpect API is based on REST principles and allows you to interact with SiteSpect from any client that supports HTTP requests. All API calls must be authenticated and accessed over SSL (HTTPS) and all data is transported using JSON.
Base URL and Discoverability
You can access the API through a single endpoint based on your SiteSpect environment.
SiteSpect Cloud customers can access the API through:
https://admin1.sitespect.com/api
SiteSpect Enterprise customers use:
http://[CUSTOMER].sitespect.com/api.
An authenticated GET request to the base URL returns all the available resources in a JSON data structure. We highly recommend that you use this base URL in your client-side code and discover resources through link relations. This approach limits the amount of client side changes as the API evolves over time.
Authentication/Token
Example Request:
curl \
-d '{"username":"john","password":"paS4w0rd"}' \
-X POST "https://admin1.sitespect.com/api/token"
Example Request:
curl \
-d '{"apikey":"8as7d98sd7a9asdasdasda"}' \
-X POST "https://admin1.sitespect.com/api/token"
Example Response
{
"token": "brtaP8wzrJwJqbAQVnLsftcYA"
"_links" : {
"DiscoveryPage" : {
"href" : "https://admin1.sitespect.com/api",
"title" : "Available API Resources",
}
}
}
You can then pass that token to the “X-API-TOKEN” header for authentication. A DELETE request to the token resource terminates the token.
All API requests must be authenticated with a temporary token that is generated with user credentials or an API key. An API key can be created in your user profile.
Once you have the token, you can pass it into an “X-API-TOKEN” header with the value of the token in order to authenticate the request. The token expires within 15 minutes of non-usage and is tied to the permissions set for the specific user.
To generate a token, you must use SiteSpect and you must make a POST request to the token resource (/api/token) with your user credentials or apikey passed in the body of a JSON object.
Token Body Properties
Param | Type | Required | Default | Range | Valid values |
---|---|---|---|---|---|
apikey | string | Yes | - | - | - |
username | string | Yes | - | - | - |
password | string | Yes | - | - | - |
JSON, Dates, and Formatting
Example Response:
{
"_links" : {
"site" : {
"href" : "https://admin1.sitespect.com/api/site/{site-id}",
"title" : "Site Information",
"templated" : true
}
}
}
All data should be transferred using valid JSON format (with the exception of Campaign report data which, by default, uses CSV format). Since JSON does not specify how to handle hypermedia, the JSON responds using the HAL specification. Many resources are also specified using URI templates, allowing the client to fill in parts of the URI in order to locate the exact resource. When a link element’s href attribute contains a URI template, there is an additional “templated” attribute on the link with a boolean value true.
The response is minified by default but the prettyprint=true query parameter contains stylistic formatting for better readability. All JSON responses are returned with the standard application/json Content-type header to support in-browser display of these resources (with the exception of Campaign report data which is delivered in CSV format by default). If you are using a HAL browser or a client that already understands HAL link relations, you can always pass an Accept: application/hal+json header with your API requests; the server responds with the application/hal+json media type.
All dates must use ISO 8601 format. The following are good examples of a valid ISO 8601 date:
YYYYMMDDThhmmss[+-]hhmm
YYYY-MM-DDThh:mm:ss[+-]hh:mm
HTTP Methods
SiteSpect REST API uses the HTTP protocol for communication and supports the following methods (HTTP verbs) to perform actions on resources:
# Read one campaign
GET campaign/1632
# Read all variation groups under one campaign
GET campaign/1632/variation-groups
# Create a new set
POST site/1/set
# Update a set
PUT site/1/set
# Delete a campaign
DELETE campaign/1632
The response headers of any API call include an Allow header that shows the available methods for any resource and can be used and checked with the OPTIONS request. SiteSpect does not recommend but allows you to overwrite any HTTP method with a “method” URL query parameter. For example, a GET request with a method=POST query parameter performs a POST operation. This ensures maximum compatibility for clients who might not be capable of using certain HTTP verbs.
All collection calls allow only the GET method. The following table provides HTTP methods listed by API resource. Keep in mind that the methods available to you depend on your user privilege level.
Individual Resource | Allowed Methods |
---|---|
Assignment Criteria | GET |
Assignment Criterion | GET, DELETE, POST |
Bandwidth | GET |
Cache Purge | POST (results in a job you can then GET) |
Campaign | GET, DELETE, POST, PUT |
Campaign Data | GET, DELETE |
Campaigns | GET |
Data Set | GET, DELETE, POST, PUT |
Data Sets | GET |
Event | GET, POST |
Events | GET |
Factor | GET, DELETE, POST, PUT |
Factors | GET |
File | GET, POST |
Files | GET |
Geo Location | GET |
Log File | POST (results in a log you can then GET) |
Log Files | GET |
Message | GET, POST |
Messages | GET | Page Categories | GET |
Page Category | GET, DELETE, POST, PUT |
Performance Summary | GET |
Response Point | GET, DELETE, POST, PUT |
Response Points | GET |
Segment | GET, DELETE, POST, PUT |
Segments | GET |
Set | GET, DELETE, POST, PUT |
Sets | GET |
Site | GET |
Site Identities | GET |
Site Identity | GET, DELETE |
Site Metrics | GET |
Site Variation | GET, DELETE, POST, PUT |
Site Variations | GET |
Sites | GET |
Tag | GET, DELETE, POST |
Tags | GET |
Top Segments Configuration | GET, PUT |
Traffic Trends | GET |
User | GET, DELETE, POST, PUT |
Variation | GET, DELETE, POST, PUT |
Variation Group | GET, DELETE, POST, PUT |
Variation Groups | GET |
Variations | GET |
Resources
Uniform resource identifiers (URI) are constructed to indicate a hierarchical relationship between resources; they follow some standards. Every URI has an absolute path, contains only lowercase letters, and does not include a trailing forward slash. Singular nouns are used to represent individual resources and plural nouns are used to represent a collection of resources.
The discovery page or base URL of the API always lists the available resources and we recommend you retrieve the discovery page as a first step in your client side code and discover resources through link relations. Keep in mind that the main endpoint also requires token-based authentication. This section lists the detailed information about each available resource.
Assignment Criteria
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/assignmentcriteria"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/assignmentcriteria/",
"title" : "All Assignment Criteria associated with this Site"
}
},
"_embedded" : {
"assignmentcriteria" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/assignmentcriterion/",
"title" : "Assignment Criterion Details"
},
"CriteriaTypeLabel" : "User Agent",
"CriteriaTypeName" : "USER_AGENT",
"ID" : 1,
"Name" : "Browser: Chrome",
"Status" : "Active"
}
},
{
...
}
]}
}
A collection of Assignment Criteria from a specific Site or Campaign, including a subset of each individual Assignment Criterion resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view information about Assignment Criteria for a given Site or for a specific Campaign.
Resource URIs
https://admin1.sitespect.com/api/site/{site-id}/assignmentcriteria/{ac-status}
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id}/assignmentcriteria
URL PARAMETERS GET
Field | Type | Description |
---|---|---|
ac-status |
string |
Optional Allowed values:
|
Assignment Criterion
A resource that shows information for an individual Assignment Criterion. This view also includes extra specific data fields for the type of Assignment Criteria it represents.
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/assignmentcriterion/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, POST, PUT
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/assignmentcriterion/1 ",
"title" : "Assignment Criterion Details"
}
},
"BrowserType" : "Chrome(?!.*Opera)",
"CriteriaTypeLabel" : "User Agent",
"CriteriaTypeName" : "USER_AGENT",
"ID" : 1,
"Name" : "Browser: Chrome",
"Pre-Select" : "Not Pre-Selected",
"Site_ID" : 1,
"Status" : "Active",
"Tags" : "",
"associatedCampaigns" : []
}
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/assignmentcriterion/{assignmentcriterion-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
assignmentcriterion-id | The ID of the Assignment Criteria. |
Body Properties POST PUT
Field | Type | Description |
---|---|---|
name | String | |
userasmtcriteria_type | String |
Allowed values: |
dataset_idoptional | Integer | Required if userasmtcriteria_type is USER_GUID |
http_header_typeoptional | String |
Allowed values: Required if userasmtcriteria_type is HTTP_HEADER |
http_header_nameoptional | String | Required if userasmtcriteria_type is HTTP_HEADER |
http_header_valueoptional | String | Required if userasmtcriteria_type is HTTP_HEADER |
default_campaign_inclusionoptional | Integer | Determine if the assignment criterion will be included when a campaign
is created 0: not include, 1: include by default, 2: exclude by default
Default value: Allowed values: |
labelsoptional | integer/string/array | Integer, String, non-empty array of Strings/Integers, comma delimited
String
Default value: |
statusoptional | Integer | The status of AssignmentCriterion. 0: inactive, 1:active
Default value: Allowed values: |
Bandwidth
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/bandwidth"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/bandwidth",
"title" : "Bandwidth Information"
}
},
"bandwidth" : [
{
"inbound" : 4.031,
"outbound" : 66.841,
"timeperiod" : "November 2016"
},
{
"inbound" : 5.023,
"outbound" : 63.25,
"timeperiod" : "December 2016"
}
]
}
A resource that shows how many gigabytes (GB) of data your Site has received and sent over time.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/bandwidth
Cache Purge
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/siteidentity/1/cachepurge"
Example Response
#HTTP/1.1 201 Created
#Status: 201 Created
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9996
#Location: https://admin1.sitespect.com/api/site/1/siteidentity/1/cachepurge/1
{
"_links" : {
"self" : {
"href" : " https://admin1.sitespect.com/api/site/1/siteidentity/1/cachepurge/1"
}
}
}
The Cache Purge resource creates a job that clears the cache from a Site Identity. The resource is created with a POST call and returns with a 201 Created status code, as well as a location header and JSON body, which points to the location of the created cache purge job. We recommend using the location header to make a GET request on the cache purge job and to see the status of the cache purging operation. While the system is still purging, that resource returns a 202 Accepted status code with processing information in the JSON body. Upon purging completion, that resource returns a 200 OK status code.
You can purge individual files from the Site Identity by passing a reference to these files inside a JSON structure in your POST request.
The body param is just an array of files to purge.
Resource URI
https://admin1.sitespect.com /api/site/{site-id}/siteidentity/{siteidentity-id}/cachepurge
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site to which the Site Identity belongs. |
siteidentity-id | The ID of the Site Identity. |
Campaign
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/campaign/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, POST, PUT
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaign/1",
"title" : "Campaign Information"
},
"campaignvariations" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaign/1/campaignvariations",
"title" : "Campaign Variations associated with this Campaign"
},
"variationgroups" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaign/1/variationgroups",
"title" : "Campaign's Variation Group Information"
}
},
"CampaignType" : "FullFactorial",
"Assignments" : 0,
"ID" : 1,
"DefaultSet" : true,
"Status" : "active-running",
"RecentAssignmentTime" : "2017-06-28T19:42:11",
"RecentVisitTime" : "2017-06-28T19:42:11",
"Visits" : 0,
"Overlay" : false,
"CampaignSetID" : 5,
"SetType" : "Experiments",
"Created" : "2016-06-28T19:42:11"
"SetName" : "Experiments",
"EndTime" : "Never",
"Tags" : "first",
"Name" : "My First Experiments Campaign",
"Modified" : "2016-06-28T19:42:11"
}
A resource that shows information about a specific Campaign including links to other sections of the Campaign such as Variation Groups.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
campaign-id | The ID of the Campaign. |
Body Properties POST PUT
Field | Type | Description |
---|---|---|
criticalresponsepointid | Integer | |
name | String | |
optimizationmetric | String | H:# Hits, B:Beta Hits, T:Transfer Time per hit, V:Captured value per hit
Allowed values: |
responsepoints | Integer[] | An array of ResponsePoint IDs |
assignmentfrequencyoptional | Integer |
Default value: Size range: |
campaignsetoptional | Integer |
Default value: |
endofcampaignactionoptional | String |
Default value: Allowed values: |
endtimeoptional | Date | When the value is set to 0, campaign will run indefinately.
Default value: |
goaloptional | String |
Default value: Allowed values: |
tagsoptional | integer/string/array | Integer, String, non-empty array of Strings/Integers, comma delimited
String
Default value: |
maxreweightpercentoptional | Integer |
Default value: Size range: |
mincontrolweightoptional | Integer |
Default value: Size range: |
minsamplesizeoptional | Integer |
Default value: Size range: |
minsignificanceleveloptional | Integer |
Default value: Size range: |
mintimerunningoptional | Integer | A number of seconds
Default value: Size range: |
optimizationoptional | String |
Default value: Allowed values: |
priorityoptional | Integer |
Default value: Size range: |
reportsamplerateoptional | Integer |
Default value: Size range: |
rptrackbehavioroptional | Integer | Specify how to track Response Point hits. 0:'from initial assignment',
1:'after being counted'
Default value: Allowed values: |
starttimeoptional | Date |
Default value: |
statusoptional | String |
Default value: Allowed values: |
timesinceassignmentlimitoptional | Integer | A number of seconds
Default value: Size range: |
timesincelastvisitlimitoptional | Integer | A number of seconds
Default value: Size range: |
userasmtcriteriaoptional | Object[] | An Array of Objects.'userasmtcriteria': [ { 'id': 'audience_id', 'action': 'include' }, {'id':'audience_id', 'action': 'exclude'} ]
Default value: |
campaignvariationoptional | array[] | An Array of Ids.'campaignvariations': [ id,id ]
Default value: |
vargrpasmtheadernameoptional | String |
Default value: |
vargrpasmtheadertypeoptional | String |
Default value: Allowed values: |
vargrpasmtmethodoptional | String |
Default value: Allowed values: |
variationsoptional | Integer[] | An array of Variation IDs
Default value: |
visitlimitforusersoptional | Integer |
Default value: Size range: |
Campaign Data
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/campaign/1/campaigndata/dataexport/visit"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE
#Content-Type: text/csv
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
#X-Report-Status: instant
"User_GUID","AsmtVisitCount","StartTime_SSE","StartTime_English","VisitLength",
"VariationGroup_ID","RefererUrl","EntryPageUrl","Pageviews","TotalVisits",
"TimeSinceFirstVisit (days)","UserAgent","User's IP Address","AncillaryCookie_Val",
"ConcurrentCampaigns","Browser","OS","Height","Width","TouchScreen",
"Wifi","Cellular","KeyBoard","SmartPhone","Tablet","New Campaign 1 (27)",
"New Campaign 1 (27)","New Metric, TotalHitsBi (147)"
The Campaign Data resource contains processed and raw report data from a specific Campaign. You can request raw report data (data export) by visit or user, which results in two separate URIs, depending on the view. You can also request processed report data (Performance Matrix) by visit or user. You can retrieve its main effects or interactions, resulting in four separate URIs depending on the report type. In addition to these different report types, query parameters allow you to filter the report data using many options.
Resource URIs
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id})
/campaigndata/dataexport/visit
/campaigndata/dataexport/user
/campaigndata/performancematrix/visit/interactions
/campaigndata/performancematrix/visit/maineffects
/campaigndata/performancematrix/user/interactions
/campaigndata/performancematrix/user/maineffects
/campaigndata/topsegments
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site to which the Site Identity belongs. |
campaign-id | The ID of the Site Identity. |
instant_report | Pass true to request a pre-calculated report. |
regenerate | Pass true to regenerate the report. |
Optional Query Parameters for Data Export Campaign Data GET
Field | Type | Description |
---|---|---|
acceptoptional | String | Accept is a query parameter overwrite of the Accept header.
Default value: Allowed values: |
applied_segment_idoptional | Integer | This param can be used multiple times to include segments. By default, no segment is included and data will reflect all visits. |
endtimeoptional | Date/String | Valid ISO8601 Date
Default value: |
excluded_segment_idoptional | Integer | This param can be used multiple times to exclude segments. By default, no segment is excluded and data will reflect all visits. |
lineendoptional | String |
Default value: Allowed values: |
quotesoptional | String |
Default value: Allowed values: |
segments_andor_flagoptional | String |
Default value: Allowed values: |
segment_byoptional | String |
Default value: Allowed values: |
show_ancillarycookie_valoptional | Boolean |
Default value: Allowed values: |
show_concurrentcampaignsoptional | Boolean |
Default value: Allowed values: |
show_factors_idoptional | Boolean |
Default value: Allowed values: |
show_factors_fulloptional | Boolean |
Default value: Allowed values: |
show_headerrowoptional | Boolean |
Default value: Allowed values: |
show_mobile_fieldsoptional | Boolean |
Default value: Allowed values: |
show_starttime_sseoptional | Boolean |
Default value: Allowed values: |
show_starttime_englishoptional | Boolean |
Default value: Allowed values: |
show_starttime_exceloptional | Boolean |
Default value: Allowed values: |
show_totalvisitsoptional | Boolean |
Default value: Allowed values: |
show_timesincefirstvisitoptional | Boolean |
Default value: Allowed values: |
show_user_guidoptional | Boolean |
Default value: Allowed values: |
show_uservisit_asmtvisitcountoptional | Boolean |
Default value: Allowed values: |
show_uservisit_refererurloptional | Boolean |
Default value: Allowed values: |
show_uservisit_remoteaddroptional | Boolean |
Default value: Allowed values: |
show_uservisit_entrypageurloptional | Boolean |
Default value: Allowed values: |
show_useragentoptional | Boolean |
Default value: Allowed values: |
show_uservisit_pageviewsoptional | Boolean |
Default value: Allowed values: |
show_visitlengthoptional | Boolean |
Default value: Allowed values: |
starttimeoptional | Date/String | Valid ISO8601 Date
Default value: |
timezoneoptional | String |
Default value: |
Optional Query Parameters for Performance Matrix Campaign Data GET
Field | Type | Description |
---|---|---|
acceptoptional | String | Accept is a query parameter overwrite of the Accept header.
Default value: Allowed values: |
applied_segment_idoptional | Integer | This param can be used multiple times to include segments. By default, no segment is included and data will reflect all visits. |
endtimeoptional | Date/String | Valid ISO8601 date
Default value: |
excluded_segment_idoptional | Integer | This param can be used multiple times to exclude segments. By default, no segment is excluded and data will reflect all visits. |
precisionoptional | Integer |
Default value: Size range: |
prettyprintoptional | Boolean |
Default value: Allowed values: |
segments_andor_flagoptional | String |
Default value: Allowed values: |
show_probabilityoptional | Boolean |
Default value: Allowed values: |
show_zscoreoptional | Boolean |
Default value: Allowed values: |
show_responsepointsoptional | Boolean |
Default value: Allowed values: |
show_uservisitstatsoptional | Boolean |
Default value: Allowed values: |
show_samplestatsoptional | Boolean |
Default value: Allowed values: |
show_avgdeltapercoptional | Boolean |
Default value: Allowed values: |
show_avgdeltaoptional | Boolean |
Default value: Allowed values: |
show_stdoptional | Boolean |
Default value: Allowed values: |
show_confgraphicoptional | Boolean |
Default value: Allowed values: |
show_candlesticksoptional | Boolean |
Default value: Allowed values: |
starttimeoptional | Date/String | Valid ISO8601 date
Default value: |
statusoptional | String |
Default value: Allowed values: |
Query Parameters for Top Segments Campaign Data
Parameter | Type | Required | Default | Range | Valid value |
---|---|---|---|---|---|
metric | Integer | Yes | - | - | - |
onlyallsegment | Integer | Yes | - | - | ‘1’, '0’ |
optimizationmetric | string | Yes | - | - | 'H’, 'B’, ’T’, 'V’, ’S’ |
Campaigns
A collection of Campaign resources for a specific Site with each individual Campaign resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view all Campaigns, their individual details, and links to different sections of the Campaign such as Variation Groups. You can retrieve this collection of Campaigns using a single status (all, review, active-scheduled, active-running, active-nonewassignments, active-disabled, active-paused, ended) or a combination of statuses (i.e., active-running+active-nonewassignments).
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/campaigns"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaigns ",
"title" : "All Campaigns for a Specific Site"
}
},
"_embedded" : {
"campaigns" : [
{
"_links" : {
"self" : {
"href" : " https://admin1.sitespect.com/api/site/1/campaign/1",
"title" : "Campaign Information"
},
"variationgroups" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaign/1/variationgroups",
"title" : "Campaign's Variation Group Information"
}
},
"CampaignType" : "FullFactorial",
"Assignments" : 0,
"ID" : 1,
"DefaultSet" : true,
"Status" : "active-running",
"RecentAssignmentTime" : "2017-06-28T19:42:11",
"RecentVisitTime" : "2017-06-28T19:42:11",
"Visits" : 0,
"Overlay" : false,
"CampaignSetID" : 5,
"SetType" : "Experiments",
"Created" : "2016-06-28T19:42:11",
"SetName" : "Experiments",
"EndTime" : "Never",
"Tags" : "first",
"Name" : "My First Experiments Campaign",
"Modified" : "2016-06-28T19:42:11"
},
{
...
}
]
}
}
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/campaigns/{campaign-status}
https://admin1.sitespect.com/api/site/{site-id}/campaigns?recent_activity_date=2017-12-05T20:00:00
https://admin1.sitespect.com/api/site/{site-id}/campaigns/archived?recent_activity_date=2017-12-05T20:00:00
URL Parameters GET
Field | Type | Description |
---|---|---|
campaign-status |
string |
Optional Allowed values:
|
recent_active_date |
Date/String |
Optional Valid ISO8601 Date |
Data Set
An individual Data Set resource that can be created, retrieved, updated, purged and deleted using standard HTTP methods. To purge the dataset, use DELETE method on data set's data.
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/dataset/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, POST, PUT
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"Created" : "2016-10-20T14:31:17",
"StaleTime": "2016-10-20T14:31:17",
"Name": "SpecialUsers",
"ItemCount": 467,
"Modified": "2016-10-20T14:31:17",
"ID": 1,
"_links": {
"self" : {
"title": "Individual Dataset",
"href": "https://admin1.sitespect.com/api/site/1/dataset/1"
}
}
}
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/dataset
https://admin1.sitespect.com/api/site/{site-id}/dataset/{id}/data
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Body Properties POST PUT
Field | Type | Description |
---|---|---|
name |
string |
Required Default value: Size range: Allowed values:
|
dataset |
string/integer |
Optional. An array of strings. Default value: Size range: Allowed values:
|
reportreference |
object |
Optional. Default value: Size range: Allowed values:
|
staledate |
date |
Optional Default value: Size range: Allowed values:
|
Body Properties Put
Field | Type | Description |
---|---|---|
name |
string |
Optional Default value: Size range: Allowed values:
|
dataset |
array |
Optional Default value: Size range: Allowed values:
|
staledate |
date |
Optional Default value: Size range: Allowed values:
|
Data Sets
A collection of available Data Sets for a specific Site, including each individual Data Set resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to see information about all the Data Sets that have been created for a specific Site.
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/datasets"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/datasets",
"title" : "All Datasets for a Specific Site"
}
},
"_embedded" : {
"datasets" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/dataset/1",
"title" : "Individual Dataset",
}
},
'Name' : 'My DataSet',
'ID' : 1,
'Site_ID' : 1,
'ItemCount' : 192,
'Created' : '2016-08-01T20:24:00-08:00',
'Modified' : '2016-08-08T20:24:00-08:00',
'StaleDate' : '2016-09-08T20:24:00-08:00'
},
{
...
}
]}
}
Resources URI
https://admin1.sitespect.com/api/site/{site-id}/datasets
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site |
Event
A resource that shows information for an individual historical event.
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/event/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/event/1 ",
"title" : "Individual Event Details"
}
},
"ID" : 1,
"Time" : "2016-06-28T19:42:11",
"Type" : "Campaign",
"User" : "admin",
"Object" : "Test Campaign 1",
"Description" : "Campaign – Updated",
"Text" : "Status Change: Review => Active - Scheduled."
}
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/event/{event-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
event-id | The ID of the event. |
Body Properties Post
Field | Type | Description |
---|---|---|
category |
string |
Required Default value: Size range: Allowed values:
|
fid |
integer |
Id of the object that the event applies to Default value: Size range: Allowed values:
|
text |
string |
Required Default value: Size range: Allowed values:
|
Events
A collection of historical events, including each individual event resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view historical events for all resources or a specific resource.
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/events"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/events ",
"title" : "Events Associated with this Site"
}
},
"_embedded" : {
"events" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/event/1 ",
"title" : "Individual Event Details"
},
"ID" : 10,
"Time" : "2016-06-28T19:42:11",
"Type" : "Campaign",
"User" : "admin",
"Object" : "Test Campaign 1",
"Description" : "Campaign – Updated",
"Text" : "Status Change: Review => Active - Scheduled."
}
},
{
...
}
]}
}
Resource URIs
https://admin1.sitespect.com/api/site/{site-id}/events
https://admin1.sitespect.com/api/site/{site-id}/events/all
https://admin1.sitespect.com/api/site/{site-id}/{resource}/{resource-id}/events
For Example, retrieving historical events for a Campaign resource looks like this:
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id}/events
The following is an example of retrieving historical events for a Variation of a Factor:
https://admin1.sitespect.com/api/site/{site-id}/factor/{factor-id}/variation/{variation-id}/events
Factor
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/factor/32"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, PUT, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links": {
"self": {
"title": "Factor Details",
"href": "https://admin1.sitespect.com/api/site/7/factor/32"
}
},
"DefaultModificationRegExSearch": "search",
"Tags": [],
"DefaultNewVisitRating": 0,
"DefaultPriority": 50,
"DefaultDisableWhenNoMatch": true,
"Type": "Regular",
"DefaultUrlForPreview": "http://test.domain.com",
"ID": 32,
"MatchConditions": [
{
"type": "Url",
"UrlCriterion": "/home",
"id": 10
}
],
"DefaultModificationRegExReplace": "find",
"DefaultRequireRating": 0,
"Name": "replace search with find",
"ParentFactorID": null,
"DefaultAsmtCountLogic": true,
"Status": "Active",
"AssociatedCampaigns": []
}
A resource that shows information for an individual Factor.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/factor/{factor-id}
Body Properties Post Put
Field | Type | Description |
---|---|---|
name | String | |
type | String |
Allowed values: |
tagsoptional | integer/string/array | Integer, String, non-empty array of Strings/Integers, comma delimited
String
Default value: |
statusoptional | String |
Default value: Allowed values: |
Regular Factors
Field | Type | Description |
---|---|---|
countuserwhentriggeredoptional | Boolean |
Default value: Allowed values: |
defaultmodificationregexsearchoptional | String |
Default value: |
defaultmodificationregexreplaceoptional | String |
Default value: |
disablecampaignoptional | Boolean |
Default value: Allowed values: |
evaluationsequenceoptional | Integer |
Default value: Size range: |
isvisuallyeditedoptional | Boolean |
Default value: Allowed values: |
matchconditionsoptional | Object[] | An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'}
]
Default value: Size range: |
newvisitratingoptional | Integer |
Default value: Size range: |
pagecategoryidoptional | Integer | |
parentfactoridoptional | Integer/String |
Default value: |
requirevisitratingoptional | Integer |
Default value: Size range: |
urlforpreviewoptional | String |
Default value: |
previewoptional | String |
Default value: |
AMPS Factors
Field | Type | Description |
---|---|---|
ampsfilter | String |
Allowed values: |
countuserwhentriggeredoptional | Boolean |
Default value: Allowed values: |
evaluationsequenceoptional | Integer |
Default value: Size range: |
matchconditionsoptional | Object[] | An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'}
]
Default value: Size range: |
parentfactoridoptional | Integer/String |
Default value: |
urlforpreviewoptional | String |
Default value: |
Client-Side Factors
Field | Type | Description |
---|---|---|
defaultmodificationregexsearch | String | |
defaultmodificationattributesoptional | Object |
Default value: |
defaultmodificationcssoptional | Object |
Default value: |
defaultmodificationregexreplaceoptional | String |
Default value: |
defaultmodificationscriptoptional | String |
Default value: |
evaluationsequenceoptional | Integer |
Default value: Size range: |
isvisuallyeditedoptional | Boolean |
Default value: Allowed values: |
matchconditionsoptional | Object[] | An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'}
]
Default value: Size range: |
parentfactoridoptional | Integer/String |
Default value: |
previewoptional | String |
Default value: |
urlforpreviewoptional | String |
Default value: |
Mobile Factor
Field | Type | Description |
---|---|---|
mobiletoken | String |
Origin Factor
Field | Type | Description |
---|---|---|
controlorigincookiename | String | Alias for controloriginname, either field name can be used here |
controlorigincookievalue | String | Alias for controloriginvalue, either field name can be used here |
countuserwhentriggeredoptional | Boolean |
Default value: Allowed values: |
defaultdisablewhencookieconflictoptional | Boolean |
Default value: Allowed values: |
defaultdisablewhenoriginconflictoptional | Boolean |
Default value: Allowed values: |
evaluationsequenceoptional | Integer |
Default value: Size range: |
parentfactoridoptional | Integer/String |
Default value: |
originexperimenttypeoptional | String |
Default value: Allowed values: |
urlforpreviewoptional | String |
Default value: |
Redirect Factor
Field | Type | Description |
---|---|---|
countuserwhentriggeredoptional | Boolean |
Default value: Allowed values: |
defaultmodificationregexsearchoptional | String |
Default value: |
defaultmodificationregexreplaceoptional | String |
Default value: |
defaultvariationredirecttypeoptional | Integer/String |
Default value: Allowed values: |
disablecampaignoptional | Boolean |
Default value: Allowed values: |
evaluationsequenceoptional | Integer |
Default value: Size range: |
isvisuallyeditedoptional | Boolean |
Default value: Allowed values: |
matchconditionsoptional | Object[] | An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'}
]
Default value: Size range: |
newvisitratingoptional | Integer |
Default value: Size range: |
parentfactoridoptional | Integer/String |
Default value: |
requirevisitratingoptional | Integer |
Default value: Size range: |
urlforpreviewoptional | String |
Default value: |
Factors
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/factors"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/factors",
"title": "All Factors associated with this Site"
}
},
"_embedded": {
"factors": [
{
"DefaultModificationRegExReplace": "find",
"MatchConditions": null,
"ParentFactorID": null,
"Name": "replace search with find",
"DefaultRequireRating": 0,
"DefaultAsmtCountLogic": true,
"Status": "Active",
"Tags": [],
"DefaultModificationRegExSearch": "search",
"DefaultPriority": 50,
"DefaultDisableWhenNoMatch": true,
"DefaultNewVisitRating": 0,
"DefaultUrlForPreview": "http://test.domain.com",
"Type": "Regular",
"_links": {
"self": {
"title": "Factor Details",
"href": "https://admin1.sitespect.com/api/site/7/factor/32"
}
},
"ID": 32
},
...
]
}
}
A collection of Factors from a specific Site, including each individual Factor resource inserted into the “_embedded” JSON object. You can filter this collection by active or inactive status.(i.e., https://admin1.sitespect.com/api/site/{site-id}/factors/active).
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/factors/{factor-status}
URL Parameters Get
Field | Type | Description |
---|---|---|
factor-status |
string |
Optional Allowed values:
|
File
Example Request
curl
-H "Content-Type:multipart/form-data"
-H "X-API-TOKEN:DgyXvOwGKClXZWTyDN68gDXea"
-F "Filename=@/Users/example/Downloads/example.jpg"
-F "name=Filename"
"https://admin1.sitespect.com/api/site/1/file"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Content-Type: application/json; charset=utf-8
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9897
{
"_links": {
"self": {
"title": "Stored Files",
"href": "https://admin1.sitespect.com/api/site/1/files"
}
},
"DefaultUrlForPreview": "http://example.com",
"Files": [
{
"UploadTime": "2016-05-30T15:28:06",
"FilePath": "/__ssobj/static/example.png",
"Name": "powered.png"
}
],
"synced": "2018-05-23T19:36:27"
}
A resource for creating a file in the SiteSpect file store. It allows a POST request for creation and then the binary file can be retrieved through a regular request to the file location. The POST requires a “filename” parameter and the file must be uploaded using form data.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/file
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Body Properties Post
Field | Type | Description |
---|---|---|
Filename |
object |
Required Default value: Size range: Allowed values:
|
Files
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/files"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"title": "Stored Files",
"href": "https://admin1.sitespect.com/api/site/1/files"
}
},
"DefaultUrlForPreview": "http://engine.mobile-sandbox.com",
"Files": [
{
"UploadTime": "2016-05-30T15:28:06",
"FilePath": "/__ssobj/static/powered.png",
"Name": "powered.png"
}
],
"synced": "2016-05-30T15:28:15"
}
A collection of files from a specific Site, including the individual file information for each inserted into the Files array. Do not use the “_embedded” JSON object; an individual file request does not go through the API but as a direct request to the binary file via the file path.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/files
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Geo Location
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/geoselector/geoarea"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/geoselector/geoarea",
"title": "GeoArea Information"
}
},
"Type": "GeoArea",
"ID": "all",
"_embedded": [
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/geoselector/geoarea/americas",
"title": "GeoCountry for a Specific GeoArea"
}
},
"Name": "Americas",
"Type": "GeoArea",
"ID": "americas",
"ChildType": "GeoCountry"
},
{
"ChildType": "GeoCountry",
"ID": "apac",
"Type": "GeoArea",
"Name": "Asia Pacific",
"_links": {
"self": {
"title": "GeoCountry for a Specific GeoArea",
"href": "https://admin1.sitespect.com/api/geoselector/geoarea/apac"
}
}
},
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/geoselector/geoarea/emea",
"title": "GeoCountry for a Specific GeoArea"
}
},
"Name": "Europe, the Middle East and Africa",
"ID": "emea",
"ChildType": "GeoCountry",
"Type": "GeoArea"
}
]}
A resource that shows geo-location information. You can use this resource to browse and explore SiteSpect’s geographical database.
Resource URI
https://admin1.sitespect.com/api/geoselector/geoarea
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Log File
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/logfile/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/logfile/1",
"title" : "Individual log file information"
},
"download" : {
"href" : "https://admin1.sitespect.com/api/site/1/logfile/1/download",
"title" : "Download log file"
}
},
"End" : "2016-07-17T20:00:00",
"ID" : 1,
"Name" : "07-08-2016-20:00_TO_07-17-2016-20:00_10.log",
"SiteIdentities" : [
10
],
"Site_ID" : 1,
"Size" : "0.00 KB",
"Start" : "2016-07-08T20:00:00",
"Status" : "New"
}
A resource that shows information about a specific log file or creates a log file, depending on what HTTP method is used to call on this resource. A GET request provides information about an individual log file and this information contains a URL path for the actual log data download. A POST request to this resource initiates log file creation.
Resource URIs
https://admin1.sitespect.com/api/site/{site-id}/logfile
https://admin1.sitespect.com/api/site/{site-id}/logfile/{logfile-id}
https://admin1.sitespect.com/api/site/{site-id}/logfile/{logfile-id}/download
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
logfile-id | The ID of the log file. |
Body Properties Post
Field | Type | Description |
---|---|---|
start |
date |
Required Default value: Size range: Allowed values:
|
end |
date |
Required Default value: Size range: Allowed values:
|
siteidentities |
integer |
Optional Default value: Size range: Allowed values:
|
Log Files
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/logfiles"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/logfiles",
"title" : "All log files for this Site"
}
},
"_embedded" : {
"logfiles" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/logfile/1",
"title" : "Individual log file information"
},
"download" : {
"href" : "https://admin1.sitespect.com/api/site/1/logfile/1/download",
"title" : "Download log file"
}
},
"End" : "2016-07-17T20:00:00",
"ID" : 1,
"Name" : "07-08-2016-20:00_TO_07-17-2016-20:00_10.log",
"SiteIdentities" : [
10
],
"Site_ID" : 1,
"Size" : "0.00 KB",
"Start" : "2016-07-08T20:00:00",
"Status" : "New"
}
},
{
...
}
]}
}
A collection of available log files for a specific Site, including each individual Log File resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to see information about all the log files that have been created for a specific Site.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/logfiles
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Message
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/message/5"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/message/5",
"title": "Message Information"
}
},
"Description": null,
"TemplateBody": null,
"CreateTime": "2016-05-30T15:18:15",
"ID": 5,
"Subject": "Sample Subject",
"SiteID": null,
"IsHTML": true,
"MessageTemplateID": null,
"ReadTime": "never",
"AdminUserID": 4,
"TemplateSubject": null,
"Body": "Sample Body",
"MessageTemplateData": null
}
A resource that shows information for an individual message.
Resource URI
https://admin1.sitespect.com/api/message/{message-id}
URL Parameters
Property | Description |
---|---|
message-id | The ID of the message. |
Body Properties Post
Field | Type | Description |
---|---|---|
subject |
string |
Required Default value: Size range: Allowed values:
|
body |
string |
Required Default value: Size range: Allowed values:
|
ids |
integer |
Any array of System User IDs. Message will be sent to those users Default value: Size range: Allowed values:
|
Messages
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/messages"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/messages",
"title": "All Messages"
}
},
"_embedded": {
"messages": [
{
"_links": {
"self": {
"title": "Message Information",
"href": "https://admin1.sitespect.com/api/message/5"
}
},
"CreateTime": "2016-05-30T15:18:15",
"Site_Name": null,
"Subject": "Sample Subject",
"ID": 5,
"ReadTime": "Never"
}
]
}
}
A collection of messages, including each individual Message resource inserted into the “_embedded” JSON object. To filter by read or unread messages, just attach that URL parameter at the end of the request (i.e., https://admin1.sitespect.com/api/messages/unread).
Resource URI
https://admin1.sitespect.com/api/messages
URL Parameters
Property | Description |
---|---|
messages-status |
Optional Allowed values:
|
Page Categories
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/pagecategories"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"title": "All Page Categories associated with this Site",
"href": "https://admin1.sitespect.com/api/site/1/pagecategories/"
}
},
"_embedded": {
"pagecategories": [
{
"ID": "11",
"_links": {
"self": {
"title": "Page Category Details",
"href": "https://admin1.sitespect.com/api/site/1/pagecategory/11"
}
},
"Name": "Product Pages"
}
]
}
}
A collection of Page Categories from a specific Site, including a subset of each individual page category resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view a subset of information about all page categories for a given Site.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/pagecategories
Page Category
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/pagecategory/11"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, POST, PUT, DELETE
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"title": "Page Category Details",
"href": "https://admin1.sitespect.com/api/site/1/pagecategory/11"
}
},
"ID": "11",
"Name": "Product Pages",
"MatchConditions": [
{
"site_id": "1",
"type": "Url",
"id": "1211",
"UrlCriterion": "/product/"
}
]
}
A resource that shows information for an individual Page Category, including all the Match Conditions that are associated with the pages it represents.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/pagecategory/{pagecategory-id}
Body Properties Post Put
Field | Type | Description |
---|---|---|
name | String | |
matchconditionsoptional | Object[] | An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'}
]
Default value: |
Performance Summary
A resource that shows the dashboard report or performance summary of your campaigns. You can pass status as a query parameter to filter the campaigns.
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://demo.sitespect.com/api/site/1/campaigns/PerformanceSummary"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links": {
"self": {
"href": "https://demo.sitespect.com/api/site/1/campaigns/PerformanceSummary",
"title": "Dashboard Performance Summary"
}
},
"tags": [
"promos"
],
"campaigns": [
{
"ResponsepointName": "Action: Add to Bag",
"StartTime": "2016-09-25 09:00:00",
"OptimizationMetric": "B",
"Tags": [
"list-page"
],
"Status": "active-running",
"Name": "Search Result Layout",
"IsPinned": true,
"VariationGroups": [
{
"Significance": 99.956406,
"Status": 1,
"Name": "Large Images",
"Cumulative_Visitors": 315651,
"LastDay": "2016-06-23",
"Cumulative_Sum_Values": 57333,
"Visitors": 12690,
"ID": 99287,
"Sum_Values_Squares": 1607,
"Sum_Values": 1607,
"Cumulative_Average": 0.181634146573272,
"Cumulative_Sum_Values_Squares": 57333,
"ChangeFromControl": 0.01909739350367,
"IsControl": 0,
"DaysAtTrustworthiness": {
Good: 8,
Better: 8,
Best: 8
}
},
{
"Visitors": 12495,
"Name": "Control Group",
"Status": 1,
"LastDay": "2016-06-23",
"Cumulative_Sum_Values": 56072,
"Cumulative_Visitors": 314604,
"Cumulative_Sum_Values_Squares": 56072,
"IsControl": 1,
"ID": 99286,
"Cumulative_Average": 0.178230410293575,
"Sum_Values": 1441,
"Sum_Values_Squares": 1441
}
],
"CampaignSetID": 1476,
"CriticalResponsePointID": 66117,
"ID": 3146
}
]
}
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/campaigns/PerformanceSummary
https://admin1.sitespect.com/api/site/{site-id}/campaigns/PerformanceSummary?trustworhy=1
URL Parameters GET
Field | Type | Description |
---|---|---|
statusoptional | String | Optional Query Parameter used to filter campaigns
Default value: Allowed values: |
trustworhyoptional | number | Option Query Parameter used to return the days the campaigns has been at 90% significance or more
The value need to be set to |
Response Point (Metric)
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/responsepoint/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, POST, PUT
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/responsepoint/1 ",
"title" : "Response Point Details"
}
},
"AssociatedCampaigns" : [
{
"_links" : {
"self" : {
"href" : " https://admin1.sitespect.com/api/site/1/campaign/1",
"title" : "Campaign Information"
}
},
"TestCampaign_ID" : 1,
"TestCampaign_Name" : "2016.06.28",
"TestCampaign_Status" : "review"
},
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaign/2",
"title" : "Campaign Information"
}
},
"TestCampaign_ID" : 2,
"TestCampaign_Name" : "TC1",
"TestCampaign_Status" : "active - running"
}
],
"BodyContentCriteriaRegEx" : "",
"CgiNameCriteria" : "",
"CgiValueCriteriaRegEx" : "",
"CompositeEquation" : null,
"CountUserWhenTriggered" : false,
"EvaluationSequence" : 75,
"HTTPHeaderNameRegEx" : "",
"HTTPHeaderValueRegEx" : "",
"ID" : 1,
"IsBaseline" : false,
"IsComposite" : false,
"Name" : "RP1",
"NewVisitRating" : 0,
"ReportingMetrics" : [
"Hits"
],
"RequiredVisitRating" : 0,
"Site_ID" : 1,
"Status" : "Active",
"Updated" : "2016-06-24T15:18:19",
"UrlCriteriaRegEx" : "/",
"UrlForPreview" : "http://www.domain.com",
"IsCritical" : true,
"Description" : "",
"MeasurementType" : "page_views",
"CreateTime" : "2016-06-24T15:18:19"
}
A resource that shows information for an individual Response Point. This view also includes an array of associated Campaigns, which show the Campaigns that contain the Response Point.
Note: Response Points are called Metrics in the current version of SiteSpect.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/responsepoint/{responsepoint-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
responsepoint-id | The ID of the Response Point. |
Body Properties Post Put
Field | Type | Description |
---|---|---|
name | String | |
capturecginameoptional | String |
Default value: |
capturebodycontentregexoptional | String |
Default value: |
countuserwhentriggeredoptional | Boolean |
Default value: Allowed values: |
compositeequationoptional | String |
Default value: |
customvarurlparameteroptional | String |
Required if the Responsepoint is CustomVariable
Default value: |
customvarbodytextoptional | String |
Required if the Responsepoint is CustomVariable
Default value: |
evaluationsequenceoptional | Integer |
Default value: Size range: |
isbaselineoptional | Boolean |
Default value: Allowed values: |
iscompositeoptional | Boolean |
Default value: Allowed values: |
tagsoptional | integer/string/array | Integer, String, non-empty array of Strings/Integers, comma delimited
String
Default value: |
matchconditionsoptional | Object[] | An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'}
]
Default value: |
newvisitratingoptional | Integer |
Default value: Size range: |
prepopulatedrpoptional | Boolean |
Default value: Allowed values: |
reportingmetricsoptional | String | H:# Hits, B:Beta Hits, T:Transfer Time per hit, V:Captured value per hit,
S:transfer time (seconds) per hit, C: Custom Variable
Default value: Allowed values: |
requirevisitratingoptional | Integer |
Default value: Size range: |
statusoptional | String |
Default value: Allowed values: |
urlforpreviewoptional | String |
Default value: |
ismobileappoptional | Boolean |
Default value: Allowed values: |
mobiletokenoptional | String | Required if ismobileapp is true |
measurementtypeoptional | String |
Default value: |
IsCriticaloptional | Boolean |
Default value: |
Descriptionoptional | String |
Default value: |
Response Points (Metrics)
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/responsepoints"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/responsepoints",
"title" : "All Response Points associated with this Site"
}
},
"_embedded" : {
"responsepoints" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/responsepoint/1 ",
"title" : "Response Point Details"
},
"BodyContentCriteriaRegEx" : "",
"CgiNameCriteria" : "",
"CgiValueCriteriaRegEx" : "",
"CompositeEquation" : null,
"CountUserWhenTriggered" : false,
"EvaluationSequence" : 75,
"HTTPHeaderNameRegEx" : "",
"HTTPHeaderValueRegEx" : "",
"ID" : 1,
"IsBaseline" : false,
"IsComposite" : false,
"Name" : "RP1",
"NewVisitRating" : 0,
"ReportingMetrics" : [
"Hits"
],
"RequiredVisitRating" : 0,
"Site_ID" : 1,
"Status" : "Active",
"Updated" : "2016-06-24T15:18:19",
"UrlCriteriaRegEx" : "/",
"CreateTime" : "2016-06-24T15:18:19",
"UrlForPreview" : "http://www.domain.com",
"IsCritical" : true,
"Description" : "",
"MeasurementType" : "page_views",
},
{
...
}
]}
}
A collection of Response Points from a specific Site or Campaign, including a subset of each individual Response Point resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view Response Points for a given Site or for a specific Campaign. The collection call does not include information about associated Campaigns.
Note: Response Points are called Metrics in the current version of SiteSpect.
Resource URIs
https://admin1.sitespect.com/api/site/{site-id}/responsepoints/{responsepoints-status}
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id}/responsepoints
URL Parameters Get
Field | Type | Description |
---|---|---|
responsepoints-status |
string |
Optional Allowed values:
|
Segment
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/segment/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, POST, PUT
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/segment/1 ",
"title" : "Individual Segment Details"
}
},
"ID" : 232,
"Status" : "active",
"Equation" : "([ReferringURL] like '%.%')",
"Tag" : "",
"Name" : "Referral: Has Referring URL "
}
A resource that shows information for an individual Segment.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/segment/{segment-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
segment-id | The ID of the Segment. |
Body Properties Post Put
Field | Type | Description |
---|---|---|
name | String | |
equation | Integer/String | |
tagsoptional | integer/string/array | Integer, String, non-empty array of Strings/Integers, comma delimited
String
Default value: |
modeoptional | String |
Default value: Allowed values: |
statusoptional | Integer/String |
Default value: Allowed values: |
Segments
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/segments"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/segments ",
"title" : "All Segments"
}
},
"_embedded" : {
"segments" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/segment/1 ",
"title" : "Individual Segment Details"
},
"ID" : 232,
"Status" : "active",
"Equation" : "([ReferringURL] like '%.%')",
"Tag" : "",
"Name" : "Referral: Has Referring URL"
}
},
{
...
}
]}
}
A collection of Segments from a specific Site, including each individual Segment resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view Segment information, which can be used to organize Campaign report data by a specific Segment.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/segments
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Set
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/set/12"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, PUT, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links": {
"campaigns": {
"href": "https://admin1.sitespect.com/api/site/7/set/12/campaigns",
"title": "Campaigns in a specific Set"
},
"self": {
"href": "https://admin1.sitespect.com/api/site/7/set/12",
"title": "Campaign Set Information"
}
},
"ImportSet": false,
"CanEdit": false,
"UserAsmtCriteriaRelated": [],
"Overlay": false,
"CanEditName": false,
"SetType": "Experiments",
"ID": 12,
"DefaultSet": true,
"CanEditOverlay": false,
"CanDelete": false,
"Campaigns": 0,
"Name": "Experiments"
}
A resource that shows information for an individual Set.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/set/{campaign-set-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
campaign-set-id | The ID of the Campaign Set. |
Body Properties Post
Field | Type | Description |
---|---|---|
name | String | |
overlayoptional | Boolean |
Default value: Allowed values: |
Body Properties Put
Field | Type | Description |
---|---|---|
name | String | |
overlayoptional | Boolean |
Default value: Allowed values: |
Sets
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/sets"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/sets",
"title": "All Campaign Sets for a specific Site"
}
},
"_embedded": {
"sets": [
{
"Name": "Experiments",
"CanDelete": false,
"CanEditOverlay": false,
"Campaigns": 0,
"_links": {
"campaigns": {
"title": "Campaigns in a specific Set",
"href": "https://admin1.sitespect.com/api/site/7/set/12/campaigns"
},
"self": {
"title": "Campaign Set Information",
"href": "https://admin1.sitespect.com/api/site/7/set/12"
}
},
"ID": 12,
"DefaultSet": true,
"CanEdit": false,
"UserAsmtCriteriaRelated": [],
"CanEditName": false,
"Overlay": false,
"SetType": "Experiments",
"ImportSet": false
},
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/set/13",
"title": "Campaign Set Information"
},
"campaigns": {
"title": "Campaigns in a specific Set",
"href": "https://admin1.sitespect.com/api/site/7/set/13/campaigns"
}
},
"ID": 13,
"DefaultSet": false,
"CanEdit": false,
"CanEditName": false,
"UserAsmtCriteriaRelated": [],
"Overlay": true,
"SetType": "Targeting",
"ImportSet": false,
"Name": "Targeting",
"CanEditOverlay": false,
"CanDelete": false,
"Campaigns": 0
}
]
}
}
A collection of Sets from a specific Site, including each individual Set resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to get information on all the Sets and then retrieve Campaigns that belong to a specific Set.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/sets
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Site
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1",
"title" : "Data associated with this Site"
}
},
"ActiveCampaigns" : 1,
"ID" : 1,
"Status" : "Online",
"TotalCampaigns" : 2,
"Created" : "2016-06-24T15:18:02",
"Name" : "Default Site",
"ActiveAssignments" : 100,
"LastModified" : "2016-06-24T15:18:02",
"BackEndProxyTimeout" : 60,
"TotalAssignments" : 100
}
A resource that shows information about an individual Site.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Site Identities
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/sites/siteidentities"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"find" : {
"href" : "https://admin1.sitespect.com/api/site/{site-id}/siteidentity/{siteidentity-id}",
"templated" : 1
},
"self" : {
"href" : "https://admin1.sitespect.com/api/sites/siteidentities",
"title" : "All Site Identities"
}
},
"_embedded" : {
"siteidentities" : [
{
"BackEndIPAddress" : "10.10.10.10",
"BackEndPort" : "8080",
"BackEndProtocol" : "http",
"Description" : "www.domain.com",
"FrontEndName" : "www.domain.com",
"FrontEndPort" : "80",
"FrontEndProtocol" : "http",
"LastPurgeMethod" : "Control Panel",
"LastPurgeTime" : "Never",
"_links" : {
"cachepurge" : {
"href" : "https://admin1.sitespect.com/api/site/1/siteidentity/1/cachepurge",
"title" : "Cache Purge"
},
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/siteidentity/1"
}
}
},
{
...
}
]}
}
A collection of Site Identity resources from all Sites available to the API user, including each individual site identity resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view every Site Identity for each Site, retrieve a subset of Site Identity information, and find sub resources that belong to that Site Identity (like cache purge).
Resource URI
https://admin1.sitespect.com/api/sites/siteidentities
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Site Identity
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/siteidentity/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"cachepurge" : {
"href" : "https://admin1.sitespect.com/api/site/1/siteidentity/1/cachepurge",
"title" : "Cache Purge"
},
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/siteidentity/1"
}
},
"BackEndIPAddress" : "10.10.10.10",
"BackEndPort" : "8080",
"BackEndProtocol" : "http",
"Description" : "www.domain.com",
"FrontEndName" : "www.domain.com",
"FrontEndPort" : "80",
"FrontEndProtocol" : "http",
"LastPurgeMethod" : "Control Panel",
"LastPurgeTime" : "Never"
}
A resource that shows configuration information for an individual Site Identity.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/siteidentity/{siteidentity-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
siteidentity-id | The ID of the Site Identity. |
Site Metrics
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/sitemetrics"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"title": "Site Metrics Information",
"href": "https://admin1.sitespect.com/api/site/7/sitemetrics"
}
},
"NewUsers": {
"data": [
{
"date": "2016-05-10",
"traffic": 0
},
{
"traffic": 0,
"date": "2016-05-27"
},
...
],
"FID": 7,
"Total": 0,
"ChildFID": 0,
"Category": 0,
"SubCategory": 0,
"Site_ID": 7,
"DayCount": 0
},
"Robot": {
"FID": 7,
"Total": 0,
"data": [
{
"traffic": 0,
"date": "2016-03-12"
},
{
"traffic": 0,
"date": "2016-04-26"
},
...
],
"Site_ID": 7,
"DayCount": 0,
"ChildFID": 0,
"Category": 0,
"SubCategory": 6
},
"UserAsmtCritSample": {
"data": [
{
"date": "2016-03-04",
"traffic": 0
},
{
"traffic": 0,
"date": "2016-03-23"
},
...
],
"Total": 0,
"FID": 7,
"Category": 0,
"SubCategory": 9,
"ChildFID": 0,
"Site_ID": 7,
"DayCount": 0
},
"UnassignedUsers": {
"Total": 0,
"FID": 7,
"data": [
{
"date": "2016-03-16",
"traffic": 0
},
{
"traffic": 0,
"date": "2016-03-02"
},
...
],
"DayCount": 0,
"Site_ID": 7,
"SubCategory": 2,
"Category": 0,
"ChildFID": 0
},
"HumanTestNotInjected": {
"data": [
{
"traffic": 0,
"date": "2016-05-02"
},
{
"date": "2016-03-08",
"traffic": 0
},
...
],
"Total": 0,
"FID": 7,
"Category": 0,
"SubCategory": 5,
"ChildFID": 0,
"Site_ID": 7,
"DayCount": 0
},
"ReturnUsers": {
"Category": 0,
"SubCategory": 10,
"ChildFID": 0,
"DayCount": 0,
"Site_ID": 7,
"data": [
{
"date": "2016-04-23",
"traffic": 0
},
{
"date": "2016-04-10",
"traffic": 0
},
...
],
"Total": 0,
"FID": 7
},
"HumanTestNoCookie": {
"FID": 7,
"Total": 0,
"data": [
{
"date": "2016-04-17",
"traffic": 0
},
{
"date": "2016-03-24",
"traffic": 0
},
...
],
"Site_ID": 7,
"DayCount": 0,
"ChildFID": 0,
"Category": 0,
"SubCategory": 7
},
"NewAssignment": {
"data": [
{
"date": "2016-04-16",
"traffic": 0
},
{
"traffic": 0,
"date": "2016-05-14"
},
...
],
"Total": 0,
"FID": 7,
"Category": 0,
"SubCategory": 1,
"ChildFID": 0,
"DayCount": 0,
"Site_ID": 7
},
"HumanTestNoJS": {
"DayCount": 0,
"Site_ID": 7,
"ChildFID": 0,
"Category": 0,
"SubCategory": 8,
"FID": 7,
"Total": 0,
"data": [
{
"date": "2016-03-25",
"traffic": 0
},
{
"traffic": 0,
"date": "2016-05-22"
},
...
]
},
"AssignedVisits": {
"Site_ID": 7,
"DayCount": 0,
"SubCategory": 3,
"Category": 0,
"ChildFID": 0,
"Total": 0,
"FID": 7,
"data": [
{
"traffic": 0,
"date": "2016-04-23"
},
{
"traffic": 0,
"date": "2016-04-26"
},
...
]
}
}
A collection of traffic data from a specific Site, including Total Visits, Assigned Visits, Unassigned Visits, New Users, Page Views, Metrics Collected, Variations Triggered, Report Records Added, and Robot Activity.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/sitemetrics
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Site Variation
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/sitevariation/2"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, PUT, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/sitevariation/2 ",
"title" : "Site Variation Details"
}
},
"ID" : 2,
"ApplyOnRPVHit" : "Always",
"ApplyOnTestStatus" : "All Traffic",
"DisableWhenNoMatch" : false,
"EvaluationSequence" : 110,
"Tags" : [],
"Name" : "Days",
"NewVisitRating" : 0,
"ReplacementText" : "Monday to Friday",
"RequiredVisitRating" : 0,
"SearchText" : "Mon - Fri",
"SiteID" : 1,
"Status" : "Inactive",
"Updated" : "2016-07-01T19:29:02",
"UrlForPreview" : "http://www.domain.com/",
"OriginExperimentType" : "None",
"OriginName" : "",
"OriginValue" : ""
}
A resource that shows information about an individual Site Variation.
Campaign variations, a type of Site Variation associated with specific campaign(s), can be identified by looking at the “type" parameter which has the value “Campaign” for Campaign Variations and “Site” for Site Variations. Campaign Variations will also have “CampaignIDs” array showing the associated campaigns.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/sitevariation/{sitevariation-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
sitevariation-id | The ID of the Site Variation. |
Body Properties Post Put
Field | Type | Description |
---|---|---|
name | String | |
applyonteststatusoptional | String |
Default value: Allowed values: |
applyonrpvhitoptional | String |
Default value: Allowed values: |
disablewhennomatchoptional | Boolean |
Default value: Allowed values: |
evaluationsequenceoptional | Integer |
Default value: Size range: |
tagsoptional | integer/string/array | Integer, String, non-empty array of Strings/Integers, comma delimited
String
Default value: |
matchconditionsoptional | Object[] | An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'}
]
Default value: |
newvisitratingoptional | Integer |
Default value: Size range: |
replacementtextoptional | String |
Default value: |
requiredvisitratingoptional | Integer |
Default value: Size range: |
searchtextoptional | String |
Default value: |
statusoptional | String |
Default value: Allowed values: |
scheduledendtimeoptional | Date/String |
Valid ISO8601 Date |
scheduledstarttimeoptional | Date/String |
Valid ISO8601 Date |
urlforpreviewoptional | String |
Default value: |
Type | String |
Default value: Allowed values: |
CampaignIDs | Array |
Default value: |
OriginExperimentType | String |
Default value: |
OriginName | String | Required if OriginExperimentType is set
Default value: |
OriginValue | String | Required if OriginExperimentType is set
Default value: |
Site Variations
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/sitevariations"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/sitevariations",
"title" : "All Site Variations associated with a Site"
}
},
"_embedded" : {
"segments" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/sitevariation/2 ",
"title" : "Site Variation Details"
},
"ID" : 2,
"ApplyOnRPVHit" : "Always",
"ApplyOnTestStatus" : "All Traffic",
"DisableWhenNoMatch" : false,
"EvaluationSequence" : 110,
"Tags" : [],
"Name" : "Days",
"NewVisitRating" : 0,
"ReplacementText" : "Monday to Friday",
"RequiredVisitRating" : 0,
"SearchText" : "Mon - Fri",
"SiteID" : 1,
"Status" : "Inactive",
"Updated" : "2016-07-01T19:29:02",
"UrlForPreview" : "http://www.domain.com/",
"OriginExperimentType" : "None",
"OriginName" : "",
"OriginValue" : ""
}
},
{
...
}
]}
}
A collection of Site Variations from a specific Site, including each individual Site Variation resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view all the Site Variations that are making change to a website or web page. This is similar to the Campaigns call and allows you to filter by status by appending a forward slash and the words active or inactive to the end of the URL.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/sitevariations
URL Parameters Get
Property | Description |
---|---|
site-id | The ID of the Site. |
Body Properties
Field | Type | Description |
---|---|---|
sitevariations-statusoptional | String |
Allowed values: |
Sites
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/sites"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" :
"self" : {
"href" : "https://admin1.sitespect.com/api/sites",
"title" : "All Site Data"
}
},
"_embedded" : {
"sites" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1 ",
"title" : "Data associated with this Site"
},
"ActiveCampaigns" : 1,
"ID" : 1,
"Status" : "Online",
"TotalCampaigns" : 2,
"Created" : "2016-06-24T15:18:02",
"Name" : "Default Site",
"ActiveAssignments" : 100,
"LastModified" : "2016-06-24T15:18:02",
"BackEndProxyTimeout" : 60,
"TotalAssignments" : 100
}
},
{
...
}
]}
}
A collection of Site resources from all Sites available to the API user, including each individual Site resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view information about each Site and find sub resources that belong to that Site (like Campaigns).
Resource URI
https://admin1.sitespect.com/api/sites
Tag
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/tag/19"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"CreateTime": "2016-05-30T15:50:56",
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/tag/19",
"title": "Individual Tag Details"
}
},
"Name": "testing",
"ID": 19,
"TagTextURIEncoded": "testing",
"TagCount": 0
}
A resource that shows information for an individual Tag.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/tag/{tag-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
tag-id | The ID of the Tag. |
Body Properties Post
Field | Type | Description |
---|---|---|
name |
string |
Required Default value: Size range: Allowed values:
|
Tags
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/tags"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/tags",
"title": "All Tags for this Site"
}
},
"_embedded": {
"tags": [
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/tag/19",
"title": "Individual Tag Details"
}
},
"CreateTime": "2016-05-30T15:50:56",
"Name": "testing",
"ID": 19,
"TagTextURIEncoded": "testing",
"TagCount": 0
}
]
}
}
A collection of Tags from a specific Site, including each individual Tag resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view Tag information, which can be used in the future to perform search operations for a Tag.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/tags
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Top Segments Configuration
This resource configures Top Segments reports at the Site or Campaign level. You can use the Top Segments report in the Campaign Data resource to generate the report.
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/topsegments/configuration"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, PUT
#Content-Type: application/json
{
"_links": {
"self": {
"title": "Site Default Top Segments Configuration",
"href": "https://admin1.sitespect.com/api/site/1/topsegments/configuration"
}
},
"metric": {
"ReportingMetrics": [
"Beta Hits"
],
"Name": "Contact Us - CONFIRMATION",
"_links": {
"self": {
"title": "Response Point Details",
"href": "https://admin1.sitespect.com/api/site/1/responsepoint/8312"
}
},
"Optimization": "B",
"ID": 8312
},
"segments": [
{
"Name": "All",
"Sort": 1
},
{
"Name": "Device: Is Mobile",
"ID": 8258,
"Sort": 2,
"_links": {
"title": "Individual Segment Details",
"href": "https://admin1.sitespect.com/api/site/1/segment/8258"
}
},
{
"Name": "Geo: US",
"ID": 8268,
"Sort": 3,
"_links": {
"title": "Individual Segment Details",
"href": "https://admin1.sitespect.com/api/site/1/segment/8268"
}
},
{
"Sort": 4,
"_links": {
"title": "Individual Segment Details",
"href": "https://admin1.sitespect.com/api/site/1/segment/8262"
},
"ID": 8262,
"Name": "User: First Visit in Campaign"
},
{
"Name": "User: Repeat Visit in Campaign",
"Sort": 5,
"_links": {
"href": "https://admin1.sitespect.com/api/site/1/segment/8263",
"title": "Individual Segment Details"
},
"ID": 8263
}
]
}
Resource URIs
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign_id}/topsegments/configuration
https://admin1.sitespect.com/api/site/{site-id}/topsegments/configuration
Body Properties Put
Field | Type | Description |
---|---|---|
segments | Integer[] | Array of Segment IDs |
optimizationmetric | String | H:# Hits, B:Beta Hits, T:Transfer Time per hit, V:Captured value per hit,
S:transfer time (seconds) per hit
Allowed values: |
metric | Integer | ID of metric/responsepoint |
setsitedefaultsoptional | Boolean |
Allowed values: |
Traffic Trends
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/campaign/15/traffic"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/campaign/15/traffic",
"title": "Campaign Traffic Information"
}
},
"Assignment": [
{
"traffic": 0,
"date": "2016-05-11"
},
...
],
"VisitsUncounted": [
{
"traffic": 0,
"date": "2016-05-11"
},
….
],
"VisitsCounted": [
{
"traffic": 0,
"date": "2016-05-11"
},
...
]
}
A collection of traffic for a specific Campaign, including Visits Counted, Visits Uncounted, and Assignment information.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id}/traffic
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
campaign-id | The ID of the Campaign. |
User
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/user/4"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, PUT, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links": {
"self": {
"title": "User Details",
"href": "https://admin1.sitespect.com/api/user/4"
}
},
"State": null,
"Address2": null,
"Country": null,
"EnableAutoEscape": "1",
"ExpireTime": "Never",
"LastName": "My Last Name",
"CompanyName": null,
"Device_ID": null,
"Phone": null,
"City": null,
"Email": "test@sitespect.com",
"TimeZone_Code": "GMT",
"AuthToken": "sOyTA3wertQwdaI7g32PdaTLR",
"LockoutTime": "0",
"Permissions": [
{
"Site_ID": "7",
"Privilege": "Campaign Auditor"
}
],
"Fax": null,
"BillingEntity": "",
"Status": "Enabled",
"ClickwrapAcceptanceTime": "2012-02-07T15:28:31",
"CreateTime": "2016-05-27T19:37:10",
"SystemAdmin": true,
"Zip": null,
"TimeZone_Offset": "+0000",
"LastLoginTime": "1401463037",
"AutoGeneratedPassword": true,
"LastAccessTime": "1401463686",
"FailedLoginAttempts": 0,
"UserInterfaceSettings": {
"EnableAlerts": true,
"TimeZone": "GMT",
"PreviewPopUpSetting_ObjectOnly": true,
"EnableExpertFeatures": true,
"ShowHelpIcons": true,
"PreviewPopUpSetting_All": true,
"TextAreaRows": 7,
"PreviewPopUpSetting_ShareableLinks": false
},
"Username": "testuser",
"PasswordExpireTime": "1408995442",
"ID": "4",
"LoginCount": 9,
"Creator_ID": 0,
"Address1": null,
"FirstName": "My First Name",
"UnreadMessageCount": 1
}
A resource that shows user account and profile information for a specific user.
Resource URI
https://admin1.sitespect.com/api/user/{username|user-id}
URL Parameters
Property | Description |
---|---|
username OR user-id | The ID of the user OR the username |
Body Properties Post Put
Field | Type | Description |
---|---|---|
String | ||
username | String | |
address1optional | String |
Default value: |
address2optional | String |
Default value: |
cityoptional | String |
Default value: |
countryoptional | String |
Default value: |
deviceidoptional | Integer |
Default value: |
faxoptional | String |
Default value: |
passwordoptional | String |
Default value: |
currentpasswordoptional | String |
Your current password. Required only when you want to create a new password. |
phoneoptional | String |
Default value: |
stateoptional | String |
Default value: |
userinterfacesettingsoptional | Object | An Object containing one or more of the following properties: enablealerts,
enableexpertfeatures, previewpopupsetting_all, previewpopupsetting_Objectonly,
previewpopupsetting_shareablelinks, showhelpicons, textarearows, timezone
Default value: |
zipoptional | String |
Default value: |
SA User
Field | Type | Description |
---|---|---|
billingentityoptional | String |
Default value: |
companynameoptional | String |
Default value: |
enableautoescapeoptional | Boolean |
Default value: Allowed values: |
expiretimeoptional | Date | When set to 0, the user account will never expire.
Default value: |
firstnameoptional | String |
Default value: |
lastnameoptional | String |
Default value: |
permissionsoptional | Object[] | An array of Objects containing valid Privilege and Site_ID settings
Default value: |
resetpasswordoptional | Boolean |
Default value: Allowed values: |
statusoptional | String |
Default value: Allowed values: |
systemadminoptional | Boolean |
Default value: Allowed values: |
Users
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/users"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" :
"self" : {
"href" : "https://admin1.sitespect.com/api/users",
"title" : "All User Data"
}
},
"_embedded" : {
"users" : [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/user/1 ",
"title" : "User Details"
},
"history" : {
"href" : "https://admin1.sitespect.com/api/user/1/events ",
"title" : "History of Changes to this User"
},
"ManageUsers" : "true",
"Device_ID" : "null",
"Email" : "test@gmail.com",
"ClickwrapAcceptanceTime" : "2012-02-07T15:28:31",
"Country" : "null",
"PasswordExpireTime" : "1492030856",
"UserBlacklist" : [],
"FailedLoginAttempts" : "0",
"Labs" : {
"Page-LevelCustomVariable"" : false,
"NewLook" : false,
"VisualEditor" : false,
"NewBuildFlow" : false,
},
"UserInterfaceSettings" : {
"ShowHelpIcons" : true,
"PreviewPopUpSetting_ShareableLinks" : false,
"EnableExpertFeatures" : true,
"TimeZone" : "GMT",
"PreviewPopUpSetting_All" : true,
"TextAreaRows" : 7,
"PreviewPopUpSetting_ObjectOnly" : true,
"EnableAlerts" : true,
},
"BillingEntity" : "",
"SystemAdmin"" : true,
"SslAdmin" : false,
"Status" : "Enabled",
"LastAccessTime" : "1484254830",
"Creator_ID" : 0,
"CreateTime"" : "2017-01-10T21:42:56",
"LoginCount" : 8,
"LastLoginTime" : "1484254699",
"Address1" : "Boston",
"AutoGeneratedPassword"" : true,
"City" : null,
"LastName" : null,
"State" : null,
"TimeZone_Offset" : "+0000",
"SslKeyUploader" : false,
"TimeZone_Code" : "GMT",
"ID" : "1",
"AuthToken" : "KKSZl4kSn6bsR5uHqKrUEEjuH",
"EnableAutoEscape" : "1",
"FirstName" : null,
"Fax" : null,
"Zip" : null,
"LockoutTime" : "0",
"Phone" : null,
"UnreadMessageCount" : 0,
Permissions : [],
"CompanyName" : null,
"UserWhiteList" : [],
"Address2" : null,
"Username" : "Test",
"ExpireTime" : "Never",
}
},
]
}
A collection of Users resources from all Users available to the API user, including each individual User resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view information about each User and find sub resources that belong to that User (like Campaigns).
Resource URI
https://admin1.sitespect.com/api/users
Variation
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/factor/32/variation/113"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, PUT, POST
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/factor/32/variation/113",
"title": "Variation Details"
}
},
"ModificationRegExReplace": "find",
"Priority": 50,
"ID": 113,
"ParentVariationID": null,
"NewRating": 0,
"AsmtCountLogic": 1,
"Tags": [],
"VariationRedirectType": 0,
"UrlForPreview": "http://test.domain.com",
"DisableWhenCookieConflict": false,
"Status": "Active",
"RequireRating": 0,
"OriginCookieValue": null,
"AssociatedCampaigns": [],
"IsMobileApp": false,
"DisableWhenNoMatch": true,
"AmpsFilter": null,
"MobileToken": null,
"ApplyOnTestStatus": "0",
"Name": "search to find",
"OriginCookieName": null,
"ParentFactorID": null,
"ModificationRegExSearch": "search"
}
A resource that shows information for an individual Variation.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/factor/{factor-id}/variation/{variation-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
factor-id | The ID of the Factor. |
variation-id | The ID of the Variation. |
Body Properties Post Put
Field | Type | Description |
---|---|---|
name | String | |
applyonteststatusoptional | Integer | 0: always, 1: variation shown, 2: response point hit, 3: variation shown
or response point hit
Default value: Allowed values: |
asmtcountlogicoptional | Boolean |
Default value: Allowed values: |
displayorderoptional | Integer |
Default value: |
tagsoptional | integer/string/array | (Integer, String, non-empty array of Strings/Integers, comma delimited
String)
Default value: |
modificationregexsearchoptional | String |
Default value: |
modificationregexreplaceoptional | String |
Default value: |
modificationattributesoptional | Object |
Default value: |
modificationcssoptional | Object |
Default value: |
modificationscriptoptional | String |
Default value: |
newvisitratingoptional | Integer |
Default value: Size range: |
origincookievalueoptional | String | Alias for controloriginname, either field name can be used here
Default value: |
parentvariationidoptional | Integer | |
previewoptional | String |
Default value: |
redirectoptional | Integer | 0: not a redirect variation, 1: 301 redirect, 2: 302 redirect, 3: internal
redirect
Allowed values: |
requirevisitratingoptional | Integer |
Default value: Size range: |
sitevariationoptional | Boolean |
Default value: Allowed values: |
statusoptional | Integer | -1: disabled, 0: inactive, 1: active
Default value: Allowed values: |
urlforpreviewoptional | String |
Default value: |
Variation Group
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/campaign/2/variationgroup/1"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET, DELETE, POST, PUT
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaign/2/variationgroup/1"
}
},
"ID" : 1,
"Status" : "Active",
"Control" : true,
"Name" : "CONTROL GROUP",
"Assignments" : 12322,
"Visits" : 0,
"AssignmentFrequency" : 100,
"Screenshots" : [],
"Variations" : [
{
"VariationName" : "CONTROL",
"AmpsFilter" : "combine_css",
"FactorID" : 318,
"VariationID" : 721,
"Control" : true,
"OriginExperiment" : null,
"FactorName" : "Combine CSS",
"LinkedVariation" : false,
"ParentFactorID" : null
},
{
"VariationName" : "CONTROL",
"AmpsFilter" : "combine_javascript",
"FactorID" : 299,
"VariationID" : 683,
"Control" : true,
"OriginExperiment" : null,
"FactorName" : "Combine JavaScript",
"LinkedVariation" : false,
"ParentFactorID" : null
}
]
}
A resource that shows detailed information about a Variation Group from a specific Campaign. The group includes all individual Variations that together make changes for the Campaign. The response for the group includes details about Status, assignments, visits and much more. In addition, each individual Variation provides even more detail.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id}/variationgroup/{variationgroup-id}
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
campaign-id | The ID of the Campaign. |
variation-id | The ID of the Variation. |
Body Properties Post Put
Field | Type | Description |
---|---|---|
name | String | |
assignmentfrequencyoptional | Integer |
Default value: Size range: |
iscontroloptional | Boolean |
Default value: Allowed values: |
purgeoptional | Boolean |
Default value: Allowed values: |
screenshotsoptional | Object[] | An array of objects. [{'file': Image that is encoded to base64 string,'name':filename}] Passing this in array will delete screenshot: {"name": "image1", delete: true} Default value: |
statusoptional | String |
Default value: Allowed values: |
variationsoptional | Integer[] | Array of variation IDs
Default value: |
Variation Groups
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/campaign/2/variationgroups"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaign/2/variationgroups",
"title" : " All Variation Groups "
}
},
"_embedded" :
"variationgroups": [
{
"_links" : {
"self" : {
"href" : "https://admin1.sitespect.com/api/site/1/campaign/2/variationgroup/1"
}
},
"ID" : 1,
"Status" : "Active",
"Control" : true,
"Name" : "CONTROL GROUP",
"Assignments" : 12322,
"Visits" : 0,
"AssignmentFrequency" : 100,
"Screenshots" : [],
"Variations" : [
{
"VariationName" : "CONTROL",
"AmpsFilter" : "combine_css",
"FactorID" : 318,
"VariationID" : 721,
"Control" : true,
"OriginExperiment" : null,
"FactorName" : "Combine CSS",
"LinkedVariation" : false,
"ParentFactorID" : null
},
{
"VariationName" : "CONTROL",
"AmpsFilter" : "combine_javascript",
"FactorID" : 299,
"VariationID" : 683,
"Control" : true,
"OriginExperiment" : null,
"FactorName" : "Combine JavaScript",
"LinkedVariation" : false,
"ParentFactorID" : null
}
]
},
{
...
}
]
}
}
A collection of Variation Group resources for a specific Campaign including each individual Variation Group resource inserted into the “_embedded” JSON object. Retrieving this collection allows the client to view all Variation Groups for a Campaign, which provides a lot of detail about all the changes SiteSpect is making with the Campaign. Similar to the Campaigns call, you can filter by status by appending a forward slash and the words active or inactive to the end of the URL.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id}/variationgroups/{variationgroups-status}
URL Parameters Get
Field | Type | Description |
---|---|---|
variationgroups-statusoptional | String |
Allowed values: |
Variations
Example Request
curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/7/factor/32/variations"
Example Response
#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9998
{
"_links": {
"self": {
"title": "Variations associated with this Site",
"href": "https://admin1.sitespect.com/api/site/7/factor/32/variations"
}
},
"_embedded": {
"variations": [
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/factor/32/variation/113",
"title": "Variation Details"
}
},
"Name": "search to find",
"OriginCookieName": null,
"ModificationRegExSearch": "search",
"ParentFactorID": null,
"MobileToken": null,
"ApplyOnTestStatus": "0",
"DisableWhenNoMatch": true,
"AmpsFilter": null,
"IsMobileApp": false,
"OriginCookieValue": null,
"Status": "Active",
"RequireRating": 0,
"UrlForPreview": "http://test.domain.com",
"DisableWhenCookieConflict": false,
"VariationRedirectType": 0,
"ParentVariationID": null,
"AsmtCountLogic": 1,
"Tags": [],
"NewRating": 0,
"ID": 113,
"ModificationRegExReplace": "find",
"Priority": 50
},
{
"_links": {
"self": {
"href": "https://admin1.sitespect.com/api/site/7/factor/32/variation/112",
"title": "Variation Details"
}
},
"DisableWhenCookieConflict": false,
"UrlForPreview": "http://test.domain.com",
"AsmtCountLogic": 1,
"NewRating": 0,
"ParentVariationID": null,
"Tags": [],
"VariationRedirectType": 0,
"ID": 112,
"ModificationRegExReplace": "find",
"Priority": 50,
"Name": "Template",
"ModificationRegExSearch": "search",
"OriginCookieName": null,
"ParentFactorID": null,
"DisableWhenNoMatch": false,
"AmpsFilter": null,
"MobileToken": "Template",
"ApplyOnTestStatus": "0",
"IsMobileApp": false,
"Status": "Active",
"RequireRating": 0,
"OriginCookieValue": null
}
]
}
}
A collection of Variations of a specific Factor, including each individual Variation resource inserted into the “_embedded” JSON object. The API returns one CONTROL Variation for each Factor, which can be identified with “Template” value under “Name”.
Resource URI
https://admin1.sitespect.com/api/site/{site-id}/factor/{factor-id}/variations
URL Parameters
Property | Description |
---|---|
site-id | The ID of the Site. |
Errors
The following is an example of error code structure from an API call without proper authentication:
{
"errors" : {
"message" : { "Invalid or Missing Authentication"}
}
}
Errors are returned using standard HTTP error code syntax and any additional information is included in the body of the response, JSON-formatted. Here are some standard API errors:
Error Code | Text | Description |
---|---|---|
400 | Bad Request | The request was invalid and further information is included in the error message. |
401 | Unauthorized | The user was not authenticated due to a missing or incorrect API token |
403 | Forbidden | The request is understood but it has been refused or access is not allowed. The error message will contain more information. |
404 | Not Found | Resource not found in the specified path. |
405 | Method Not Allowed | The type of HTTP request you attempted is not allowed. Check the Allow response header for allowed methods on this resource. |
429 | Too Many Requests | The user has sent too many requests in a given amount of time. Please check the rate limit headers. |
500 | Internal Error | The service encountered an error. Please try again later or contact support. |
Rate Limiting
Example Request:
curl \
-H "X-API-TOKEN: brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/campaigns"
#HTTP/1.1 200 OK
#Status: 200 OK
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9800
We limit requests to 10000 per hour, 100 reports requests per hour and 5 simultaneous requests at any given time for each API token. These limits can be lifted for Enterprise customers.
You can check the returned HTTP headers of any API request to see your current status.
CORS Whitelist
Normally, browsers block client-side requests across different origins. To help you work around this restriction, SiteSpect has a Cross-Origin Resource Sharing (CORS) Whitelist, which adds specific headers to the SiteSpect server response that allow such cross-domain communication. To add your domain to the CORS Whitelist, please contact Help Desk.