Skip to main content

DevCycle Management API (1.0.0)

Download OpenAPI specification:Download

An API for managing features and variables on the DevCycle platform.

An authorization token can be obtained from (https://auth.devcycle.com/oauth/token) using the client id and secret from the DevCycle dashboard

Example using curl:

curl --request POST \
  --url "https://auth.devcycle.com/oauth/token" \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data audience=https://api.devcycle.com/ \
  --data client_id=<client id> \
  --data client_secret=<client secret>
    

Authentication

bearer

Security Scheme Type API Key
parameter name:

Projects

Create Project

Create a new Project

Request Body schema: application/json
name
required
string <= 100 characters

Project name

key
required
string <= 100 characters ^[a-z0-9-_]+$

A unique key to identify the Project

description
string <= 1000 characters

A description of the Project

color
string <= 9 characters /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A...

Project display color, used to highlight different projects on the dashboard. Must use Hex color code.

object (ProjectSettings)

Responses

Request samples

Content type
application/json
{
  • "name": "Delivery App",
  • "key": "delivery-app",
  • "description": "A web app to manage outbound deliveries",
  • "color": "#4073FF",
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "name": "Delivery App",
  • "key": "delivery-app",
  • "description": "A web app to manage outbound deliveries",
  • "color": "#4073FF",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_organization": "string",
  • "_createdBy": "string",
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List Projects

List Projects

query Parameters
page
number <int32> >= 1
Default: 1
perPage
number <int32> [ 1 .. 1000 ]
Default: 100
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
createdBy
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a Project

Get a Project by ID or key

path Parameters
key
required
string

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "name": "Delivery App",
  • "key": "delivery-app",
  • "description": "A web app to manage outbound deliveries",
  • "color": "#4073FF",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_organization": "string",
  • "_createdBy": "string",
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a Project

Update a Project by ID or key

path Parameters
key
required
string

A Project key or ID

Request Body schema: application/json
name
string <= 100 characters

Project name

key
string <= 100 characters ^[a-z0-9-_]+$

A unique key to identify the Project

description
string <= 1000 characters

A description of the Project

color
string <= 9 characters /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A...

Project display color, used to highlight different projects on the dashboard. Must use Hex color code.

object (ProjectSettings)

Responses

Request samples

Content type
application/json
{
  • "name": "Delivery App",
  • "key": "delivery-app",
  • "description": "A web app to manage outbound deliveries",
  • "color": "#4073FF",
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "name": "Delivery App",
  • "key": "delivery-app",
  • "description": "A web app to manage outbound deliveries",
  • "color": "#4073FF",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_organization": "string",
  • "_createdBy": "string",
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a Project

Delete a Project by ID or key

path Parameters
key
required
string

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "statusCode": 404,
  • "message": "Item with key 'delivery-app' not found",
  • "error": "Not Found"
}

Environments

Create Environment

Create a new Environment

path Parameters
project
required
any

A Project key or ID

Request Body schema: application/json
name
required
string <= 100 characters

A unique display name

key
required
string <= 100 characters ^[a-z0-9-_]+$

Unique Environment identifier, can be used in the SDK / API to reference by key rather than ID. Must only contain lower-case characters and _ or -.

description
string <= 1000 characters

Environment description.

color
string <= 9 characters /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A...

Environment display color, used to highlight different environments on the dashboard. Must use Hex color code.

type
required
string
Enum: "development" "staging" "production" "disaster_recovery"

The environment type

object

Environment based settings

Responses

Request samples

Content type
application/json
{
  • "name": "Staging Upcoming",
  • "key": "staging-upcoming",
  • "description": "Pre-production changes",
  • "color": "#4073FF",
  • "type": "staging",
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "name": "Staging Upcoming",
  • "key": "staging-upcoming",
  • "description": "Pre-production changes",
  • "color": "#4073FF",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "type": "staging",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "sdkKeys": {
    },
  • "settings": {
    },
  • "readonly": true
}

List Environments

List Environments

path Parameters
project
required
any

A Project key or ID

query Parameters
page
number <int32> >= 1
Default: 1
perPage
number <int32> [ 1 .. 1000 ]
Default: 100
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
createdBy
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get an Environment

Get an Environment by ID or key

path Parameters
key
required
string

A Environment key or ID

project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "name": "Staging Upcoming",
  • "key": "staging-upcoming",
  • "description": "Pre-production changes",
  • "color": "#4073FF",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "type": "staging",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "sdkKeys": {
    },
  • "settings": {
    },
  • "readonly": true
}

Update an Environment

Update an Environment by ID or key

path Parameters
key
required
string

A Environment key or ID

project
required
any

A Project key or ID

Request Body schema: application/json
name
string <= 100 characters

A unique display name

key
string <= 100 characters ^[a-z0-9-_]+$

Unique Environment identifier, can be used in the SDK / API to reference by key rather than ID. Must only contain lower-case characters and _ or -.

description
string <= 1000 characters

Environment description.

color
string <= 9 characters /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A...

Environment display color, used to highlight different environments on the dashboard. Must use Hex color code.

type
string
Enum: "development" "staging" "production" "disaster_recovery"

The environment type

object

Environment based settings

Responses

Request samples

Content type
application/json
{
  • "name": "Staging Upcoming",
  • "key": "staging-upcoming",
  • "description": "Pre-production changes",
  • "color": "#4073FF",
  • "type": "staging",
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "name": "Staging Upcoming",
  • "key": "staging-upcoming",
  • "description": "Pre-production changes",
  • "color": "#4073FF",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "type": "staging",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "sdkKeys": {
    },
  • "settings": {
    },
  • "readonly": true
}

Delete an Environment

Delete an Environment by ID or key

path Parameters
key
required
string

A Environment key or ID

project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "statusCode": 404,
  • "message": "Item with key 'delivery-app' not found",
  • "error": "Not Found"
}

