List experiments
GET
/api/v1/analytics/experiments
const url = 'https://digize.com/api/v1/analytics/experiments';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/analytics/experiments \ --header 'x-api-key: <x-api-key>'The workspace’s A/B tests on its sites, newest first: each one’s site, pages, variants, goal and whether it’s a draft, running, paused or ended. Results are in analytics.experiments.get.
Needs the analytics:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
Media typeapplication/json
object
experiments
required
Array<object>
object
id
required
string
siteId
required
string
siteName
required
string | null
hostname
required
The site’s address, its own domain first.
string | null
name
required
string
hypothesis
required
string
kind
required
string
pages
required
Array<string>
traffic
required
number
variants
required
Array<object>
object
key
required
string
name
required
string
weight
required
number
swaps
required
Array<object>
object
selector
required
string
op
required
string
attribute
string
value
string
css
required
string
path
required
string | null
siteId
required
string | null
siteName
required
string | null
previewUrl
required
Opens this variant of the first page for whoever follows it, counting nothing.
string | null
goal
required
object
kind
required
string
match
required
string
status
required
string
serving
required
Ended with its winner shown to every visitor, until the change is in the site’s code.
boolean
note
required
string
createdBy
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "experiments": [ { "kind": "content", "variants": [ { "key": "a", "swaps": [ { "op": "text" } ] } ], "goal": { "kind": "lead" }, "status": "draft", "winner": "a" } ]}What was sent isn’t valid (invalid).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}