API7 Docs

List all API products in Provider Portal

GET /api/api_products

GET /api/api_products

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

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

Index to order resources by.

Default"updated_at"

Value in

  • "created_at"
  • "updated_at"
search?string

Condition to search resources by.

service_id?string

The unique identifier of the service.

Match^[a-zA-Z0-9-_.]+$
Length1 <= length <= 256
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?search=version%253Dv2"

Successfully retrieved the paginated list of API products.

{
  "total": 1,
  "list": [
    {
      "type": "gateway",
      "name": "Weather Insights API",
      "logo": "string",
      "desc": "The Weather Insights API provides real-time and historical weather data for any location worldwide.",
      "labels": {
        "version": "v2",
        "env": "prod"
      },
      "auth": {
        "key-auth": {
          "header": "apikey",
          "hide_credentials": false,
          "query": "apikey"
        }
      },
      "status": "draft",
      "subscription_auto_approval": false,
      "can_view_unsubscribed": true,
      "visibility": "public",
      "linked_gateway_services": [
        {
          "gateway_group_id": "bc1b95c9-b348-4832-acc3-e257d2342df1",
          "gateway_group_name": "us-west-rsc",
          "service_id": "b32e678e-7f6b-4a50-b113-550621ed4c01",
          "name": "Weather Insights API",
          "version": "1.3.2",
          "status": 0,
          "hosts": [
            "weatherinsights.com"
          ],
          "updated_at": 1742288230,
          "openapi_title": "Weather Insights API - OpenAPI 3.0"
        }
      ],
      "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "portal_id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "created_at": 1742288232,
      "updated_at": 1742288235
    }
  ]
}
Complete operation details and schema variants

GET /api/api_products

List all API products in Provider Portal

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

Parameters

  • 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): Index to order resources by.
  • search (query, string, optional): Condition to search resources by.
  • service_id (query, string, optional): The unique identifier of the service.
  • portal_id (query, string, optional): The unique identifier of the portal instance.

Responses

  • 200: Successfully retrieved the paginated list of API products.

  • 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 APIProduct.

  • oneOf variant 1: Gateway API Product

  • allOf variant 1

  • list[].type (string, required):

  • list[].name (string, required): The object name.

  • list[].logo (string, optional): The base64-encoded logo image of the API product.

  • list[].desc (string, optional): The description of the API product.

  • list[].labels (object, optional): Key-value pairs of labels.

  • list[].auth (object, optional): The authentication configuration of the API product.

  • list[].auth.key-auth (object, optional): Key authentication configurations.

  • list[].auth.key-auth.hide_credentials (boolean, optional): If true, do not pass the header or query string with key to upstream services.

  • list[].auth.key-auth.query (string, optional): The query string to get the key from. Lower priority than header.

  • list[].auth.key-auth.header (string, optional): The header to get the key from.

  • list[].auth.basic-auth (object, optional): Basic authentication configurations.

  • list[].auth.basic-auth.hide_credentials (boolean, optional): If true, do not pass the header or query string with key to upstream services.

  • list[].auth.dcr (object, optional): DCR authentication configurations.

  • list[].auth.dcr.dcr_provider_id (string, required): ID of the DCR provider.

  • list[].linked_gateway_services (array, required): An array of gateway groups and services that the API product is linked to.

  • list[].linked_gateway_services[].gateway_group_id (string, optional): The gateway group ID.

  • list[].linked_gateway_services[].service_id (string, optional): The ID of the linked gateway service.

  • list[].linked_gateway_services[].linked_hosts (array, optional): Select one or more hosts configured for the gateway service to be published to the API portal. If not set, it means using all hosts of the gateway service.

  • list[].status (string, optional): Status of the API product.

  • list[].subscription_auto_approval (boolean, optional): If true, the subscription is automatically approved.

  • list[].can_view_unsubscribed (boolean, optional): If true, developers can view the unsubscribed API.

  • list[].visibility (string, optional): The visibility of the API product in the API hub. public means the product is visible to all users and logged_in means the product is only visible to logged-in developers.

  • allOf variant 2

  • list[].linked_gateway_services (array, optional): An array of gateway groups and services that the API product is linked to.

  • list[].linked_gateway_services[].gateway_group_id (string, optional): The gateway group ID.

  • list[].linked_gateway_services[].gateway_group_name (string, optional): The object name.

  • list[].linked_gateway_services[].service_id (string, optional): The service ID.

  • list[].linked_gateway_services[].name (string, optional): The service name.

  • list[].linked_gateway_services[].version (string, optional): The version of the service.

  • list[].linked_gateway_services[].status (integer, optional): The object status. 1 means the object is active while 0 means it's inactive.

  • list[].linked_gateway_services[].hosts (array, optional):

  • list[].linked_gateway_services[].updated_at (integer, optional): The object timestamp.

  • list[].linked_gateway_services[].openapi_title (string, optional): The title of the OpenAPI file.

  • allOf variant 3

  • list[].id (string, optional): The object ID.

  • list[].portal_id (string, optional): The object ID.

  • list[].created_at (integer, optional): The object created timestamp.

  • list[].updated_at (integer, optional): The object updated timestamp.

  • oneOf variant 2: External API Product

  • allOf variant 1

  • allOf variant 1

  • list[].type (string, required): Type of API product.

  • list[].name (string, required): The object name.

  • list[].raw_openapi (string, required): The content of the OpenAPI YAML file.

  • list[].status (string, optional): Status of the API product.

  • list[].visibility (string, optional): The visibility of the API product in the API hub. public means the product is visible to all users and logged_in means the product is only visible to logged-in developers.

  • allOf variant 2

  • anyOf variant 1

  • list[].server_url (string, required): The server URL. It should be configured if the server URL is not defined in the OpenAPI spec.

  • anyOf variant 2

  • list[].server_urls (array, required): The server URLs. It should be configured if the server URLs are not defined in the OpenAPI spec.

  • allOf variant 2

  • list[].tags (array, optional):

  • list[].desc (string, optional): Description.

  • list[].api_desc (string, optional): API description.

  • list[].api_count (number, optional): API count.

  • allOf variant 3

  • list[].id (string, optional): The object ID.

  • list[].portal_id (string, optional): The object ID.

  • list[].created_at (integer, optional): The object created timestamp.

  • list[].updated_at (integer, optional): The object updated timestamp.

  • 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'