Generate new SDK Token(s) for chosen type(s) using the new format

Generate new SDK tokens for an environment

path Parameters
key
required
string

A Environment key or ID

project
required
any

A Project key or ID

Request Body schema: application/json
client
boolean
server
boolean
mobile
boolean

Responses

Request samples

Content type
application/json
{
  • "client": true,
  • "server": true,
  • "mobile": true
}

Response samples

Content type
application/json
{
  • "name": "Staging Upcoming",
  • "key": "staging-upcoming",
  • "description": "Pre-production changes",
  • "color": "#4073FF",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "type": "staging",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "sdkKeys": {
    },
  • "settings": {
    },
  • "readonly": true
}

Variables

Create a Variable

path Parameters
project
required
any

A Project key or ID

Request Body schema: application/json
name
string <= 100 characters

Variable name

description
string <= 1000 characters

A description of the Variable

key
required
string <= 100 characters ^[a-z0-9-_]+$

Unique Variable identifier, can be used in the SDK / API to reference by key rather then ID. Must only contain lower-case characters and _ or -.

_feature
string

The key or ID of the Feature this Variable is associated with

type
required
string
Enum: "String" "Boolean" "Number" "JSON"

The type of Variable. Must be one of [String | Boolean | Number | JSON]

defaultValue
object

A default value for the Variable

Responses

Request samples

Content type
application/json
{
  • "name": "Show New Dashboard",
  • "description": "A boolean variable that will toggle the new dashboard feature",
  • "key": "show-new-dashboard",
  • "_feature": "new-dashboard",
  • "type": "Boolean",
  • "defaultValue": false
}

Response samples

