Get a strategy definition
GET<your-unleash-url>/api/admin/strategies/:name
Retrieves the definition of the strategy specified in the URL
Request
Path Parameters
name stringrequired
Responses
- 200
- 401
- 404
strategySchema
- application/json
- Schema
- Example (auto)
Schema
titlestringnullable
An optional title for the strategy
Example:
GradualRollout - Prod25
namestringrequired
The name (type) of the strategy
Example:
flexibleRollout
displayNamestringnullablerequired
A human friendly name for the strategy
Example:
Gradual Rollout
descriptionstringnullablerequired
A short description of the strategy
Example:
Gradual rollout to logged in users
editablebooleanrequired
Whether the strategy can be edited or not. Strategies bundled with Unleash cannot be edited.
Example:
true
deprecatedbooleanrequired
Example:
true
parameters object[]required
{
"title": "GradualRollout - Prod25",
"name": "flexibleRollout",
"displayName": "Gradual Rollout",
"description": "Gradual rollout to logged in users",
"editable": true,
"deprecated": true,
"parameters": [
{
"name": "percentage",
"type": "percentage",
"description": "Gradual rollout to logged in users",
"required": true
}
]
}
Authorization information is missing or invalid. Provide a valid API token as the authorization
header, e.g. authorization:*.*.my-admin-token
.
- application/json
- Schema
- Example (auto)
Schema
idstring
The ID of the error instance
Example:
9c40958a-daac-400e-98fb-3bb438567008
namestring
The name of the error kind
Example:
AuthenticationRequired
messagestring
A description of what went wrong.
Example:
You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "AuthenticationRequired",
"message": "You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login."
}
The requested resource was not found.
- application/json
- Schema
- Example (auto)
Schema
idstring
The ID of the error instance
Example:
9c40958a-daac-400e-98fb-3bb438567008
namestring
The name of the error kind
Example:
NotFoundError
messagestring
A description of what went wrong.
Example:
Could not find the addon with ID "12345".
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "NotFoundError",
"message": "Could not find the addon with ID \"12345\"."
}
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L '<your-unleash-url>/api/admin/strategies/:name' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>'
ResponseClear