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
      • POSTApply approval request
      • POSTApply approval request for a flag
      • POSTCreate approval request
      • POSTCreate approval request for a flag
      • POSTCreate approval request to copy flag configurations across environments
      • DELDelete approval request
      • DELDelete approval request for a flag
      • GETGet approval request
      • GETGet approval request for a flag
      • GETList approval requests
      • GETList approval requests for a flag
      • POSTReview approval request
      • POSTReview approval request for a flag
    • 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
Sign inTry it free
LogoLogo
REST API overviewApprovals

List approval requests

GET
/api/v2/approval-requests
GET
/api/v2/approval-requests
$curl https://app.launchdarkly.com/api/v2/approval-requests \
> -H "Authorization: <apiKey>"
1{
2 "items": [
3 {
4 "_id": "12ab3c45de678910abc12345",
5 "_version": 1,
6 "creationDate": 1654104600000,
7 "serviceKind": "launchdarkly",
8 "reviewStatus": "pending",
9 "allReviews": [
10 {
11 "_id": "12ab3c45de678910abc12345",
12 "kind": "approve",
13 "creationDate": 1653606981113,
14 "comment": "Approved!",
15 "memberId": "12ab3c45de678910abc12345",
16 "serviceTokenId": "12ab3c45de678910abc12345"
17 }
18 ],
19 "notifyMemberIds": [
20 "1234a56b7c89d012345e678f"
21 ],
22 "status": "pending",
23 "instructions": [
24 "[{\"kind\": \"turnFlagOn\"}]"
25 ],
26 "conflicts": [
27 {
28 "instruction": {},
29 "reason": "string"
30 }
31 ],
32 "_links": {},
33 "requestorId": "12ab3c45de678910abc12345",
34 "description": "example: request approval from someone",
35 "appliedDate": 1654104600000,
36 "appliedByMemberId": "1234a56b7c89d012345e678f",
37 "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
38 "executionDate": 1654104600000,
39 "operatingOnId": "12ab3c45de678910abc12345",
40 "integrationMetadata": {
41 "externalId": "string",
42 "externalStatus": {
43 "display": "string",
44 "value": "string"
45 },
46 "externalUrl": "string",
47 "lastChecked": 1
48 },
49 "source": {
50 "key": "source-flag-key-123abc",
51 "version": 1
52 },
53 "customWorkflowMetadata": {
54 "name": "Example workflow name",
55 "stage": {
56 "index": 0,
57 "name": "Stage 1"
58 }
59 },
60 "resourceId": "string",
61 "approvalSettings": {
62 "required": true,
63 "bypassApprovalsForPendingChanges": false,
64 "minNumApprovals": 1,
65 "canReviewOwnRequest": false,
66 "canApplyDeclinedChanges": true,
67 "serviceKind": "launchdarkly",
68 "serviceConfig": {},
69 "requiredApprovalTags": [
70 "require-approval"
71 ],
72 "autoApplyApprovedChanges": true,
73 "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
74 },
75 "project": {
76 "_links": {
77 "environments": {
78 "href": "/api/v2/projects/my-project/environments",
79 "type": "application/json"
80 },
81 "self": {
82 "href": "/api/v2/projects/my-project",
83 "type": "application/json"
84 }
85 },
86 "_id": "57be1db38b75bf0772d11383",
87 "key": "project-key-123abc",
88 "includeInSnippetByDefault": true,
89 "name": "My Project",
90 "tags": [
91 "ops"
92 ],
93 "defaultClientSideAvailability": {
94 "usingMobileKey": true,
95 "usingEnvironmentId": true
96 },
97 "_access": {
98 "denied": [
99 {
100 "action": "string",
101 "reason": {
102 "effect": "allow",
103 "resources": [
104 "proj/*:env/*;qa_*:/flag/*"
105 ],
106 "notResources": [
107 "string"
108 ],
109 "actions": [
110 "*"
111 ],
112 "notActions": [
113 "string"
114 ],
115 "role_name": "string"
116 }
117 }
118 ],
119 "allowed": [
120 {
121 "action": "string",
122 "reason": {
123 "effect": "allow",
124 "resources": [
125 "proj/*:env/*;qa_*:/flag/*"
126 ],
127 "notResources": [
128 "string"
129 ],
130 "actions": [
131 "*"
132 ],
133 "notActions": [
134 "string"
135 ],
136 "role_name": "string"
137 }
138 }
139 ]
140 },
141 "defaultReleasePipelineKey": "string",
142 "environments": {
143 "items": [
144 {
145 "_links": {
146 "self": {
147 "href": "/api/v2/projects/my-project/environments/my-environment",
148 "type": "application/json"
149 }
150 },
151 "_id": "57be1db38b75bf0772d11384",
152 "key": "environment-key-123abc",
153 "name": "My Environment",
154 "apiKey": "sdk-xxx",
155 "mobileKey": "mob-xxx",
156 "color": "F5A623",
157 "defaultTtl": 5,
158 "secureMode": true,
159 "defaultTrackEvents": false,
160 "requireComments": true,
161 "confirmChanges": true,
162 "tags": [
163 "ops"
164 ],
165 "critical": true,
166 "_access": {
167 "denied": [
168 {
169 "action": "string",
170 "reason": {
171 "effect": "allow",
172 "resources": [
173 "proj/*:env/*;qa_*:/flag/*"
174 ],
175 "notResources": [
176 "string"
177 ],
178 "actions": [
179 "*"
180 ],
181 "notActions": [
182 "string"
183 ],
184 "role_name": "string"
185 }
186 }
187 ],
188 "allowed": [
189 {
190 "action": "string",
191 "reason": {
192 "effect": "allow",
193 "resources": [
194 "proj/*:env/*;qa_*:/flag/*"
195 ],
196 "notResources": [
197 "string"
198 ],
199 "actions": [
200 "*"
201 ],
202 "notActions": [
203 "string"
204 ],
205 "role_name": "string"
206 }
207 }
208 ]
209 },
210 "approvalSettings": {
211 "required": true,
212 "bypassApprovalsForPendingChanges": false,
213 "minNumApprovals": 1,
214 "canReviewOwnRequest": false,
215 "canApplyDeclinedChanges": true,
216 "serviceKind": "launchdarkly",
217 "serviceConfig": {},
218 "requiredApprovalTags": [
219 "require-approval"
220 ],
221 "autoApplyApprovedChanges": true,
222 "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
223 },
224 "resourceApprovalSettings": {}
225 }
226 ],
227 "_links": {},
228 "totalCount": 2
229 }
230 },
231 "environments": [
232 {
233 "_links": {
234 "self": {
235 "href": "/api/v2/projects/my-project/environments/my-environment",
236 "type": "application/json"
237 }
238 },
239 "_id": "57be1db38b75bf0772d11384",
240 "key": "environment-key-123abc",
241 "name": "My Environment",
242 "apiKey": "sdk-xxx",
243 "mobileKey": "mob-xxx",
244 "color": "F5A623",
245 "defaultTtl": 5,
246 "secureMode": true,
247 "defaultTrackEvents": false,
248 "requireComments": true,
249 "confirmChanges": true,
250 "tags": [
251 "ops"
252 ],
253 "critical": true,
254 "_access": {
255 "denied": [
256 {
257 "action": "string",
258 "reason": {
259 "effect": "allow",
260 "resources": [
261 "proj/*:env/*;qa_*:/flag/*"
262 ],
263 "notResources": [
264 "string"
265 ],
266 "actions": [
267 "*"
268 ],
269 "notActions": [
270 "string"
271 ],
272 "role_name": "string"
273 }
274 }
275 ],
276 "allowed": [
277 {
278 "action": "string",
279 "reason": {
280 "effect": "allow",
281 "resources": [
282 "proj/*:env/*;qa_*:/flag/*"
283 ],
284 "notResources": [
285 "string"
286 ],
287 "actions": [
288 "*"
289 ],
290 "notActions": [
291 "string"
292 ],
293 "role_name": "string"
294 }
295 }
296 ]
297 },
298 "approvalSettings": {
299 "required": true,
300 "bypassApprovalsForPendingChanges": false,
301 "minNumApprovals": 1,
302 "canReviewOwnRequest": false,
303 "canApplyDeclinedChanges": true,
304 "serviceKind": "launchdarkly",
305 "serviceConfig": {},
306 "requiredApprovalTags": [
307 "require-approval"
308 ],
309 "autoApplyApprovedChanges": true,
310 "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
311 },
312 "resourceApprovalSettings": {}
313 }
314 ],
315 "flag": {
316 "name": "My Flag",
317 "kind": "boolean",
318 "key": "flag-key-123abc",
319 "_version": 1,
320 "creationDate": 1494437420312,
321 "variations": [
322 {
323 "value": null,
324 "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05"
325 },
326 {
327 "value": null,
328 "_id": "a00bf58d-d252-476c-b915-15a74becacb4"
329 }
330 ],
331 "temporary": true,
332 "tags": [
333 "example-tag"
334 ],
335 "_links": {
336 "parent": {
337 "href": "/api/v2/flags/my-project",
338 "type": "application/json"
339 },
340 "self": {
341 "href": "/api/v2/flags/my-project/my-flag",
342 "type": "application/json"
343 }
344 },
345 "customProperties": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}",
346 "archived": false,
347 "description": "This flag controls the example widgets",
348 "clientSideAvailability": {},
349 "maintainerId": "569f183514f4432160000007",
350 "_maintainer": {
351 "_links": {
352 "self": {
353 "href": "/api/v2/members/569f183514f4432160000007",
354 "type": "application/json"
355 }
356 },
357 "_id": "569f183514f4432160000007",
358 "role": "admin",
359 "email": "ariel@acme.com",
360 "firstName": "Ariel",
361 "lastName": "Flores"
362 },
363 "archivedDate": 1494437420312,
364 "defaults": {
365 "onVariation": 0,
366 "offVariation": 1
367 },
368 "includeInSnippet": true
369 },
370 "resource": {
371 "kind": "flag",
372 "aiConfig": {
373 "key": "aiconfig-key-123abc",
374 "name": "AI Config 1"
375 },
376 "experiment": {
377 "key": "experiment-key-123abc",
378 "name": "My Experiment",
379 "_access": {
380 "denied": [
381 {
382 "action": "string",
383 "reason": {
384 "effect": "allow",
385 "resources": [
386 "proj/*:env/*;qa_*:/flag/*"
387 ],
388 "notResources": [
389 "string"
390 ],
391 "actions": [
392 "*"
393 ],
394 "notActions": [
395 "string"
396 ],
397 "role_name": "string"
398 }
399 }
400 ],
401 "allowed": [
402 {
403 "action": "string",
404 "reason": {
405 "effect": "allow",
406 "resources": [
407 "proj/*:env/*;qa_*:/flag/*"
408 ],
409 "notResources": [
410 "string"
411 ],
412 "actions": [
413 "*"
414 ],
415 "notActions": [
416 "string"
417 ],
418 "role_name": "string"
419 }
420 }
421 ]
422 }
423 },
424 "flag": {
425 "name": "My Flag",
426 "kind": "boolean",
427 "key": "flag-key-123abc",
428 "_version": 1,
429 "creationDate": 1494437420312,
430 "variations": [
431 {
432 "value": null,
433 "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05"
434 },
435 {
436 "value": null,
437 "_id": "a00bf58d-d252-476c-b915-15a74becacb4"
438 }
439 ],
440 "temporary": true,
441 "tags": [
442 "example-tag"
443 ],
444 "_links": {
445 "parent": {
446 "href": "/api/v2/flags/my-project",
447 "type": "application/json"
448 },
449 "self": {
450 "href": "/api/v2/flags/my-project/my-flag",
451 "type": "application/json"
452 }
453 },
454 "customProperties": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}",
455 "archived": false,
456 "description": "This flag controls the example widgets",
457 "clientSideAvailability": {},
458 "maintainerId": "569f183514f4432160000007",
459 "_maintainer": {
460 "_links": {
461 "self": {
462 "href": "/api/v2/members/569f183514f4432160000007",
463 "type": "application/json"
464 }
465 },
466 "_id": "569f183514f4432160000007",
467 "role": "admin",
468 "email": "ariel@acme.com",
469 "firstName": "Ariel",
470 "lastName": "Flores"
471 },
472 "archivedDate": 1494437420312,
473 "defaults": {
474 "onVariation": 0,
475 "offVariation": 1
476 },
477 "includeInSnippet": true
478 },
479 "segment": {
480 "name": "Example segment",
481 "tags": [
482 "testing"
483 ],
484 "creationDate": 1654104600000,
485 "lastModifiedDate": 1654104600000,
486 "key": "segment-key-123abc",
487 "_links": {},
488 "rules": [
489 {
490 "clauses": [
491 {
492 "attribute": "email",
493 "op": "endsWith",
494 "values": [
495 ".edu"
496 ],
497 "negate": false,
498 "_id": "12ab3c45de678910fab12345"
499 }
500 ],
501 "_id": "1234a56b7c89d012345e678f"
502 }
503 ],
504 "version": 1,
505 "deleted": false,
506 "generation": 1,
507 "description": "Bundle our sample customers together",
508 "included": [
509 "user-key-123abc"
510 ],
511 "excluded": [
512 "user-key-123abc"
513 ],
514 "includedContexts": [
515 {
516 "values": [
517 "string"
518 ],
519 "contextKind": "string"
520 }
521 ],
522 "excludedContexts": [
523 {
524 "values": [
525 "string"
526 ],
527 "contextKind": "string"
528 }
529 ],
530 "_access": {
531 "denied": [
532 {
533 "action": "string",
534 "reason": {
535 "effect": "allow",
536 "resources": [
537 "proj/*:env/*;qa_*:/flag/*"
538 ],
539 "notResources": [
540 "string"
541 ],
542 "actions": [
543 "*"
544 ],
545 "notActions": [
546 "string"
547 ],
548 "role_name": "string"
549 }
550 }
551 ],
552 "allowed": [
553 {
554 "action": "string",
555 "reason": {
556 "effect": "allow",
557 "resources": [
558 "proj/*:env/*;qa_*:/flag/*"
559 ],
560 "notResources": [
561 "string"
562 ],
563 "actions": [
564 "*"
565 ],
566 "notActions": [
567 "string"
568 ],
569 "role_name": "string"
570 }
571 }
572 ]
573 },
574 "_flags": [
575 {
576 "name": "Example flag",
577 "key": "flag-key-123abc",
578 "_links": {},
579 "_site": {
580 "href": "string",
581 "type": "string"
582 }
583 }
584 ],
585 "unbounded": false,
586 "unboundedContextKind": "string",
587 "_unboundedMetadata": {
588 "envId": "string",
589 "segmentId": "string",
590 "version": 1,
591 "includedCount": 1,
592 "excludedCount": 1,
593 "lastModified": 1,
594 "deleted": true
595 },
596 "_external": "amplitude",
597 "_externalLink": "https://analytics.amplitude.com/org/1234/cohort/123abc",
598 "_importInProgress": false
599 }
600 }
601 }
602 ],
603 "totalCount": 1,
604 "_links": {}
605}
Get all approval requests. ### Filtering approvals LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf ["memberId1", "memberId2"]`. - `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`. - `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`. - `resourceKind` filters for only approvals that correspond to the specified resource kind. For example: `filter=resourceKind equals flag`. Currently, `flag`, `segment`, and `aiConfig` resource kinds are supported. - `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf ["pending", "approved"]`. - `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf ["pending", "scheduled"]`. You can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf ["pending","approved"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
Was this page helpful?
Previous

