List approval requests

GET
/api/v2/approval-requests

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 and segment 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.

Query parameters

filterstringOptional

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

expandstringOptional

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

Errors

Built with