SiteSpect Admin API Reference

The Admin API allows programmatic access to perform nearly any operation that can be performed from the SiteSpect Control Panel.

The SiteSpect Admin API is based on REST principles and allows you to interact with the SiteSpect Control Panel 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.

Table of Contents


Base URL and Discoverability

Authentication/Token

JSON, Dates, and Formatting

HTTP Methods

Resources

Errors

Rate Limiting

CORS Whitelist

Batch Admin API calls

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://control-panel-base-url.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

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.

Resource

/api/token

Token Body Properties

ParamTypeRequired
apikeystringYes
usernamestringYes
passwordstringYes

Example Request with apikey:

curl \
-d '{"apikey":"8as7d98sd7a9asdasdasda"}' \
-X POST "https://admin1.sitespect.com/api/token"

Example Request with username and password:

curl \
-d '{"username":"john","password":"paS4w0rd"}' \
-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 Control Panel 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.

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

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 ResourceAllowed Methods
Assignment CriteriaGET
Assignment CriterionGET, DELETE, POST
BandwidthGET
Cache PurgePOST (results in a job you can then GET)
CampaignGET, DELETE, POST, PUT
Campaign DataGET, DELETE
CampaignsGET
Data SetGET, DELETE, POST, PUT
Data SetsGET
EventGET, POST
EventsGET
FactorGET, DELETE, POST, PUT
FactorsGET
FileGET, POST
FilesGET
Geo LocationGET
Log FilePOST (results in a log you can then GET)
Log FilesGET
MessageGET, POST
MessagesGET
Page CategoriesGET
Page CategoryGET, DELETE, POST, PUT
Performance SummaryGET
Response PointGET, DELETE, POST, PUT
Response PointsGET
SegmentGET, DELETE, POST, PUT
SegmentsGET
SetGET, DELETE, POST, PUT
SetsGET
SiteGET
Site IdentitiesGET
Site IdentityGET, DELETE
Site MetricsGET
Site VariationGET, DELETE, POST, PUT
Site VariationsGET
SitesGET
TagGET, DELETE, POST
TagsGET
Top Segments ConfigurationGET, PUT
Traffic TrendsGET
UserGET, DELETE, POST, PUT
VariationGET, DELETE, POST, PUT
Variation GroupGET, DELETE, POST, PUT
Variation GroupsGET
VariationsGET

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

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 (Audience) Criteria

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

FieldTypeDescription
ac-status
optional
stringAllowed values: 'active', 'inactive'

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"
                }
            },
            {
                ...
            }
   ]}
}

⬆️

Assignment (Audience) 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.

Resource URI


https://admin1.sitespect.com/api/site/{site-id}/assignmentcriterion/{assignmentcriterion-id}


URL Parameters

PropertyDescription
site-idThe ID of the Site.
assignmentcriterion-idThe ID of the Assignment Criteria.

Body Properties

>FieldTypeDescription
nameString
userasmtcriteria_typeString

Allowed values:'USER_GUID','HTTP_HEADER'

dataset_id
optional
IntegerRequired if userasmtcriteria_type is USER_GUID
http_header_type
optional
String

Allowed values:'Request','Response'

Required if userasmtcriteria_type is HTTP_HEADER

http_header_name
optional
StringRequired if userasmtcriteria_type is HTTP_HEADER
http_header_value
optional
StringRequired if userasmtcriteria_type is HTTP_HEADER
default_campaign_inclusion
optional
IntegerDetermine 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: 0

Allowed values:012

labels
optional
integer/string/arrayInteger, String, non-empty array of Strings/Integers, comma delimited String

Default value: []

status
optional
IntegerThe status of AssignmentCriterion. 0: inactive, 1:active

Default value: 1

Allowed values:01

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" : [] 
}

⬆️

Bandwidth

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


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"
      }
   ]
}

Cache Purge

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

PropertyDescription
site-idThe ID of the Site to which the Site Identity belongs.
siteidentity-idThe ID of the Site Identity.

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"
      }
   }
}

⬆️

Campaign

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

PropertyDescription
site-idThe ID of the Site.
campaign-idThe ID of the Campaign.

Body Parameters

FieldTypeDescription
criticalresponsepointidInteger
nameString
optimizationmetricStringH:# Hits, B:Beta Hits, T:Transfer Time per hit, V:Captured value per hit

Allowed values:'H''B''T''V'

responsepointsInteger[]An array of ResponsePoint IDs
assignmentfrequency
optional
Integer

Default value: 100

Size range: 0,100

campaignset
optional
Integer

Default value: ID of ExperimentsSet

endofcampaignaction
optional
String

Default value: alert

Allowed values:'alert''nonewassignments''pause''end'

endtime
optional
DateWhen the value is set to 0, campaign will run indefinately.

Default value: 0

goal
optional
String

Default value: lowest

