# Get all release pipelines

GET https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-pipelines

Get all release pipelines for a project.

### Filtering release pipelines

LaunchDarkly supports the following fields for filters:

- `query` is a string that matches against the release pipeline `key`, `name`, and `description`. It is not case sensitive. For example: `?filter=query:examplePipeline`.

- `env` is a string that matches an environment key. For example: `?filter=env:production`.


Reference: https://launchdarkly.com/docs/api/release-pipelines-beta/get-all-release-pipelines

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: LaunchDarkly REST API
  version: 1.0.0
paths:
  /api/v2/projects/{projectKey}/release-pipelines:
    get:
      operationId: get-all-release-pipelines
      summary: Get all release pipelines
      description: >
        Get all release pipelines for a project.


        ### Filtering release pipelines


        LaunchDarkly supports the following fields for filters:


        - `query` is a string that matches against the release pipeline `key`,
        `name`, and `description`. It is not case sensitive. For example:
        `?filter=query:examplePipeline`.


        - `env` is a string that matches an environment key. For example:
        `?filter=env:production`.
      tags:
        - subpackage_releasePipelinesBeta
      parameters:
        - name: projectKey
          in: path
          description: The project key
          required: true
          schema:
            type: string
            format: string
        - name: filter
          in: query
          description: >-
            A comma-separated list of filters. Each filter is of the form
            field:value. Read the endpoint description for a full list of
            available filter fields.
          required: false
          schema:
            type: string
            format: string
        - name: limit
          in: query
          description: The maximum number of items to return. Defaults to 20.
          required: false
          schema:
            type: integer
            format: int64
        - name: offset
          in: query
          description: >-
            Where to start in the list. Defaults to 0. 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`.
          required: false
          schema:
            type: integer
            format: int64
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Release pipeline collection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleasePipelineCollection'
        '404':
          description: Invalid resource identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorRep'
servers:
  - url: https://app.launchdarkly.com
  - url: https://app.launchdarkly.us
components:
  schemas:
    Link:
      type: object
      properties:
        href:
          type: string
          description: The URL of the link
        type:
          type: string
          description: The type of the link
      title: Link
    EnvironmentSummary:
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        key:
          type: string
          description: A project-unique key for the environment
        name:
          type: string
          description: A human-friendly name for the environment
        color:
          type: string
          description: The color used to indicate this environment in the UI
      required:
        - _links
        - key
        - name
        - color
      title: EnvironmentSummary
    ReleaseStrategy:
      type: string
      title: ReleaseStrategy
    ReleaseGuardianConfiguration:
      type: object
      properties:
        monitoringWindowMilliseconds:
          type: integer
          format: int64
          description: The monitoring window in milliseconds
        rolloutWeight:
          type: integer
          description: The rollout weight percentage
        rollbackOnRegression:
          type: boolean
          description: Whether or not to roll back on regression
        randomizationUnit:
          type: string
          description: The randomization unit for the measured rollout
      required:
        - monitoringWindowMilliseconds
        - rolloutWeight
        - rollbackOnRegression
      title: ReleaseGuardianConfiguration
    AudienceConfiguration:
      type: object
      properties:
        releaseStrategy:
          $ref: '#/components/schemas/ReleaseStrategy'
          description: The release strategy
        requireApproval:
          type: boolean
          description: Whether or not the audience requires approval
        notifyMemberIds:
          type: array
          items:
            type: string
          description: >-
            An array of member IDs. These members are notified to review the
            approval request.
        notifyTeamKeys:
          type: array
          items:
            type: string
          description: >-
            An array of team keys. The members of these teams are notified to
            review the approval request.
        releaseGuardianConfiguration:
          $ref: '#/components/schemas/ReleaseGuardianConfiguration'
          description: The configuration for the release guardian.
      required:
        - releaseStrategy
        - requireApproval
      title: AudienceConfiguration
    Audience:
      type: object
      properties:
        environment:
          $ref: '#/components/schemas/EnvironmentSummary'
          description: >-
            Details about the environment. When the environment has been
            deleted, this field is omitted.
        name:
          type: string
          description: The release phase name
        configuration:
          $ref: '#/components/schemas/AudienceConfiguration'
          description: The configuration for the audience's rollout.
        segmentKeys:
          type: array
          items:
            type: string
          description: A list of segment keys
      required:
        - name
      title: Audience
    Audiences:
      type: array
      items:
        $ref: '#/components/schemas/Audience'
      title: Audiences
    PhaseConfiguration:
      type: object
      properties: {}
      title: PhaseConfiguration
    Phase:
      type: object
      properties:
        id:
          type: string
          description: The phase ID
        audiences:
          $ref: '#/components/schemas/Audiences'
          description: >-
            An ordered list of the audiences for this release phase. Each
            audience corresponds to a LaunchDarkly environment.
        name:
          type: string
          description: The release phase name
        configuration:
          $ref: '#/components/schemas/PhaseConfiguration'
          description: The configuration for the phase's rollout.
      required:
        - id
        - audiences
        - name
      title: Phase
    ActionIdentifier:
      type: string
      title: ActionIdentifier
    ActionSpecifier:
      type: string
      title: ActionSpecifier
    AccessDeniedReasonEffect:
      type: string
      enum:
        - allow
        - deny
      description: Whether this statement should allow or deny actions on the resources.
      title: AccessDeniedReasonEffect
    AccessDeniedReason:
      type: object
      properties:
        resources:
          type: array
          items:
            type: string
          description: Resource specifier strings
        notResources:
          type: array
          items:
            type: string
          description: >-
            Targeted resources are the resources NOT in this list. The
            <code>resources</code> and <code>notActions</code> fields must be
            empty to use this field.
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          description: Actions to perform on a resource
        notActions:
          type: array
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          description: >-
            Targeted actions are the actions NOT in this list. The
            <code>actions</code> and <code>notResources</code> fields must be
            empty to use this field.
        effect:
          $ref: '#/components/schemas/AccessDeniedReasonEffect'
          description: >-
            Whether this statement should allow or deny actions on the
            resources.
        role_name:
          type: string
      required:
        - effect
      title: AccessDeniedReason
    AccessDenied:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/ActionIdentifier'
        reason:
          $ref: '#/components/schemas/AccessDeniedReason'
      required:
        - action
        - reason
      title: AccessDenied
    AccessAllowedReasonEffect:
      type: string
      enum:
        - allow
        - deny
      description: Whether this statement should allow or deny actions on the resources.
      title: AccessAllowedReasonEffect
    AccessAllowedReason:
      type: object
      properties:
        resources:
          type: array
          items:
            type: string
          description: Resource specifier strings
        notResources:
          type: array
          items:
            type: string
          description: >-
            Targeted resources are the resources NOT in this list. The
            <code>resources</code> and <code>notActions</code> fields must be
            empty to use this field.
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          description: Actions to perform on a resource
        notActions:
          type: array
          items:
            $ref: '#/components/schemas/ActionSpecifier'
          description: >-
            Targeted actions are the actions NOT in this list. The
            <code>actions</code> and <code>notResources</code> fields must be
            empty to use this field.
        effect:
          $ref: '#/components/schemas/AccessAllowedReasonEffect'
          description: >-
            Whether this statement should allow or deny actions on the
            resources.
        role_name:
          type: string
      required:
        - effect
      title: AccessAllowedReason
    AccessAllowedRep:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/ActionIdentifier'
        reason:
          $ref: '#/components/schemas/AccessAllowedReason'
      required:
        - action
        - reason
      title: AccessAllowedRep
    Access:
      type: object
      properties:
        denied:
          type: array
          items:
            $ref: '#/components/schemas/AccessDenied'
        allowed:
          type: array
          items:
            $ref: '#/components/schemas/AccessAllowedRep'
      required:
        - denied
        - allowed
      title: Access
    ReleasePipeline:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
          description: Timestamp of when the release pipeline was created
        description:
          type: string
          description: The release pipeline description
        key:
          type: string
          description: The release pipeline key
        name:
          type: string
          description: The release pipeline name
        phases:
          type: array
          items:
            $ref: '#/components/schemas/Phase'
          description: >-
            An ordered list of the release pipeline phases. Each phase is a
            logical grouping of one or more environments that share attributes
            for rolling out changes.
        tags:
          type: array
          items:
            type: string
          description: A list of the release pipeline's tags
        _version:
          type: integer
          description: The release pipeline version
        _access:
          $ref: '#/components/schemas/Access'
          description: Details on the allowed and denied actions for this release pipeline
        isProjectDefault:
          type: boolean
          description: >-
            Whether this release pipeline is the default pipeline for the
            project
        _isLegacy:
          type: boolean
          description: Whether this release pipeline is a legacy pipeline
      required:
        - createdAt
        - key
        - name
        - phases
      title: ReleasePipeline
    ReleasePipelineCollection:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ReleasePipeline'
          description: An array of release pipelines
        totalCount:
          type: integer
          description: Total number of release pipelines
      required:
        - items
        - totalCount
      title: ReleasePipelineCollection
    NotFoundErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: NotFoundErrorRep
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

```

## SDK Code Examples

```python
import requests

url = "https://app.launchdarkly.com/api/v2/projects/projectKey/release-pipelines"

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.launchdarkly.com/api/v2/projects/projectKey/release-pipelines';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.launchdarkly.com/api/v2/projects/projectKey/release-pipelines"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.launchdarkly.com/api/v2/projects/projectKey/release-pipelines")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.launchdarkly.com/api/v2/projects/projectKey/release-pipelines")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.launchdarkly.com/api/v2/projects/projectKey/release-pipelines', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.launchdarkly.com/api/v2/projects/projectKey/release-pipelines");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.launchdarkly.com/api/v2/projects/projectKey/release-pipelines")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```