Content type
application/json
{
  • "name": "Show New Dashboard",
  • "description": "A boolean variable that will toggle the new dashboard feature",
  • "key": "show-new-dashboard",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "_feature": "61450f3daec96f5cf4a49947",
  • "type": "Boolean",
  • "defaultValue": false,
  • "source": "api",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List Variables

path Parameters
project
required
any

A Project key or ID

query Parameters
page
number <int32> >= 1
Default: 1
perPage
number <int32> [ 1 .. 1000 ]
Default: 100
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
feature
string
type
string
Enum: "String" "Boolean" "Number" "JSON"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a Variable

path Parameters
key
required
string

A Variable key or ID

project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "name": "Show New Dashboard",
  • "description": "A boolean variable that will toggle the new dashboard feature",
  • "key": "show-new-dashboard",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "_feature": "61450f3daec96f5cf4a49947",
  • "type": "Boolean",
  • "defaultValue": false,
  • "source": "api",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a Variable

path Parameters
key
required
string

A Variable key or ID

project
required
any

A Project key or ID

Request Body schema: application/json
name
string <= 100 characters

Variable name

description
string <= 1000 characters

A description of the Variable

key
string <= 100 characters ^[a-z0-9-_]+$

Unique Variable identifier, can be used in the SDK / API to reference by key rather then ID. Must only contain lower-case characters and _ or -.

_feature
string

The key or ID of the Feature this Variable is associated with

Responses

Request samples

Content type
application/json
{
  • "name": "Show New Dashboard",
  • "description": "A boolean variable that will toggle the new dashboard feature",
  • "key": "show-new-dashboard",
  • "_feature": "new-dashboard"
}

Response samples

Content type
application/json
{
  • "name": "Show New Dashboard",
  • "description": "A boolean variable that will toggle the new dashboard feature",
  • "key": "show-new-dashboard",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "_feature": "61450f3daec96f5cf4a49947",
  • "type": "Boolean",
  • "defaultValue": false,
  • "source": "api",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a Variable

path Parameters
key
required
string

A Variable key or ID

project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "statusCode": 404,
  • "message": "Item with key 'delivery-app' not found",
  • "error": "Not Found"
}

Features

Create Feature

Create a new Feature

path Parameters
project
required
any

A Project key or ID

Request Body schema: application/json
name
required
string <= 100 characters

Name of the Feature

key
required
string <= 100 characters ^[a-z0-9-_]+$

Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id. Must only contain lower-case characters and _ or -.

description
string <= 1000 characters

Feature description.

Array of objects (FeatureVariationDto) [ items ]

Variation configurations to be used by feature configurations.

controlVariation
string

The key of the variation that is used as the control variation for Metrics

Array of objects (CreateVariableDto) [ items ]

Variable definitions to be referenced in variations

object

Feature-level settings.

type
string
Enum: "release" "experiment" "permission" "ops"

The Feature type

tags
Array of strings

Tags to organize Features on the dashboard

Responses

Request samples

Content type
application/json
{
  • "name": "New Dashboard",
  • "key": "new-dash",
  • "description": "New client-facing dashboard.",
  • "variations": [
    ],
  • "controlVariation": "string",
  • "variables": [
    ],
  • "settings": {
    },
  • "type": "release",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "New Dashboard",
  • "key": "new-dash",
  • "description": "New client-facing dashboard.",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "source": "api",
  • "type": "release",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "variations": [
    ],
  • "controlVariation": "string",
  • "variables": [
    ],
  • "tags": [
    ],
  • "ldLink": "string",
  • "readonly": true,
  • "settings": {
    }
}

List Features

List Features

path Parameters
project
required
any

A Project key or ID

query Parameters
page
number <int32> >= 1
Default: 1
perPage
number <int32> [ 1 .. 1000 ]
Default: 100
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
createdBy
string
type
string
Enum: "release" "experiment" "permission" "ops"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Multiple Features with a single request

Create multiple new Features

path Parameters
project
required
any

A Project key or ID

Request Body schema: application/json
Array
string

Responses

Request samples

Content type
application/json
[
  • "string"
]

Response samples

Content type
application/json
[
  • {
    }
]

Get a Feature

Get a Feature by ID or key

path Parameters
key
required
string

A Feature key or ID

project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "name": "New Dashboard",
  • "key": "new-dash",
  • "description": "New client-facing dashboard.",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "source": "api",
  • "type": "release",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "variations": [
    ],
  • "controlVariation": "string",
  • "variables": [
    ],
  • "tags": [
    ],
  • "ldLink": "string",
  • "readonly": true,
  • "settings": {
    }
}

