Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Unleash Context API

Create, update, and delete [context fields](https://docs.getunleash.io/concepts/unleash-context) that Unleash is aware of.

Unleash Context API is one of 36 APIs that Unleash publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Context. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 16 operations across 10 paths, and defines 6 schemas. It is described by OpenAPI 3.0.3, at version 7.4.1.

Requests are made against a single base URL, https://app.unleash-instance.example.com.

16 operations 10 paths 6 schemas 4 DELETE4 GET6 POST2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
7.4.1
Base URL
https://app.unleash-instance.example.com
Authentication
API Key, HTTP Bearer
Resource Areas
1

Authentication & Security 2

Unleash Context API declares 2 security schemes for authenticating requests. An API key is passed in the header as Authorization (apiKey). It accepts HTTP bearer tokens (bearerToken). By default, every request must be authenticated.

  • apiKey — API key needed to access this API
  • bearerToken — API key needed to access this API, in Bearer token format

Paths & Operations 16

Across 10 paths, the API surfaces 16 operations — 4 DELETE, 4 GET, 6 POST, 2 PUT. Each is listed below with its method, path, parameters, and response codes.

Context 16

Create, update, and delete [context fields](https://docs.getunleash.io/concepts/unleash-context) that Unleash is aware of.

GET
/api/admin/context
Gets Configured Context Fields
getContextFields 1 param → 200
POST
/api/admin/context
Create a Context Field
createContextField body → 201
GET
/api/admin/context/{contextField}
Gets Context Field
getContextField 1 param → 200
PUT
/api/admin/context/{contextField}
Update an Existing Context Field
updateContextField 1 param body → 200
DELETE
/api/admin/context/{contextField}
Delete an Existing Context Field
deleteContextField 1 param → 200
POST
/api/admin/context/{contextField}/legal-values
Add or Update Legal Value for the Context Field
updateContextFieldLegalValue 1 param body → 200
DELETE
/api/admin/context/{contextField}/legal-values/{legalValue}
Delete Legal Value for the Context Field
deleteContextFieldLegalValue 2 params → 200
POST
/api/admin/context/validate
Validate a Context Field
validateContextFieldName body → 200
GET
/api/admin/projects/{projectId}/context
Gets Configured Context Fields
getContextFieldsForProject 2 params → 200
POST
/api/admin/projects/{projectId}/context
Create a Context Field
createContextFieldForProject 1 param body → 201
GET
/api/admin/projects/{projectId}/context/{contextField}
Gets Context Field
getContextFieldForProject 2 params → 200
PUT
/api/admin/projects/{projectId}/context/{contextField}
Update an Existing Context Field
updateContextFieldForProject 2 params body → 200
DELETE
/api/admin/projects/{projectId}/context/{contextField}
Delete an Existing Context Field
deleteContextFieldForProject 2 params → 200
POST
/api/admin/projects/{projectId}/context/{contextField}/legal-values
Add or Update Legal Value for the Context Field
updateContextFieldLegalValueForProject 2 params body → 200
DELETE
/api/admin/projects/{projectId}/context/{contextField}/legal-values/{legalValue}
Delete Legal Value for the Context Field
deleteContextFieldLegalValueForProject 3 params → 200
POST
/api/admin/projects/{projectId}/context/validate
Validate a Context Field
validateContextFieldNameForProject 1 param body → 200

Schemas 6

The contract defines 6 schemas that model the data the API accepts and returns. The most detailed are contextFieldSchema (9 properties), createContextFieldSchema (6 properties), updateContextFieldSchema (5 properties), legalValueSchema (2 properties). Each schema is shown below with its type and property counts.

contextFieldSchema
object
A representation of a [context field](https://docs.getunleash.io/concepts/unleash-context).
9 properties 1 required
contextFieldsSchema
array
A list of context fields
nameSchema
object
An object with a name
1 property 1 required
createContextFieldSchema
object
Data used to create a context field configuration.
6 properties 1 required
updateContextFieldSchema
object
Data to update an existing context field configuration.
5 properties
legalValueSchema
object
Describes a legal value. Typically used to limit possible values for contextFields or strategy properties
2 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

unleash-context-api-openapi.yml Raw ↑

Other APIs Unleash publishes across the network.

Unleash Client API
Unleash Addons API
Unleash Admin UI API
Unleash API tokens API
Unleash Archive API
Unleash Auth API
Unleash Banners API
Unleash Change Requests API
Unleash Dependencies API
Unleash Environments API
Unleash Events API
Unleash Feature Types API