---
title: "Get one API's subscription"
method: GET
path: "/environments/{envId}/apis/{apiId}/subscriptions/{subscriptionId}"
tags: ["API Subscriptions"]
---

# Get one API's subscription

`GET /environments/{envId}/apis/{apiId}/subscriptions/{subscriptionId}`

Get one API's subscription

Get the API's subscription by its identifier.

## Query parameters

- `expands` string[]

## Response `200`

An API's subscription

- Subscription
  - `id` string — Subscription's uuid.
  - `api` BaseApi
    - `id` string — API's uuid.
    - `name` string — API's name. Duplicate names can exists.
    - `description` string — API's description. A short description of your API.
  - `apiProduct` BaseApiProduct
    - `id` string — API Product's uuid.
    - `name` string — API Product's name.
    - `description` string — API Product's description.
  - `plan` BasePlan
    - `id` string — Plan's uuid.
    - `name` string — Plan's name. Duplicate names can exists.
    - `description` string — Plan's description. A short description of your plan.
    - `apiId` string — Id of the API owning the plan.
    - `apiProductId` string — Id of the API Product owning the plan. Present only when the plan belongs to an API Product (omitted for API plans).
    - `security` PlanSecurity
      - `type` 'KEY_LESS' | 'API_KEY' | 'OAUTH2' | 'JWT' | 'MTLS', required — Plan security type.
      - `configuration` object
    - `mode` 'STANDARD' | 'PUSH' — The behavioural mode of the Plan (Standard for classical plan, Push for subscription plan).
  - `application` BaseApplication
    - `id` string — Application's uuid.
    - `name` string — Application's name. Duplicate names can exist.
    - `description` string — Application's description. A short description of your App.
    - `domain` string — Application's domain. Domain used by application, if relevant.
    - `type` string — Application's type.
    - `primaryOwner` PrimaryOwner
      - `id` string — Owner's uuid.
      - `email` string — Owner's email. Can be null if owner is a group.
      - `displayName` string — Owner's name.
      - `type` 'USER' | 'GROUP' — The type of membership
    - `apiKeyMode` 'SHARED' | 'EXCLUSIVE' | 'UNSPECIFIED' — The mode of an application regarding ApiKey plans. * UNSPECIFIED: no selected mode yet * EXCLUSIVE: an API Key is generated for each new subscription * SHARED: reuse always the same API Key for all subscriptions
  - `consumerMessage` string — Message given by the api consumer when subscribing to the api.
  - `publisherMessage` string — Message given by the api publisher when accepting or rejecting the subscription.
  - `metadata` object — A list of metadata associated to this subscription.
  - `daysToExpirationOnLastNotification` integer — Number of days before the expiration of this subscription when the last pre-expiration notification was sent.
  - `consumerConfiguration` SubscriptionConsumerConfiguration — Consumer configuration associated to the subscription in case it is attached to a push plan.
    - `entrypointId` string, required — The id of the targeted entrypoint
    - `channel` string — The channel to consume
    - `entrypointConfiguration` object — The configuration to use at subscription time to push to the target service.
  - `failureCause` string — Details about the last failure encountered on this subscription.
  - `status` 'PENDING' | 'REJECTED' | 'ACCEPTED' | 'CLOSED' | 'PAUSED' | 'RESUMED' — The status of the subscription manageable by the api publisher.
  - `consumerStatus` 'STARTED' | 'STOPPED' | 'FAILURE' — The status of the subscription manageable by the api consumer.
  - `processedBy` BaseUser — Base information about a user.
    - `id` string — User's uuid.
    - `displayName` string — User's name.
  - `subscribedBy` BaseUser — Base information about a user.
    - `id` string — User's uuid.
    - `displayName` string — User's name.
  - `processedAt` string, date-time — The datetime when the subscription was processed.
  - `startingAt` string, date-time — The datetime when the subscription starts. No starting date means the subscription starts immediately.
  - `endingAt` string, date-time — The datetime when the subscription ends. No ending date means the subscription never ends.
  - `createdAt` string, date-time — The datetime when the subscription was created.
  - `updatedAt` string, date-time — The last datetime when the subscription was updated.
  - `closedAt` string, date-time — The datetime when the subscription was closed.
  - `pausedAt` string, date-time — The datetime when the subscription was paused by the api publisher.
  - `consumerPausedAt` string, date-time — The datetime when the subscription was paused by the api consumer.
  - `origin` 'KUBERNETES' | 'MANAGEMENT' — The origin of the subscription.

## Other responses

- `default` — Generic error response

---

[API](https://skmtc.net/gravitee-io/apis/gravitee-io-apim-management-api-apis.md) · [All operations](https://skmtc.net/gravitee-io/apis/gravitee-io-apim-management-api-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gravitee-io/gravitee-io-apim-management-api-apis/revisions/aef12fc964d5/schema)
