For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
      • POSTCreate a release policy
      • DELDelete a release policy
      • GETGet a release policy by key
      • GETList release policies
      • PUTUpdate a release policy
      • POSTUpdate the order of existing release policies
Sign inTry it free
LogoLogo
REST API overviewRelease Policies Beta

Update the order of existing release policies

POST
/api/v2/projects/:projectKey/release-policies/order
POST
/api/v2/projects/:projectKey/release-policies/order
$curl -X POST https://app.launchdarkly.com/api/v2/projects/default/release-policies/order \
> -H "LD-API-Version: beta" \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> "string"
>]'
1[
2 {
3 "_id": "550e8400-e29b-41d4-a716-446655440000",
4 "rank": 1,
5 "releaseMethod": "guarded-release",
6 "name": "Production Release",
7 "key": "production-release",
8 "_access": {
9 "allowed": [
10 {
11 "action": "action",
12 "reason": {
13 "effect": "allow",
14 "resources": [
15 "proj/*:env/*;qa_*:/flag/*"
16 ],
17 "notResources": [
18 "notResources",
19 "notResources"
20 ],
21 "actions": [
22 "*"
23 ],
24 "notActions": [
25 "string",
26 "string"
27 ],
28 "role_name": "role_name"
29 }
30 },
31 {
32 "action": "action",
33 "reason": {
34 "effect": "allow",
35 "resources": [
36 "proj/*:env/*;qa_*:/flag/*"
37 ],
38 "notResources": [
39 "notResources",
40 "notResources"
41 ],
42 "actions": [
43 "*"
44 ],
45 "notActions": [
46 "string",
47 "string"
48 ],
49 "role_name": "role_name"
50 }
51 }
52 ],
53 "denied": [
54 {
55 "action": "action",
56 "reason": {
57 "effect": "allow",
58 "resources": [
59 "proj/*:env/*;qa_*:/flag/*"
60 ],
61 "notResources": [
62 "notResources",
63 "notResources"
64 ],
65 "actions": [
66 "*"
67 ],
68 "notActions": [
69 "string",
70 "string"
71 ],
72 "role_name": "role_name"
73 }
74 },
75 {
76 "action": "action",
77 "reason": {
78 "effect": "allow",
79 "resources": [
80 "proj/*:env/*;qa_*:/flag/*"
81 ],
82 "notResources": [
83 "notResources",
84 "notResources"
85 ],
86 "actions": [
87 "*"
88 ],
89 "notActions": [
90 "string",
91 "string"
92 ],
93 "role_name": "role_name"
94 }
95 }
96 ]
97 },
98 "scope": {
99 "environmentKeys": [
100 "production",
101 "staging"
102 ],
103 "flagTagKeys": [
104 "frontend",
105 "backend"
106 ],
107 "viewKeys": [
108 "feature-a",
109 "team-a"
110 ]
111 },
112 "guardedReleaseConfig": {
113 "rolloutContextKindKey": "user",
114 "minSampleSize": 100,
115 "rollbackOnRegression": true,
116 "metricKeys": [
117 "http-errors",
118 "latency"
119 ],
120 "metricGroupKeys": [
121 "frontend-metrics",
122 "backend-metrics"
123 ],
124 "stages": [
125 {
126 "allocation": 25000,
127 "durationMillis": 60000
128 },
129 {
130 "allocation": 25000,
131 "durationMillis": 60000
132 }
133 ]
134 },
135 "progressiveReleaseConfig": {
136 "rolloutContextKindKey": "user",
137 "stages": [
138 {
139 "allocation": 25000,
140 "durationMillis": 60000
141 },
142 {
143 "allocation": 25000,
144 "durationMillis": 60000
145 }
146 ]
147 }
148 }
149]
Update the order of existing release policies for the specified project.
Was this page helpful?
Previous
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequired
The project key

Headers

LD-API-VersionenumRequired
Version of the endpoint.
Allowed values:

Request

Array of release policy keys in the desired rank order (scoped policies only). These keys must include all of the scoped release policies for the project.

Response

Release policies updated successfully
_idstring
The unique identifier of the release policy
rankinteger

The rank/priority of the release policy

releaseMethodenum
The release method for this policy
Allowed values:
namestring<=256 characters
The name of the release policy
keystring

The human-readable key of the release policy

_accessobject
scopeobject
guardedReleaseConfigobject
Configuration for guarded releases
progressiveReleaseConfigobject
Configuration for progressive releases

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error