List approval requests for a flag

Next
Built with

Get all approval requests.

Filtering approvals

LaunchDarkly supports the filter query param for filtering, with the following fields:

  • notifyMemberIds filters for only approvals that are assigned to a member in the specified list. For example: filter=notifyMemberIds anyOf ["memberId1", "memberId2"].
  • requestorId filters for only approvals that correspond to the ID of the member who requested the approval. For example: filter=requestorId equals 457034721476302714390214.
  • resourceId filters for only approvals that correspond to the the specified resource identifier. For example: filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag.
  • resourceKind filters for only approvals that correspond to the specified resource kind. For example: filter=resourceKind equals flag. Currently, flag, segment, and aiConfig resource kinds are supported.
  • reviewStatus filters for only approvals which correspond to the review status in the specified list. The possible values are approved, declined, and pending. For example: filter=reviewStatus anyOf ["pending", "approved"].
  • status filters for only approvals which correspond to the status in the specified list. The possible values are pending, scheduled, failed, and completed. For example: filter=status anyOf ["pending", "scheduled"].

You can also apply multiple filters at once. For example, setting filter=projectKey equals my-project, reviewStatus anyOf ["pending","approved"] matches approval requests which correspond to the my-project project key, and a review status of either pending or approved.

Expanding approval response

LaunchDarkly supports the expand query param to include additional fields in the response, with the following fields:

  • flag includes the flag the approval request belongs to
  • project includes the project the approval request belongs to
  • environments includes the environments the approval request relates to

For example, expand=project,flag includes the project and flag fields in the response.

Authentication

Authorizationstring
API Key authentication via header

Query parameters

filterstringOptionalformat: "string"

A comma-separated list of filters. Each filter is of the form field operator value. Supported fields are explained above.

expandstringOptionalformat: "string"

A comma-separated list of fields to expand in the response. Supported fields are explained above.

limitlongOptional
The number of approvals to return. Defaults to 20. Maximum limit is 200.
offsetlongOptional

Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query limit.

Response

Approval request collection response
itemslist of objects
An array of approval requests
totalCountinteger
Total number of approval requests
_linksmap from strings to objects
The location and content type of related resources

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error