Allowed values:'highest''lowest'

tags
optional
integer/string/arrayInteger, String, non-empty array of Strings/Integers, comma delimited String

Default value: []

maxreweightpercent
optional
Integer

Default value: 5

Size range: 1,100

mincontrolweight
optional
Integer

Default value: 10

Size range: 1,100

minsamplesize
optional
Integer

Default value: 1000

Size range: 100,10000

minsignificancelevel
optional
Integer

Default value: 70

Size range: 1,100

mintimerunning
optional
IntegerA number of seconds

Default value: 691200

Size range: 86400,31536000

optimization
optional
String

Default value: off

Allowed values:'off''automated''recommendations'

priority
optional
Integer

Default value: 5

Size range: 1,9

reportsamplerate
optional
Integer

Default value: 100

Size range: 1,100

rptrackbehavior
optional
IntegerSpecify how to track Response Point hits. 0:'from initial assignment', 1:'after being counted'

Default value: 0

Allowed values:01

starttime
optional
Date

Default value: Current Timestamp

status
optional
String

Default value: review

Allowed values:'active-paused''active-disabled''review''active-scheduled''active-running''active-nonewassignments''ended''archived'

timesinceassignmentlimit
optional
IntegerA number of seconds

Default value: 2592000

Size range: 1,712155258

timesincelastvisitlimit
optional
IntegerA number of seconds

Default value: 2592000

Size range: 1,2146878840

userasmtcriteria
optional
Object[]An Array of Objects.'userasmtcriteria': [ { 'id': 'audience_id', 'action': 'include' }, {'id':'audience_id', 'action': 'exclude'} ]

Default value: []

campaignvariation
optional
array[]An Array of Ids.'campaignvariations': [ id,id ]

Default value: []

vargrpasmtheadername
optional
String

Default value: null

vargrpasmtheadertype
optional
String

Default value: N/A

Allowed values:'request''response'

vargrpasmtmethod
optional
String

Default value: default

Allowed values:'default''specific''random'

variations
optional
Integer[]An array of Variation IDs

Default value: []

visitlimitforusers
optional
Integer

Default value: 15

Size range: 1,9999

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"
}

⬆️

Campaign Data

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

PropertyDescription
site-idThe ID of the Site to which the Site Identity belongs.
campaign-idThe ID of the Site Identity.

Optional URL Parameters for Data Export Campaign Data

FieldTypeDescription
accept
optional
StringAccept is a query parameter overwrite of the Accept header.

Default value: csv

Allowed values:'csv''tsv''html'

applied_segment_id
optional
IntegerThis param can be used multiple times to include segments. By default, no segment is included and data will reflect all visits.
endtime
optional
Date/StringValid ISO8601 Date

Default value: Any

excluded_segment_id
optional
IntegerThis param can be used multiple times to exclude segments. By default, no segment is excluded and data will reflect all visits.
lineend
optional
String

Default value: lf

Allowed values:'lf''cr''crlf'

quotes
optional
String

Default value: double

Allowed values:'double''single''none'

segments_andor_flag
optional
String

Default value: or

Allowed values:'and''or'

segment_by
optional
String

Default value: visit

Allowed values:'user''visit'

show_ancillarycookie_val
optional
Boolean

Default value: true

Allowed values:truefalse

show_concurrentcampaigns
optional
Boolean

Default value: true

Allowed values:truefalse

show_factors_id
optional
Boolean

Default value: true

Allowed values:truefalse

show_factors_full
optional
Boolean

Default value: true

Allowed values:truefalse

show_headerrow
optional
Boolean

Default value: true

Allowed values:truefalse

show_mobile_fields
optional
Boolean

Default value: true

Allowed values:truefalse

show_starttime_sse
optional
Boolean

Default value: true

Allowed values:truefalse

show_starttime_english
optional
Boolean

Default value: true

Allowed values:truefalse

show_starttime_excel
optional
Boolean

Default value: true

Allowed values:truefalse

show_totalvisits
optional
Boolean

Default value: true

Allowed values:truefalse

show_timesincefirstvisit
optional
Boolean

Default value: true

Allowed values:truefalse

show_user_guid
optional
Boolean

Default value: true

Allowed values:truefalse

show_uservisit_asmtvisitcount
optional
Boolean

Default value: true

Allowed values:truefalse

show_uservisit_refererurl
optional
Boolean

Default value: true

Allowed values:truefalse

show_uservisit_remoteaddr
optional
Boolean

Default value: true

Allowed values:truefalse

show_uservisit_entrypageurl
optional
Boolean

Default value: true

Allowed values:truefalse

show_useragent
optional
Boolean

Default value: true

Allowed values:truefalse

show_uservisit_pageviews
optional
Boolean

Default value: true

Allowed values:truefalse

show_visitlength
optional
Boolean

Default value: true

