Features
17 routes. Paths are relative to https://api.intersink.com/v1.
- GET/features/betaMy beta features in a channel (X-App-Key or x-ref, else my channel): what I can try and what I turned on
- PUT/features/betaTurn beta features on or off for me: { enabled } for every beta feature, or { enabled, key } for one
- GET/features/channels/{channelId}/flagsEvery flag of the channel (managers), with how many users opted in to beta
- POST/features/channels/{channelId}/flagsAdd a flag: { key, name, description?, state?, include_admins?, include_team?, beta_optin?, user_ids?, rollout_percent?, reason? }
- GET/features/channels/{channelId}/flags/{key}One flag (managers)
- PATCH/features/channels/{channelId}/flags/{key}Change a flag: any field of the create body, plus version (the one you read: a change made meanwhile is refused with 409 FEATURE_FLAG_CHANGED)
- DELETE/features/channels/{channelId}/flags/{key}Delete a flag (a platform default goes back to its default); ?reason=
- POST/features/channels/{channelId}/flags/{key}/killKill switch: turn the feature off for everyone now, whatever its state: { reason? }
- POST/features/channels/{channelId}/flags/{key}/restoreSwitch a killed feature back on (its state applies again): { reason? }
- GET/features/channels/{channelId}/historyEvery change to the channel's flags, newest first (?key=, ?limit= up to 100, ?before= next_before of the last page)
- GET/features/channels/{channelId}/previewWhat one user of the channel gets (managers): ?user_id=
- GET/features/resolvePublic: the caller's resolved feature flags for a channel, in one call
- GET/features/v1/evaluateServer: the flags one of your users gets (features:read): ?user_id= or ?visitor_id=
- GET/features/v1/flagsServer: every flag of the key's channel (features:read)
- PATCH/features/v1/flags/{key}Server: change a flag (features:write), e.g. promote it from CI. Same body as the managers' route
- POST/features/v1/flags/{key}/killServer: kill switch (features:write), e.g. from an alert: { reason? }
- POST/features/v1/flags/{key}/restoreServer: switch a killed feature back on (features:write): { reason? }
My beta features in a channel (X-App-Key or x-ref, else my channel): what I can try and what I turned on
GET/features/beta
Needs a signed-in user (Bearer token or access_token cookie).
Response
200. The payload in data is not described in the spec yet.
Turn beta features on or off for me: { enabled } for every beta feature, or { enabled, key } for one
PUT/features/beta
Needs a signed-in user (Bearer token or access_token cookie).
Response
200. The payload in data is not described in the spec yet.
Every flag of the channel (managers), with how many users opted in to beta
GET/features/channels/{channelId}/flags
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Add a flag: { key, name, description?, state?, include_admins?, include_team?, beta_optin?, user_ids?, rollout_percent?, reason? }
POST/features/channels/{channelId}/flags
Needs a signed-in user (Bearer token or access_token cookie).
state defaults to internal. Keys are lower case (checkout.new-flow) and never change.
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path |
Response
201. The payload in data is not described in the spec yet.
One flag (managers)
GET/features/channels/{channelId}/flags/{key}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| keyrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Change a flag: any field of the create body, plus version (the one you read: a change made meanwhile is refused with 409 FEATURE_FLAG_CHANGED)
PATCH/features/channels/{channelId}/flags/{key}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| keyrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Delete a flag (a platform default goes back to its default); ?reason=
DELETE/features/channels/{channelId}/flags/{key}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| keyrequired | string, path | |
| reasonrequired | string, query |
Response
200. The payload in data is not described in the spec yet.
Kill switch: turn the feature off for everyone now, whatever its state: { reason? }
POST/features/channels/{channelId}/flags/{key}/kill
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| keyrequired | string, path |
Response
201. The payload in data is not described in the spec yet.
Switch a killed feature back on (its state applies again): { reason? }
POST/features/channels/{channelId}/flags/{key}/restore
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| keyrequired | string, path |
Response
201. The payload in data is not described in the spec yet.
Every change to the channel's flags, newest first (?key=, ?limit= up to 100, ?before= next_before of the last page)
GET/features/channels/{channelId}/history
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| keyrequired | string, query | |
| limitrequired | string, query | |
| beforerequired | string, query |
Response
200. The payload in data is not described in the spec yet.
What one user of the channel gets (managers): ?user_id=
GET/features/channels/{channelId}/preview
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| user_idrequired | string, query |
Response
200. The payload in data is not described in the spec yet.
Public: the caller's resolved feature flags for a channel, in one call
GET/features/resolve
Public: no sign-in needed.
The channel comes from X-App-Key, else the x-ref header, else the signed-in user's channel. Signed in, the flags are resolved for that person (admins and team, listed users, beta opt-in, percentage rollout); signed out, visitor_id (your app's own random id, 8 to 64 of A-Z a-z 0-9 _ -) places the visitor in percentage rollouts. Internal flags that are off for the caller are left out. Cache for ttl seconds.
Parameters
| Name | Type | Description |
|---|---|---|
| visitor_id | string, query | |
| x-ref | string, header | Channel id, when no app key is sent |
| X-App-Key | string, header |
Response
200. The payload in data is not described in the spec yet.
Server: the flags one of your users gets (features:read): ?user_id= or ?visitor_id=
GET/features/v1/evaluate
Needs a signed-in user (Bearer token or access_token cookie).
For your own backend, so a route of a feature that isn't GA refuses people who don't have it. Same answer as /features/resolve for that person.
Parameters
| Name | Type | Description |
|---|---|---|
| user_idrequired | string, query | |
| visitor_idrequired | string, query |
Response
200. The payload in data is not described in the spec yet.
Server: every flag of the key's channel (features:read)
GET/features/v1/flags
Needs a signed-in user (Bearer token or access_token cookie).
Response
200. The payload in data is not described in the spec yet.
Server: change a flag (features:write), e.g. promote it from CI. Same body as the managers' route
PATCH/features/v1/flags/{key}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| keyrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Server: kill switch (features:write), e.g. from an alert: { reason? }
POST/features/v1/flags/{key}/kill
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| keyrequired | string, path |
Response
201. The payload in data is not described in the spec yet.
Server: switch a killed feature back on (features:write): { reason? }
POST/features/v1/flags/{key}/restore
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| keyrequired | string, path |
Response
201. The payload in data is not described in the spec yet.