Update a Feature

Update a Feature by ID or key

path Parameters
key
required
string

A Feature key or ID

project
required
any

A Project key or ID

Request Body schema: application/json
name
string <= 100 characters

Name of the Feature

key
string <= 100 characters ^[a-z0-9-_]+$

Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id. Must only contain lower-case characters and _ or -.

description
string <= 1000 characters

Feature description.

Array of objects (FeatureVariationDto) [ items ]

Variation configurations to be used by feature configurations.

object

Feature-level settings.

Array of objects (CreateVariableDto) [ items ]

Variable definitions to be referenced in variations

type
string
Enum: "release" "experiment" "permission" "ops"

The Feature type

tags
Array of strings

Tags to organize Features on the dashboard

controlVariation
string

The key of the variation that is used as the control variation for Metrics

Responses

Request samples

Content type
application/json
{
  • "name": "New Dashboard",
  • "key": "new-dash",
  • "description": "New client-facing dashboard.",
  • "variations": [
    ],
  • "settings": {
    },
  • "variables": [
    ],
  • "type": "release",
  • "tags": [
    ],
  • "controlVariation": "string"
}

Response samples

Content type
application/json
{
  • "name": "New Dashboard",
  • "key": "new-dash",
  • "description": "New client-facing dashboard.",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "source": "api",
  • "type": "release",
  • "_createdBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "variations": [
    ],
  • "controlVariation": "string",
  • "variables": [
    ],
  • "tags": [
    ],
  • "ldLink": "string",
  • "readonly": true,
  • "settings": {
    }
}

Delete a Feature

Delete a Feature by ID or key

path Parameters
key
required
string

A Feature key or ID

project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "statusCode": 404,
  • "message": "Item with key 'delivery-app' not found",
  • "error": "Not Found"
}

Link feature to Jira issue

path Parameters
key
required
string
project
required
any

A Project key or ID

Request Body schema: application/json
issueId
required
string

Responses

Request samples

Content type
application/json
{
  • "issueId": "string"
}

Response samples

Content type
application/json
{
  • "issueId": "string"
}

List linked Jira Issues

path Parameters
key
required
string
project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unlink feature from Jira issue

path Parameters
key
required
string

A Feature key or ID

issue_id
required
string
project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "statusCode": 404,
  • "message": "Item with key 'delivery-app' not found",
  • "error": "Not Found"
}

Integrations: Jira

Link feature to Jira issue

path Parameters
key
required
string
project
required
any

A Project key or ID

Request Body schema: application/json
issueId
required
string

Responses

Request samples

Content type
application/json
{
  • "issueId": "string"
}

Response samples

Content type
application/json
{
  • "issueId": "string"
}

List linked Jira Issues

path Parameters
key
required
string
project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unlink feature from Jira issue

path Parameters
key
required
string

A Feature key or ID

issue_id
required
string
project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "statusCode": 404,
  • "message": "Item with key 'delivery-app' not found",
  • "error": "Not Found"
}

Feature Configurations

List Feature configurations

List Feature configurations for all environments or by environment key or ID

path Parameters
feature
required
any

A Feature key or ID

project
required
any

A Project key or ID

query Parameters
environment
any

A Environment key or ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update a Feature configuration

Update a Feature configuration by environment key or ID

path Parameters
feature
required
any

A Feature key or ID

project
required
any

A Project key or ID

query Parameters
environment
required
any

A Environment key or ID

Request Body schema: application/json
required
Array of objects (UpdateTargetDto) [ items ]

The targets to evaluate what variation a user should be delivered

status
string
Enum: "active" "inactive" "archived"

Status of the Feature Configuration

Responses

Request samples

Content type
application/json
{
  • "targets": [
    ],
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "_feature": "61450f3daec96f5cf4a49946",
  • "_environment": "61450f3daec96f5cf4a49946",
  • "_createdBy": "string",
  • "status": "active",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "targets": [
    ],
  • "readonly": true
}

Results

ResultsController_getResultsSummary