Allowed values:truefalse

starttime
optional
Date/StringValid ISO8601 Date

Default value: Any

timezone
optional
String

Default value: GMT

Example Request

curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/campaign/1/campaigndata/dataexport/visit"

Example Response (csv)

/campaigndata/dataexport/ raw data is typically written directly to a file.

#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)"
File Data...

 

Optional URL Parameters for Performance Matrix Campaign Data

/campaigndata/performancematrix data is summary data and has an accept option for json or csv.

FieldTypeDescription
accept
optional
StringAccept is a query parameter overwrite of the Accept header.

Default value: csv

Allowed values:'csv''json'

applied_segment_id
optional
IntegerThis param can be used multiple times to include segments. By default, no segment is included and data will reflect all visits.
endtime
optional
Date/StringValid ISO8601 date

Default value: Any

excluded_segment_id
optional
IntegerThis param can be used multiple times to exclude segments. By default, no segment is excluded and data will reflect all visits.
precision
optional
Integer

Default value: 2

Size range: 1,6

prettyprint
optional
Boolean

Default value: false

Allowed values:truefalse

segments_andor_flag
optional
String

Default value: and

Allowed values:'and''or'

show_probability
optional
Boolean

Default value: true

Allowed values:truefalse

show_zscore
optional
Boolean

Default value: true

Allowed values:truefalse

show_responsepoints
optional
Boolean

Default value: true

Allowed values:truefalse

show_uservisitstats
optional
Boolean

Default value: true

Allowed values:truefalse

show_samplestats
optional
Boolean

Default value: true

Allowed values:truefalse

show_avgdeltaperc
optional
Boolean

Default value: true

Allowed values:truefalse

show_avgdelta
optional
Boolean

Default value: true

Allowed values:truefalse

show_std
optional
Boolean

Default value: true

Allowed values:truefalse

show_confgraphic
optional
Boolean

Default value: true

Allowed values:truefalse

show_candlesticks
optional
Boolean

Default value: true

Allowed values:truefalse

starttime
optional
Date/StringValid ISO8601 date

Default value: Any

status
optional
String

Default value: all

Allowed values:'all''active''inactive'

URL Parameters for Top Segments Campaign Data

ParameterTypeRequiredDefaultRangeValid value
metricIntegerYes---
onlyallsegmentIntegerYes--‘1’, '0’
optimizationmetricstringYes--'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).

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

FieldTypeDescription
campaign-status

string

Optional

Allowed values: 'ready', 'active-paused', 'active-disabled', 'review', 'active-scheduled', 'active-running', 'active-nonewassignments', 'ended', 'archived'

recent_active_date

Date/String

Optional

Valid ISO8601 Date

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"
         },
         {
            ...
         }
      ]
   }
}

⬆️

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.

Resource URIs


https://admin1.sitespect.com/api/site/{site-id}/dataset
https://admin1.sitespect.com/api/site/{site-id}/dataset/{id}/data


URL Parameters

PropertyDescription
site-idThe ID of the Site.

Body Parameters

FieldTypeDescription
name

string

Required

Default value: -

Size range: -

Allowed values: -

dataset

string/integer

Optional. An array of strings.
"dataset": ["G123543123","G434312312","G123212222"]

Default value: []

Size range: -

Allowed values: -

reportreference

object

Optional.

Default value: {}

Size range: -

Allowed values: -

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",
    "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"
        }
    }
}

⬆️

 

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.

Resource URI


https://admin1.sitespect.com/api/site/{site-id}/datasets


URL Parameters

PropertyDescription
site-idThe ID of the 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'        },
        {
           ...
        }
   ]}
}

 

⬆️

Event

A resource that shows information for an individual historical event.

Resource URI


https://admin1.sitespect.com/api/site/{site-id}/event/{event-id}


URL Parameters

PropertyDescription
site-idThe ID of the Site.
event-idThe ID of the event.

Body Parameters

FieldTypeDescription
category

string

Required

Default value: -

Size range: -

Allowed values: 'site', 'set', 'siteidentity', 'campaign', 'testcampaign', 'assignmentcriteria', 'responsepoint', 'sitevariation', 'variation', 'factor', 'variationgroup', 'dataset', 'segment', 'adminuser', 'apikey'

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: -

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."
}

⬆️

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.

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

Body Parameters

FieldTypeDescription
event-type

string

Optional

Allowed values: 'site', 'set', 'siteidentity', 'campaign', 'testcampaign', 'assignmentcriteria', 'responsepoint', 'sitevariation', 'variation', 'factor', 'variationgroup', 'dataset', 'segment', 'adminuser', 'apikey'

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."
         }
        },
        {
           ...
        }
   ]}
}

⬆️

Factor (Trigger)

A resource that shows information for an individual Factor.

Resource URI


https://admin1.sitespect.com/api/site/{site-id}/factor/{factor-id}


