# Get applications

GET https://app.launchdarkly.com/api/v2/applications


Get a list of applications.

### Expanding the applications response

LaunchDarkly supports expanding the "Get applications" response to include additional fields.

To expand the response, append the `expand` query parameter and include the following:

* `flags` includes details on the flags that have been evaluated by the application

For example, use `?expand=flags` to include the `flags` field in the response. By default, this field is **not** included in the response.


Reference: https://launchdarkly.com/docs/api/applications-beta/get-applications

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: LaunchDarkly REST API
  version: 1.0.0
paths:
  /api/v2/applications:
    get:
      operationId: get-applications
      summary: Get applications
      description: >

        Get a list of applications.


        ### Expanding the applications response


        LaunchDarkly supports expanding the "Get applications" response to
        include additional fields.


        To expand the response, append the `expand` query parameter and include
        the following:


        * `flags` includes details on the flags that have been evaluated by the
        application


        For example, use `?expand=flags` to include the `flags` field in the
        response. By default, this field is **not** included in the response.
      tags:
        - subpackage_applicationsBeta
      parameters:
        - name: filter
          in: query
          description: >-
            Accepts filter by `key`, `name`, `kind`, and `autoAdded`. To learn
            more about the filter syntax, read [Filtering applications and
            application
            versions](https://launchdarkly.com/docs/api/applications-beta#filtering-applications-and-application-versions).
          required: false
          schema:
            type: string
            format: string
        - name: limit
          in: query
          description: The number of applications to return. Defaults to 10.
          required: false
          schema:
            type: integer
            format: int64
        - name: offset
          in: query
          description: >-
            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`.
          required: false
          schema:
            type: integer
            format: int64
        - name: sort
          in: query
          description: >-
            Accepts sorting order and fields. Fields can be comma separated.
            Possible fields are `creationDate`, `name`. Examples: `sort=name`
            sort by names ascending, `sort=-name,creationDate` sort by names
            descending and creationDate ascending.
          required: false
          schema:
            type: string
            format: string
        - name: expand
          in: query
          description: >-
            A comma-separated list of properties that can reveal additional
            information in the response. Options: `flags`.
          required: false
          schema:
            type: string
            format: string
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Applications response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationCollectionRep'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestErrorRep'
        '401':
          description: Invalid access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorRep'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorRep'
        '404':
          description: Invalid resource identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorRep'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedErrorRep'
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
    FlagListingRep:
      type: object
      properties:
        name:
          type: string
          description: The flag name
        key:
          type: string
          description: The flag key
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
        _site:
          $ref: '#/components/schemas/Link'
      required:
        - name
        - key
      title: FlagListingRep
    ApplicationFlagCollectionRep:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/FlagListingRep'
          description: A list of the flags that have been evaluated by the application
        totalCount:
          type: integer
          description: The number of flags that have been evaluated by the application
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
      title: ApplicationFlagCollectionRep
    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
    UnixMillis:
      type: integer
      format: int64
      title: UnixMillis
    ApplicationRepKind:
      type: string
      enum:
        - browser
        - mobile
        - server
      description: To distinguish the kind of application
      title: ApplicationRepKind
    MemberSummary:
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        _id:
          type: string
          description: The member's ID
        firstName:
          type: string
          description: The member's first name
        lastName:
          type: string
          description: The member's last name
        role:
          type: string
          description: >-
            The member's base role. If the member has no additional roles, this
            role will be in effect.
        email:
          type: string
          description: The member's email address
      required:
        - _links
        - _id
        - role
        - email
      title: MemberSummary
    MemberTeamSummaryRep:
      type: object
      properties:
        customRoleKeys:
          type: array
          items:
            type: string
          description: A list of keys of the custom roles this team has access to
        key:
          type: string
          description: The team key
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
        name:
          type: string
          description: The team name
      required:
        - customRoleKeys
        - key
        - name
      title: MemberTeamSummaryRep
    MaintainerRep:
      type: object
      properties:
        member:
          $ref: '#/components/schemas/MemberSummary'
          description: Details on the member who maintains this resource
        team:
          $ref: '#/components/schemas/MemberTeamSummaryRep'
          description: Details on the team that maintains this resource
      title: MaintainerRep
    ApplicationRep:
      type: object
      properties:
        flags:
          $ref: '#/components/schemas/ApplicationFlagCollectionRep'
          description: Details about the flags that have been evaluated by the application
        _access:
          $ref: '#/components/schemas/Access'
          description: Details on the allowed and denied actions for this application
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        _version:
          type: integer
          description: Version of the application
        autoAdded:
          type: boolean
          description: >-
            Whether the application was automatically created because it was
            included in a context when a LaunchDarkly SDK evaluated a feature
            flag, or was created through the LaunchDarkly UI or REST API.
        creationDate:
          $ref: '#/components/schemas/UnixMillis'
          description: Timestamp of when the application version was created
        description:
          type: string
          description: The application description
        key:
          type: string
          description: The unique identifier of this application
        kind:
          $ref: '#/components/schemas/ApplicationRepKind'
          description: To distinguish the kind of application
        _maintainer:
          $ref: '#/components/schemas/MaintainerRep'
          description: Associated maintainer member or team info for the application
        name:
          type: string
          description: The name of the application
      required:
        - autoAdded
        - key
        - kind
        - name
      title: ApplicationRep
    ApplicationCollectionRep:
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          description: The location and content type of related resources
        items:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationRep'
          description: A list of applications
        totalCount:
          type: integer
          description: The number of applications
      title: ApplicationCollectionRep
    InvalidRequestErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: InvalidRequestErrorRep
    UnauthorizedErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: UnauthorizedErrorRep
    ForbiddenErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: ForbiddenErrorRep
    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
    RateLimitedErrorRep:
      type: object
      properties:
        code:
          type: string
          description: Specific error code encountered
        message:
          type: string
          description: Description of the error
      required:
        - code
        - message
      title: RateLimitedErrorRep
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

```

## SDK Code Examples

```python
import requests

url = "https://app.launchdarkly.com/api/v2/applications"

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

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

print(response.json())
```

```javascript
const url = 'https://app.launchdarkly.com/api/v2/applications';
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/applications"

	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/applications")

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/applications")
  .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/applications', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://app.launchdarkly.com/api/v2/applications");
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/applications")! 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()
```