path Parameters
feature
required
any

A Feature key or ID

project
required
any

A Project key or ID

query Parameters
startDate
number
endDate
number
platform
string
variable
string
environment
string

A Environment key or ID

period
string
Enum: "day" "hour" "month"

Responses

Response samples

Content type
application/json
{
  • "result": {
    },
  • "cached": true,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

ResultsController_getEvaluationsPerHourByFeature

path Parameters
feature
required
any

A Feature key or ID

project
required
any

A Project key or ID

query Parameters
startDate
number
endDate
number
platform
string
variable
string
environment
string

A Environment key or ID

period
string
Enum: "day" "hour" "month"

Responses

Response samples

Content type
application/json
{
  • "result": {
    },
  • "cached": true,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

ResultsController_getEvaluationsPerHourByProject

path Parameters
project
required
any

A Project key or ID

query Parameters
startDate
number
endDate
number
environment
string

A Environment key or ID

period
string
Enum: "day" "hour" "month"

Responses

Response samples

Content type
application/json
{
  • "result": {
    },
  • "cached": true,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Custom Properties

Create Custom Property

Create a new Custom Property

path Parameters
project
required
any

A Project key or ID

Request Body schema: application/json
name
required
string <= 100 characters

Display name for Custom Property.

key
required
string <= 100 characters ^[a-z0-9-_]+$

Auto generated key to be used by the API to reference by 'key' rather then _id for CRUD operations. Must only contain lower-case characters and _ or -.

type
required
string
Enum: "String" "Boolean" "Number" "Semver"

Type of the Custom Propety. Must be one of: "Boolean", "Number" or "String"

propertyKey
required
string

Custom Property key, must be unique by Project. Only to be used by the SDKs to reference the Custom Property..

Responses

Request samples

Content type
application/json
{
  • "name": "Delivery App",
  • "key": "delivery-app",
  • "type": "String",
  • "propertyKey": "Delivery App Secret Agent Code"
}

Response samples

Content type
application/json
{
  • "name": "Delivery App",
  • "key": "delivery-app",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "_createdBy": "string",
  • "propertyKey": "Delivery App Secret Agent Code",
  • "type": "String",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List Custom Properties

List Custom Properties

path Parameters
project
required
any

A Project key or ID

query Parameters
page
number <int32> >= 1
Default: 1
perPage
number <int32> [ 1 .. 1000 ]
Default: 100
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Metrics

Create Metric

Create a new Metric

path Parameters
project
required
any

A Project key or ID

Request Body schema: application/json
name
required
string <= 100 characters

Name of the Metric

key
required
string <= 100 characters ^[a-z0-9-_]+$

Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id. Must only contain lower-case characters and _ or -.

description
string <= 1000 characters

Metric description.

event
required
string

Event associated with metric

dimension
required
string
Enum: "COUNT_PER_UNIQUE_USER" "COUNT_PER_VARIABLE_EVALUATION" "SUM_PER_UNIQUE_USER" "AVERAGE_PER_UNIQUE_USER" "TOTAL_AVERAGE" "TOTAL_SUM"

Metric dimension

optimize
required
string
Enum: "increase" "decrease"

Indicates whether the metric is optimized for increase or decreasae

Responses

Request samples

Content type
application/json
{
  • "name": "New Signups",
  • "key": "new-signups",
  • "description": "New signups on the dashboard",
  • "event": "Sign Ups",
  • "dimension": "COUNT_PER_UNIQUE_USER",
  • "optimize": "increase"
}

Response samples

Content type
application/json
{
  • "name": "New Signups",
  • "key": "new-signups",
  • "description": "New signups on the dashboard",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "event": "Sign Ups",
  • "dimension": "COUNT_PER_UNIQUE_USER",
  • "optimize": "increase",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get All Metrics

path Parameters
project
required
any

A Project key or ID

query Parameters
page
number <int32> >= 1
Default: 1
perPage
number <int32> [ 1 .. 1000 ]
Default: 100
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
dimension
string
Enum: "COUNT_PER_UNIQUE_USER" "COUNT_PER_VARIABLE_EVALUATION" "SUM_PER_UNIQUE_USER" "AVERAGE_PER_UNIQUE_USER" "TOTAL_AVERAGE" "TOTAL_SUM"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a Metric

path Parameters
key
required
string
project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "name": "New Signups",
  • "key": "new-signups",
  • "description": "New signups on the dashboard",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "event": "Sign Ups",
  • "dimension": "COUNT_PER_UNIQUE_USER",
  • "optimize": "increase",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a Metric

path Parameters
key
required
string
project
required
any

A Project key or ID

Request Body schema: application/json
name
string <= 100 characters

Name of the Metric

key
string <= 100 characters ^[a-z0-9-_]+$

Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id. Must only contain lower-case characters and _ or -.

description
string <= 1000 characters

Metric description.

event
string

Event associated with metric

dimension
string
Enum: "COUNT_PER_UNIQUE_USER" "COUNT_PER_VARIABLE_EVALUATION" "SUM_PER_UNIQUE_USER" "AVERAGE_PER_UNIQUE_USER" "TOTAL_AVERAGE" "TOTAL_SUM"

Metric dimension

optimize
string
Enum: "increase" "decrease"

Indicates whether the metric is optimized for increase or decreasae

Responses

Request samples

Content type
application/json
{
  • "name": "New Signups",
  • "key": "new-signups",
  • "description": "New signups on the dashboard",
  • "event": "Sign Ups",
  • "dimension": "COUNT_PER_UNIQUE_USER",
  • "optimize": "increase"
}

Response samples

Content type
application/json
{
  • "name": "New Signups",
  • "key": "new-signups",
  • "description": "New signups on the dashboard",
  • "_id": "61450f3daec96f5cf4a49946",
  • "_project": "string",
  • "event": "Sign Ups",
  • "dimension": "COUNT_PER_UNIQUE_USER",
  • "optimize": "increase",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a Metric

path Parameters
key
required
string
project
required
any

A Project key or ID

Responses

Response samples

Content type
application/json
{
  • "statusCode": 404,
  • "message": "Item with key 'delivery-app' not found",
  • "error": "Not Found"
}

Fetch results for a Metric

path Parameters
metric
required
string
key
required
any

A Metric key or ID

project
required
any

A Project key or ID

query Parameters
feature
required
string
environment
string
startDate
required
string <date-time>
endDate
required
string <date-time>

Responses

Response samples

Content type
application/json
{
  • "result": {
    },
  • "cached": true,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Test Metric Results

Fetch metric results with the given parameters

path Parameters
project
required
any

A Project key or ID

query Parameters
feature
required
string
control
required
string
optimize
required
string
Enum: "increase" "decrease"
environment
string
event
required
string
dimension
required
string
Enum: "COUNT_PER_UNIQUE_USER" "COUNT_PER_VARIABLE_EVALUATION" "SUM_PER_UNIQUE_USER" "AVERAGE_PER_UNIQUE_USER" "TOTAL_AVERAGE" "TOTAL_SUM"
startDate
required
string <date-time>
endDate
required
string <date-time>

Responses

Response samples

Content type
application/json
{
  • "result": {
    },
  • "cached": true,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Metric Associations

Get Metric Associations

path Parameters
project
required
any

A Project key or ID

query Parameters
metric
string
feature
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Associate a Metric with a Feature

path Parameters
project
required
any

A Project key or ID

Request Body schema: application/json
metric
required
string
feature
required
string

Responses

Request samples

Content type
application/json
{
  • "metric": "string",
  • "feature": "string"
}

Response samples

Content type
application/json
{
  • "_project": "string",
  • "feature": {
    },
  • "metric": {
    },
  • "createdAt": "2019-08-24T14:15:22Z"
}

Delete an Association of a Metric and a Feature

path Parameters
project
required
any

A Project key or ID

Request Body schema: application/json
metric
required
string
feature
required
string

Responses

Request samples

Content type
application/json
{
  • "metric": "string",
  • "feature": "string"
}