Body Properties

FieldTypeDescription
nameString
typeString

Allowed values:'amps''clientside''mobile''origin''redirect''regular'

tags
optional
integer/string/arrayInteger, String, non-empty array of Strings/Integers, comma delimited String

Default value: []

status
optional
String

Default value: active

Allowed values:'inactive''active'

Regular Factors

FieldTypeDescription
countuserwhentriggered
optional
Boolean

Default value: true

Allowed values:truefalse

defaultmodificationregexsearch
optional
String

Default value: Empty String

defaultmodificationregexreplace
optional
String

Default value: null

disablecampaign
optional
Boolean

Default value: false

Allowed values:truefalse

evaluationsequence
optional
Integer

Default value: 50

Size range: -100,100

isvisuallyedited
optional
Boolean

Default value: false

Allowed values:truefalse

matchconditions
optional
Object[]An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'} ]

Default value: []

Size range: 0,5

newvisitrating
optional
Integer

Default value: 0

Size range: -127,127

pagecategoryid
optional
Integer
parentfactorid
optional
Integer/String

Default value: undef

requirevisitrating
optional
Integer

Default value: 0

Size range: -127,127

urlforpreview
optional
String

Default value: Default URL for Preview

preview
optional
String

Default value: Empty String

Client-Side Factors

FieldTypeDescription
defaultmodificationregexsearchString
defaultmodificationattributes
optional
Object

Default value: null

defaultmodificationcss
optional
Object

Default value: null

defaultmodificationregexreplace
optional
String

Default value: null

defaultmodificationscript
optional
String

Default value: null

evaluationsequence
optional
Integer

Default value: 50

Size range: -100,100

isvisuallyedited
optional
Boolean

Default value: false

Allowed values:truefalse

matchconditions
optional
Object[]An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'} ]

Default value: []

Size range: 0,5

parentfactorid
optional
Integer/String

Default value: undef

preview
optional
String

Default value: Empty String

urlforpreview
optional
String

Default value: Default URL for Preview

Origin Factor

FieldTypeDescription
controlorigincookienameStringAlias for controloriginname, either field name can be used here
controlorigincookievalueStringAlias for controloriginvalue, either field name can be used here
countuserwhentriggered
optional
Boolean

Default value: true

Allowed values:truefalse

defaultdisablewhencookieconflict
optional
Boolean

Default value: true

Allowed values:truefalse

defaultdisablewhenoriginconflict
optional
Boolean

Default value: true

Allowed values:truefalse

evaluationsequence
optional
Integer

Default value: 50

Size range: -100,100

parentfactorid
optional
Integer/String

Default value: undef

originexperimenttype
optional
String

Default value: header-origin-only

Allowed values:'header-origin-only''header''cookie''url''query-parameter'

urlforpreview
optional
String

Default value: Default URL for Preview

Redirect Factor

FieldTypeDescription
countuserwhentriggered
optional
Boolean

Default value: true

Allowed values:truefalse

defaultmodificationregexsearch
optional
String

Default value: Empty String

defaultmodificationregexreplace
optional
String

Default value: null

defaultvariationredirecttype
optional
Integer/String

Default value: 301

Allowed values:'301''302''internal'

disablecampaign
optional
Boolean

Default value: false

Allowed values:truefalse

evaluationsequence
optional
Integer

Default value: 50

Size range: -100,100

isvisuallyedited
optional
Boolean

Default value: false

Allowed values:truefalse

matchconditions
optional
Object[]An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'} ]

Default value: []

Size range: 0,5

newvisitrating
optional
Integer

Default value: 0

Size range: -127,127

parentfactorid
optional
Integer/String

Default value: undef

requirevisitrating
optional
Integer

Default value: 0

Size range: -127,127

urlforpreview
optional
String

Default value: Default URL for Preview

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": [] 
}

⬆️

Factors (Triggers)

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

FieldTypeDescription
factor-status

string

Optional

Allowed values: 'active', 'inactive'

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
            },
            ...
        ]
    }
}

⬆️

File

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

PropertyDescription
site-idThe ID of the Site.

Body Parameters

FieldTypeDescription
Filename

object

Required

Default value: -

Size range: -

Allowed values: 'formData with a file input with name attribute of "Filename"'

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"
}

⬆️

Files

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

PropertyDescription
site-idThe ID of the Site.

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"
}

⬆️

Geo Location

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

PropertyDescription
site-idThe ID of the Site.

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"
        }
    ]}

⬆️

Log File

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

PropertyDescription
site-idThe ID of the Site.
logfile-idThe ID of the log file.

Body Properties

FieldTypeDescription
start

date

Required

Default value: -

Size range: -

Allowed values: -

end

date

Required

Default value: -

Size range: -

Allowed values: -

siteidentities

integer

Optional

Default value: Array of all SiteIdentities

