# List Application Identities

```http
GET /appDiscovery/applications/{applicationId}/identities
```

API: Cisco Secure Access App Discovery API (version 2.0.2)

Operation ID: getApplicationIdentities

Tags: Applications, Secure Access

## Description

List all identities for the application.

## Servers

```json
[
  {
    "url": "https://api.sse.cisco.com/{basePath}",
    "variables": {
      "basePath": {
        "default": "reports/v2"
      }
    }
  }
]
```

## Authentication

Satisfy any one of the following alternatives. Within each alternative, all listed schemes are required. An empty object allows anonymous access.

```json
[
  {
    "oauthFlow": [
      "reports.appDiscovery:read"
    ]
  }
]
```

### Security schemes

```json
{
  "oauthFlow": {
    "type": "oauth2",
    "description": "client credential flow",
    "flows": {
      "clientCredentials": {
        "tokenUrl": "https://api.sse.cisco.com/auth/v2/token",
        "scopes": {
          "reports.appDiscovery:write": "Write reports app discovery",
          "reports.appDiscovery:read": "Read reports app discovery"
        }
      }
    }
  }
}
```

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| applicationId | path | yes | string | The ID of the application. |
| date | query | no | string (date) | Specify a date to search for data within a twenty-four hour time period. If you do not provide a date, the last 90 days period is used to query the collection. |
| limit | query | no | integer | The maximum number of items to return in the collection. |
| offset | query | no | integer | The number of items to skip before starting to collect the result set. |
| sort | query | no | string | Specify the name of a field to sort the application identities. |
| order | query | no | string | Specify the order to sort the collection. Valid values are: \`asc\` (ascending) or \`desc\` (descending). |

### Parameter definitions

```json
[
  {
    "in": "path",
    "name": "applicationId",
    "description": "The ID of the application.",
    "required": true,
    "schema": {
      "type": "string"
    },
    "$$ref": "#/components/parameters/applicationId"
  },
  {
    "in": "query",
    "name": "date",
    "schema": {
      "type": "string",
      "format": "date"
    },
    "description": "Specify a date to search for data within a twenty-four hour time period.\nIf you do not provide a date, the last 90 days period is used to query the collection.",
    "example": "2022-01-01",
    "$$ref": "#/components/parameters/date"
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "description": "The maximum number of items to return in the collection.",
    "$$ref": "#/components/parameters/limit"
  },
  {
    "in": "query",
    "name": "offset",
    "schema": {
      "type": "integer"
    },
    "description": "The number of items to skip before starting to collect the result set.",
    "$$ref": "#/components/parameters/offset"
  },
  {
    "in": "query",
    "name": "sort",
    "schema": {
      "type": "string",
      "enum": [
        "firstDetected",
        "lastDetected"
      ]
    },
    "description": "Specify the name of a field to sort the application identities.",
    "example": "lastDetected",
    "$$ref": "#/components/parameters/identitiesSort"
  },
  {
    "in": "query",
    "name": "order",
    "schema": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "description": "Specify the order to sort the collection. Valid values are: `asc` (ascending)\nor `desc` (descending).",
    "example": "asc",
    "$$ref": "#/components/parameters/order"
  }
]
```

## Responses

### 200

OK

```json
{
  "description": "OK",
  "headers": {
    "Link": {
      "schema": {
        "type": "string"
      },
      "description": "Links to related resources, in the format defined by\n[RFC 5988](https://tools.ietf.org/html/rfc5988#section-5).\nIf there is a next page, this header includes a link with relation type\n`next` to the next page.",
      "$$ref": "#/components/headers/Link"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "The list of identity information for the application.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "sources",
                "firstDetected",
                "lastDetected"
              ],
              "description": "The application identity information.",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The ID of the identity.",
                  "example": 10000
                },
                "name": {
                  "type": "string",
                  "description": "The name of the identity.",
                  "example": "My Identity"
                },
                "sources": {
                  "type": "array",
                  "description": "The list of app sources where the sources are DNS, Web (Secure Web Gateway), and cloud-delivered firewall (CDFW) traffic events.\nThe list can contain one or more of the source types.",
                  "items": {
                    "anyOf": [
                      {
                        "type": "object",
                        "description": "The properties of the app's DNS requests.",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The type of traffic associated with the source.",
                            "enum": [
                              "dns"
                            ],
                            "example": "dns"
                          },
                          "requests": {
                            "type": "integer",
                            "description": "The number of DNS requests for this app.",
                            "example": 100
                          },
                          "blockedRequests": {
                            "type": "integer",
                            "description": "The number of DNS requests blocked, based on the policy configurations.",
                            "example": 50
                          }
                        },
                        "example": {
                          "name": "dns",
                          "requests": 100,
                          "blockedRequests": 35
                        },
                        "$$ref": "#/components/schemas/DnsSource"
                      },
                      {
                        "type": "object",
                        "description": "The properties of the app's web requests.",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The type of traffic associated with the source.",
                            "enum": [
                              "swg"
                            ],
                            "example": "swg"
                          },
                          "totalTraffic": {
                            "type": "integer",
                            "description": "The total number of bytes inbound and outbound for this app in your environment.",
                            "example": 150
                          },
                          "bytesIn": {
                            "type": "integer",
                            "description": "The number of bytes received (inbound).",
                            "example": 50
                          },
                          "bytesOut": {
                            "type": "integer",
                            "description": "The number of bytes sent (outbound).",
                            "example": 100
                          },
                          "blockedBytesOut": {
                            "type": "integer",
                            "description": "The number of bytes of outbound traffic that are blocked.",
                            "example": 90
                          }
                        },
                        "example": {
                          "name": "swg",
                          "totalTraffic": 200,
                          "bytesIn": 100,
                          "bytesOut": 100,
                          "blockedBytesOut": 49
                        },
                        "$$ref": "#/components/schemas/SwgSource"
                      },
                      {
                        "type": "object",
                        "description": "The properties of the app's requests that are managed by the cloud-delivered firewall (CDFW).",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The type of traffic associated with the source.",
                            "enum": [
                              "cdfw"
                            ],
                            "example": "cdfw"
                          },
                          "events": {
                            "type": "integer",
                            "description": "The number of CDFW L7 events for this app.",
                            "example": 100
                          },
                          "blockedEvents": {
                            "type": "integer",
                            "description": "The number of CDFW L7 events that are blocked.",
                            "example": 50
                          }
                        },
                        "example": {
                          "name": "cdfw",
                          "events": 50,
                          "blockedEvents": 25
                        },
                        "$$ref": "#/components/schemas/CdfwSource"
                      }
                    ]
                  },
                  "example": [
                    {
                      "name": "cdfw",
                      "events": 50,
                      "blockedEvents": 25
                    }
                  ],
                  "$$ref": "#/components/schemas/Sources"
                },
                "firstDetected": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The date and time (ISO 8601 timestamp) when the system first detected the identity for the application.",
                  "example": "2022-01-01T00:00:00.000Z"
                },
                "lastDetected": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The date and time (ISO 8601 timestamp) when the system last detected the identity for the application.",
                  "example": "2022-01-01T00:00:00.000Z"
                }
              },
              "example": {
                "id": 10000,
                "name": "My identity",
                "sources": [
                  {
                    "name": "dns",
                    "requests": 100,
                    "blockedRequests": 100
                  }
                ],
                "firstDetected": "2022-01-01T00:00:00.000Z",
                "lastDetected": "2022-01-01T00:00:00.000Z"
              },
              "$$ref": "#/components/schemas/ApplicationIdentity"
            }
          }
        },
        "example": {
          "items": [
            {
              "id": 10000,
              "name": "My Identity",
              "sources": [
                {
                  "name": "dns",
                  "requests": 100,
                  "blockedRequests": 100
                }
              ],
              "firstDetected": "2022-01-01T00:00:00.000Z",
              "lastDetected": "2022-01-01T00:00:00.000Z"
            }
          ]
        },
        "$$ref": "#/components/schemas/ApplicationIdentityList"
      },
      "example": {
        "items": [
          {
            "id": 10000,
            "name": "My Identity",
            "sources": [
              {
                "name": "dns",
                "requests": 100,
                "blockedRequests": 100
              }
            ],
            "firstDetected": "2022-01-01T00:00:00.000Z",
            "lastDetected": "2022-01-01T00:00:00.000Z"
          }
        ]
      }
    }
  }
}
```

### 400

Invalid request

```json
{
  "description": "Invalid request",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "The error message returned in the response.",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "$$ref": "#/components/schemas/Error"
      }
    }
  },
  "$$ref": "#/components/responses/InvalidRequest"
}
```

### 401

Unauthorized request

```json
{
  "description": "Unauthorized request",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "The error message returned in the response.",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "$$ref": "#/components/schemas/Error"
      }
    }
  },
  "$$ref": "#/components/responses/Unauthorized"
}
```

### 403

Forbidden

```json
{
  "description": "Forbidden",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "The error message returned in the response.",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "$$ref": "#/components/schemas/Error"
      }
    }
  },
  "$$ref": "#/components/responses/Forbidden"
}
```

### 404

Not found

```json
{
  "description": "Not found",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "The error message returned in the response.",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "$$ref": "#/components/schemas/Error"
      }
    }
  },
  "$$ref": "#/components/responses/NotFound"
}
```

### 500

Server error

```json
{
  "description": "Server error",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "description": "The error message returned in the response.",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "$$ref": "#/components/schemas/Error"
      }
    }
  },
  "$$ref": "#/components/responses/ServerError"
}
```

## Additional OpenAPI fields

```json
{
  "__originalOperationId": "getApplicationIdentities"
}
```
