API7 Docs

List all subscriptions in Provider Portal for an API product

GET /api/api_products/{api_product_id}/subscriptions

GET /api/api_products/{api_product_id}/subscriptions

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

api_product_id*string

The unique identifier of the API product.

Match^[a-zA-Z0-9-_.]+$
Length1 <= length <= 256

Query Parameters

page?integer

Page number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.

Formatint32
Range1 <= value
page_size?integer

Number of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.

Formatint32
Range1 <= value
direction?string

Order to list the resources by. The sorting index follows the configuration of order_by.

Default"desc"

Value in

  • "asc"
  • "desc"
order_by?string
Default"subscribed_at"

Value in

  • "developer_name"
  • "subscribed_at"
search?string

Condition to search resources by.

labels?string

Label(s) to filter resources by. The format is labels[key]=value and should be URL-encoded.

Length1 <= length
portal_id?string

The unique identifier of the portal instance.

Match^[a-zA-Z0-9-_.]+$
Length1 <= length <= 256
Default"default"

Response Body

application/json

application/json

curl -X GET "$API_BASE_URL/api/api_products/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101/subscriptions?search=version%253Dv2"

Successfully retrieved the paginated list of subscriptions.

{
  "total": 1,
  "list": [
    {
      "id": "string",
      "portal_id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "developer_id": "string",
      "developer_name": "string",
      "subscribed_at": 1742288230,
      "application_id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "application_name": "us-west-rsc",
      "api_product_id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "api_product_name": "us-west-rsc",
      "status": "unsubscribed"
    }
  ]
}
Complete operation details and schema variants

GET /api/api_products/{api_product_id}/subscriptions

List all subscriptions in Provider Portal for an API product

IAM Action: portal:GetAPIProduct, Resource: arn:api7:portal:portal/%s/apiproduct/%s

Parameters

  • api_product_id (path, string, required): The unique identifier of the API product.
  • page (query, integer, optional): Page number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
  • page_size (query, integer, optional): Number of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
  • direction (query, string, optional): Order to list the resources by. The sorting index follows the configuration of order_by.
  • order_by (query, string, optional):
  • search (query, string, optional): Condition to search resources by.
  • labels (query, string, optional): Label(s) to filter resources by. The format is labels[key]=value and should be URL-encoded.
  • portal_id (query, string, optional): The unique identifier of the portal instance.

Responses

  • 200: Successfully retrieved the paginated list of subscriptions.
  • allOf variant 1
  • list (array, optional): An array of resources.
  • total (integer, optional): Total number of objects.
  • allOf variant 2
  • list (array, optional): An array of Developer user.
  • list[].id (string, optional): The ID of the subscription.
  • list[].portal_id (string, optional): The object ID.
  • list[].developer_id (string, optional):
  • list[].developer_name (string, optional):
  • list[].subscribed_at (integer, optional): The object timestamp.
  • list[].application_id (string, optional): The object ID.
  • list[].application_name (string, optional): The object name.
  • list[].api_product_id (string, optional): The object ID.
  • list[].api_product_name (string, optional): The object name.
  • list[].status (string, optional):
  • 400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
  • value (object, optional): The specific resource.
  • error_msg (string, optional): The error message.

cURL

curl -X GET '$API_BASE_URL/api/api_products/{api_product_id}/subscriptions'