Size range: -

Allowed values: -

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"           
}

⬆️

Log Files

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

PropertyDescription
site-idThe ID of the Site.

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"           
          }
        },
        {
           ...
        }
   ]}
}

⬆️

Message

A resource that shows information for an individual message.

Resource URI


https://admin1.sitespect.com/api/message/{message-id}


URL Parameters

PropertyDescription
message-idThe ID of the message.

Body Properties

FieldTypeDescription
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: -

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
}

⬆️

Messages

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

PropertyDescription
messages-status

Optional

Allowed values: 'read', 'unread'

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"
            }
        ]
    }
}

⬆️

Page Categories

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


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"
      }
    ]
  }
}

⬆️

Page Category

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

FieldTypeDescription
nameString
matchconditions
optional
Object[]An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'} ]

Default value: []

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/"
    }
  ]
}

⬆️

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.

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

FieldTypeDescription
status
optional
StringOptional Query Parameter used to filter campaigns

Default value: active-running

Allowed values:'active-paused''active-disabled''review''ready''active-scheduled''active-running''active-nonewassignments''ended''archived'

trustworhy
optional
numberOption Query Parameter used to return the days the campaigns has been at 90% significance or more

The value need to be set to 1

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
        }
    ]
}

⬆️

Metric (formerly Response Point)

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

PropertyDescription
site-idThe ID of the Site.
responsepoint-idThe ID of the Response Point.

Body Properties

FieldTypeDescription
nameString
capturecginame
optional
String

Default value: null

capturebodycontentregex
optional
String

Default value: null

countuserwhentriggered
optional
Boolean

Default value: false

Allowed values:truefalse

compositeequation
optional
String

Default value: null

customvarurlparameter
optional
StringRequired if the Responsepoint is CustomVariable

Default value: null

customvarbodytext
optional
StringRequired if the Responsepoint is CustomVariable

Default value: null

evaluationsequence
optional
Integer

Default value: 10

Size range: -100,100

isbaseline
optional
Boolean

Default value: false

Allowed values:truefalse

iscomposite
optional
Boolean

Default value: false

Allowed values:truefalse

tags
optional
integer/string/arrayInteger, String, non-empty array of Strings/Integers, comma delimited String

Default value: []

matchconditions
optional
Object[]An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'} ]

Default value: []

newvisitrating
optional
Integer

Default value: 0

Size range: -127,127

prepopulatedrp
optional
Boolean

Default value: false

Allowed values:truefalse

reportingmetrics
optional
StringH:# 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: H

Allowed values:'H''B''T''V''S''C'

requirevisitrating
optional
Integer

Default value: 0

Size range: -127,127

status
optional
String

Default value: active

Allowed values:'inactive''active'

urlforpreview
optional
String

Default value: Default URL for Preview

ismobileapp
optional
Boolean

Default value: false

Allowed values:truefalse

mobiletoken
optional
StringRequired if ismobileapp is true
measurementtype
optional
String

Default value: "page_views"

IsCritical
optional
Boolean

Default value: false

Description
optional
String

Default value: ""

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"
}

⬆️

Metrics (formerly Response Points)

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.

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

FieldTypeDescription
responsepoints-status

string

Optional

Allowed values: 'active', 'inactive'

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",
        },
        {
           ...
        }
   ]}
}

⬆️

Rolling Stats

Campaign List and Metric RollingStats Information.

Resource URIs


https://admin1.sitespect.com/api/site/{site-id}/campaigns/rollingstats

https://admin1.sitespect.com/api/site/{site-id}/campaign/{campaign-id}/rollingstats

https://admin1.sitespect.com/api/site/{site-id}/responsepoints/rollingstats

https://admin1.sitespect.com/api/site/{site-id}/responsepoint/{responsepoint-id}/rollingstats


Example Request

curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVnLsftcYA" \
"https://admin1.sitespect.com/api/site/1/campaign/1234/rollingstats"

Example Response

#HTTP/1.1 200 OK
#Status: 200 OK
#Allow: GET
#Content-Type: application/json
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9997

{
    "VisitsCounted": [
        {
            "2023-02-10": 4
        },
        {
            "2023-02-09": 2
        },
        {
            "2023-02-08": 6
        },
        {
            "2023-02-07": 5
        },
        {
            "2023-02-06": 6
        },
        {
            "2023-02-05": 2
        },
        {
            "2023-02-04": 3
        },
        {
            "2023-02-03": 2
        },
        {
            "2023-02-02": 4
        },
        {
            "2023-02-01": 8
        },
        {
            "2023-01-31": 5
        },
        {
            "2023-01-30": 6
        },
        {
            "2023-01-29": 2
        },
        {
            "2023-01-28": 0
        },
        {
            "2023-01-27": 3
        },
        {
            "2023-01-26": 9
        },
        {
            "2023-01-25": 4
        },
        {
            "2023-01-24": 0
        },
        {
            "2023-01-23": 0
        },
        {
            "2023-01-22": 0
        },
        {
            "2023-01-21": 0
        },
        {
            "2023-01-20": 0
        },
        {
            "2023-01-19": 0
        },
        {
            "2023-01-18": 0
        },
        {
            "2023-01-17": 0
        },
        {
            "2023-01-16": 0
        },
        {
            "2023-01-15": 0
        },
        {
            "2023-01-14": 0
        },
        {
            "2023-01-13": 0
        },
        {
            "2023-01-12": 0
        },
        {
            "2023-01-11": 0
        },
        {
            "2023-01-10": 0
        }
    ],
    "Assignment": [
        {
            "2023-02-10": 4
        },
        {
            "2023-02-09": 2
        },
        {
            "2023-02-08": 4
        },
        {
            "2023-02-07": 4
        },
        {
            "2023-02-06": 4
        },
        {
            "2023-02-05": 2
        },
        {
            "2023-02-04": 2
        },
        {
            "2023-02-03": 2
        },
        {
            "2023-02-02": 2
        },
        {
            "2023-02-01": 5
        },
        {
            "2023-01-31": 3
        },
        {
            "2023-01-30": 5
        },
        {
            "2023-01-29": 1
        },
        {
            "2023-01-28": 0
        },
        {
            "2023-01-27": 3
        },
        {
            "2023-01-26": 6
        },
        {
            "2023-01-25": 3
        },
        {
            "2023-01-24": 0
        },
        {
            "2023-01-23": 0
        },
        {
            "2023-01-22": 0
        },
        {
            "2023-01-21": 0
        },
        {
            "2023-01-20": 0
        },
        {
            "2023-01-19": 0
        },
        {
            "2023-01-18": 0
        },
        {
            "2023-01-17": 0
        },
        {
            "2023-01-16": 0
        },
        {
            "2023-01-15": 0
        },
        {
            "2023-01-14": 0
        },
        {
            "2023-01-13": 0
        },
        {
            "2023-01-12": 0
        },
        {
            "2023-01-11": 0
        },
        {
            "2023-01-10": 0
        }
    ],
    "_links": {
        "self": {
            "title": "Campaign RollingStats Information",
            "href": "https://admin1.sitespect.com/api/site/1/campaign/1234/rollingstats"
        }
    },
    "VisitsUncounted": [
        {
            "2023-02-10": 649
        },
        {
            "2023-02-09": 1146
        },
        {
            "2023-02-08": 956
        },
        {
            "2023-02-07": 969
        },
        {
            "2023-02-06": 749
        },
        {
            "2023-02-05": 438
        },
        {
            "2023-02-04": 484
        },
        {
            "2023-02-03": 817
        },
        {
            "2023-02-02": 1017
        },
        {
            "2023-02-01": 1122
        },
        {
            "2023-01-31": 1371
        },
        {
            "2023-01-30": 822
        },
        {
            "2023-01-29": 440
        },
        {
            "2023-01-28": 532
        },
        {
            "2023-01-27": 858
        },
        {
            "2023-01-26": 1173
        },
        {
            "2023-01-25": 809
        },
        {
            "2023-01-24": 1
        },
        {
            "2023-01-23": 0
        },
        {
            "2023-01-22": 0
        },
        {
            "2023-01-21": 0
        },
        {
            "2023-01-20": 0
        },
        {
            "2023-01-19": 0
        },
        {
            "2023-01-18": 0
        },
        {
            "2023-01-17": 0
        },
        {
            "2023-01-16": 0
        },
        {
            "2023-01-15": 0
        },
        {
            "2023-01-14": 0
        },
        {
            "2023-01-13": 0
        },
        {
            "2023-01-12": 494
        },
        {
            "2023-01-11": 773
        },
        {
            "2023-01-10": 125
        }
    ]
}

⬆️

Segment

A resource that shows information for an individual Segment.

Resource URI


https://admin1.sitespect.com/api/site/{site-id}/segment/{segment-id}


URL Parameters

PropertyDescription
site-idThe ID of the Site.
segment-idThe ID of the Segment.

Body Properties

FieldTypeDescription
nameString
equationInteger/String
tags
optional
integer/string/arrayInteger, String, non-empty array of Strings/Integers, comma delimited String

Default value: []

mode
optional
String

Default value: Expert

Allowed values:'Normal''Expert'

status
optional
Integer/String

Default value: active

Allowed values:'active''inactive'

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 "
}

⬆️

Segments

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

PropertyDescription
site-idThe ID of the Site.

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"
           }
        },
        {
           ...
        }
   ]}
}

⬆️

Set

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

PropertyDescription
site-idThe ID of the Site.
campaign-set-idThe ID of the Campaign Set.

Body Parameters

FieldTypeDescription
nameString
overlay
optional
Boolean

Default value: false

Allowed values: true, false

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"
}

⬆️

Sets

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

PropertyDescription
site-idThe ID of the Site.

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
            }
        ]
    }
}

⬆️

Site

A resource that shows information about an individual Site.

Resource URI


https://admin1.sitespect.com/api/site/{site-id}


URL Parameters

PropertyDescription
site-idThe ID of the 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
}

⬆️

Site Identities

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

PropertyDescription
site-idThe ID of the Site.

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"
              }
           }
        },
        {
           ...
        }
   ]}
}

⬆️

Site Identity

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

PropertyDescription
site-idThe ID of the Site.
siteidentity-idThe ID of the 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"
}

⬆️

Site Metrics

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

PropertyDescription
site-idThe ID of the Site.

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"
            },
            ...
        ]
    }
}

⬆️

Site Variation

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

PropertyDescription
site-idThe ID of the Site.
sitevariation-idThe ID of the Site Variation.

Body Parameters

FieldTypeDescription
nameString
applyonteststatus
optional
String

Default value: all traffic

Allowed values:'all traffic''non-test traffic''preview traffic''test traffic''test traffic counted only'

applyonrpvhit
optional
String

Default value: always

Allowed values:'always''response point hit''variation shown''variation shown or response point hit'

disablewhennomatch
optional
Boolean

Default value: true

Allowed values:truefalse

evaluationsequence
optional
Integer

Default value: 110

Size range: -127,-101 or 101,127

tags
optional
integer/string/arrayInteger, String, non-empty array of Strings/Integers, comma delimited String

Default value: []

matchconditions
optional
Object[]An Array of Objects.'matchconditions': [ { 'condition': 'value' }, {'condition':'value'} ]

Default value: []

newvisitrating
optional
Integer

Default value: 0

Size range: -127,127

replacementtext
optional
String

Default value: Empty String

requiredvisitrating
optional
Integer

Default value: 0

Size range: -127,127

searchtext
optional
String

Default value: Empty String

status
optional
String

Default value: inactive

Allowed values:'inactive''active''scheduled'

scheduledendtime
optional
Date/String

Valid ISO8601 Date

scheduledstarttime
optional
Date/String

Valid ISO8601 Date

urlforpreview
optional
String

Default value: Default URL for Preview

TypeString

Default value: 'Site'

Allowed values:'Site''Campaign'

CampaignIDsArray

Default value: []

OriginExperimentTypeString

Default value: "None"

OriginNameStringRequired if OriginExperimentType is set

Default value: []

OriginValueStringRequired if OriginExperimentType is set

Default value: []

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" : ""
}

⬆️

Site Variations

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

PropertyDescription
site-idThe ID of the Site.

Body Properties

FieldTypeDescription
sitevariations-status
optional
String

Allowed values:'active''inactive'

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" : ""
           }
        },
        {
           ...
        }
   ]}
}

⬆️

Sites

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


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
            }
        },
        {
           ...
        }
   ]}
}

⬆️

Tag

A resource that shows information for an individual Tag.

Resource URI


https://admin1.sitespect.com/api/site/{site-id}/tag/{tag-id}


URL Parameters

PropertyDescription
site-idThe ID of the Site.
tag-idThe ID of the Tag.

Body Properties

FieldTypeDescription
name

string

Required

Default value: -

Size range: -

Allowed values: -

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
}

⬆️

Tags

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

PropertyDescription
site-idThe ID of the Site.

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
            }
        ]
    } 
}

⬆️

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.

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

FieldTypeDescription
segmentsInteger[]Array of Segment IDs
optimizationmetricStringH:# Hits, B:Beta Hits, T:Transfer Time per hit, V:Captured value per hit, S:transfer time (seconds) per hit

Allowed values:'H''B''T''V''S'

metricIntegerID of metric/responsepoint
setsitedefaults
optional
Boolean

Allowed values:truefalse

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
    }
  ]
}

⬆️

Traffic Trends

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

PropertyDescription
site-idThe ID of the Site.
campaign-idThe ID of the Campaign.

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"
        },
         ...
    ]
}

⬆️

User

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

PropertyDescription
username OR user-idThe ID of the user OR the username

Body Properties

FieldTypeDescription
emailString
usernameString
address1
optional
String

Default value: null

address2
optional
String

Default value: null

city
optional
String

Default value: null

country
optional
String

Default value: null

deviceid
optional
Integer

Default value: null

fax
optional
String

Default value: null

password
optional
String

Default value: Auto Generated Password Use with currentpassword to change your password. When changing passwords, this field is required. Passwords must contain at least 10 characters and must contain at least one lowercase and uppercase character, a digit, and at least one special character.

currentpassword
optional
String

Your current password. Required only when you want to create a new password.

phone
optional
String

Default value: null

state
optional
String

Default value: null

userinterfacesettings
optional
ObjectAn Object containing one or more of the following properties: enablealerts, enableexpertfeatures, previewpopupsetting_all, previewpopupsetting_Objectonly, previewpopupsetting_shareablelinks, showhelpicons, textarearows, timezone

Default value: Default Settings

zip
optional
String

Default value: null

SA User

FieldTypeDescription
billingentity
optional
String

Default value: Empty String

companyname
optional
String

Default value: null

enableautoescape
optional
Boolean

Default value: true

Allowed values:truefalse

expiretime
optional
DateWhen set to 0, the user account will never expire.

Default value: 0

firstname
optional
String

Default value: null

lastname
optional
String

Default value: null

permissions
optional
Object[]An array of Objects containing valid Privilege and Site_ID settings

Default value: null

resetpassword
optional
Boolean

Default value: false

Allowed values:truefalse

status
optional
String

Default value: enabled

Allowed values:'disabled''enabled'

systemadmin
optional
Boolean

Default value: false

Allowed values:truefalse

Example Request

curl \
-H "X-API-TOKEN:brtaP8wzrJwJqbAQVn

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
}

⬆️

Users

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


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",
            }
        },
   ]
}

⬆️

Variation

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

PropertyDescription
site-idThe ID of the Site.
factor-idThe ID of the Factor.
variation-idThe ID of the Variation.

Body Properties

FieldTypeDescription
nameString
applyonteststatus
optional
Integer0: always, 1: variation shown, 2: response point hit, 3: variation shown or response point hit

Default value: 0

Allowed values:0123

asmtcountlogic
optional
Boolean

Default value: true

Allowed values:truefalse

displayorder
optional
Integer

Default value: 100

tags
optional
integer/string/array(Integer, String, non-empty array of Strings/Integers, comma delimited String)

Default value: []

modificationregexsearch
optional
String

Default value: null

modificationregexreplace
optional
String

Default value: null

modificationattributes
optional
Object

Default value: null

modificationcss
optional
Object

Default value: null

modificationscript
optional
String

Default value: null

newvisitrating
optional
Integer

Default value: New Visit Rating of Factor

Size range: -127,127

origincookievalue
optional
StringAlias for controloriginname, either field name can be used here

Default value: null

parentvariationid
optional
Integer
preview
optional
String

Default value: Empty String

redirect
optional
Integer0: not a redirect variation, 1: 301 redirect, 2: 302 redirect, 3: internal redirect

Allowed values:"0 if factor is not redirect factor""1, 2, 3 if factor is redirect factor"

requirevisitrating
optional
Integer

Default value: Require Visit Rating of Factor

Size range: -127,127

sitevariation
optional
Boolean

Default value: false

Allowed values:truefalse

status
optional
Integer-1: disabled, 0: inactive, 1: active

Default value: 1

Allowed values:-101

urlforpreview
optional
String

Default value: Default URL for Preview

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"
}

⬆️

Variation Group

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

PropertyDescription
site-idThe ID of the Site.
campaign-idThe ID of the Campaign.
variation-idThe ID of the Variation.

Body Properties

FieldTypeDescription
nameString
assignmentfrequency
optional
Integer

Default value: 100

Size range: -100,100

iscontrol
optional
Boolean

Default value: false

Allowed values:truefalse

purge
optional
Boolean

Default value: false

Allowed values:truefalse

screenshots
optional
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: []

status
optional
String

Default value: inactive

Allowed values:'inactive''active'

variations
optional
Integer[]Array of variation IDs

Default value: null

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
   }
   ]
}

⬆️

Variation Groups

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

FieldTypeDescription
variationgroups-status
optional
String

Allowed values:'active''inactive'

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
               }
            ]
         },
         {
            ...
         }
      ]
   }
}

⬆️

Variations

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

PropertyDescription
site-idThe ID of the Site.

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
            }
        ]
    }
}

⬆️

Errors

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 CodeTextDescription
400Bad RequestThe request was invalid and further information is included in the error message.
401UnauthorizedThe user was not authenticated due to a missing or incorrect API token
403ForbiddenThe request is understood but it has been refused or access is not allowed. The error message will contain more information.
404Not FoundResource not found in the specified path.
405Method Not AllowedThe type of HTTP request you attempted is not allowed. Check the Allow response header for allowed methods on this resource.
429Too Many RequestsThe user has sent too many requests in a given amount of time. Please check the rate limit headers.
500Internal ErrorThe service encountered an error. Please try again later or contact support.

The following is an example of error code structure from an API call without proper authentication:

{
    "errors" : {
         "message" : { "Invalid or Missing Authentication"}
    }
}

Rate Limiting

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.

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
#X-RateLimit-Limit: 10000
#X-RateLimit-Remaining: 9800

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.

⬆️