Get API's plans

get

/developers/services/v1/apis/{vanityName}/plans

Returns all the plans for the given API the requesting user is authorized to view.

All authenticated users can request this resource.

Request

Path Parameters
  • An API's unique vanity name. This is the URI path of the details page for the API on the Developer Portal (like https://example.com/developers/apis/weatherService.
Back to Top

Response

Supported Media Types

200 Response

JSON structure with list of all the viewable plans for the API.
Body ()
Root Schema : PlanCollectionResponse
Type: object
HATEOAS plan collection response representation.
Show Source
Nested Schema : filters
Type: array
List of filters applicable for the current API list. This is null by default.
Show Source
Nested Schema : items
Type: array
Actual response items.
Show Source
Nested Schema : states
Type: array
Optional list of API states. This is null by default.
Show Source
Nested Schema : Plan
Type: object

400 Response

Bad request: indicates a problem with the input parameters.

401 Response

Authentication required.

404 Response

Not found.

500 Response

Server error.
Back to Top

Examples

The following example shows how to retrieve all the plans for the given {vanityName} API published to the Developer Portal by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.

curl -i -X GET 
-H "Authorization: Bearer access_token
https://example.com:443/developers/services/v1/apis/{vanityName}/plans

{vanityName} is an API's unique vanity name. This is the URI path of the details page for the API on the Developer Portal (like https://example.com/developers/apis/weatherService, see Get APIs.

Example of Response Headers

The following shows an example of the response headers.

HTTP/1.1 200 OK
Server: Oracle Traffic Director
Content-Length: 7275
Date: Thu, 15 Feb 2018 14:27:50 GMT
Content-type: application/json
X-oracle-dms-ecid: a7070a18-e96d-4e69-a511-58eafd07a798-0000f808
X-oracle-dms-rid: 0:1

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
    "totalResults": 2,
    "count": 2,
    "hasMore": false,
    "items": [
        {
            "entitlements": [
                {
                    "vanityName": "geo",
                    "entitlementId": 103,
                    "name": "GeoServices",
                    "description": "Mapping, Routing & Navigation Services",
                    "id": 103,
                    "state": "ACTIVE",
                    "constraints": {
                        "rate": {
                            "invocations": [
                                {
                                    "period": "Day",
                                    "limit": "10000"
                                },
                                {
                                    "period": "Week",
                                    "limit": "30000"
                                }
                            ]
                        }
                    },
                    "version": "3.0"
                },
                {
                    "vanityName": "allied1",
                    "entitlementId": 100,
                    "name": "Allied Mortgage Calculator",
                    "description": "Fast and easy real estate mortgage payment calculator",
                    "id": 100,
                    "state": "ACTIVE",
                    "version": "1.0"
                },
                {
                    "vanityName": "concur",
                    "entitlementId": 102,
                    "name": "Concur Real Estate Price Comparision",
                    "description": "Compare real estate prices from multiple realtors and multiple markets simultanously",
                    "id": 102,
                    "state": "ACTIVE",
                    "constraints": {
                        "rate": {
                            "invocations": [
                                {
                                    "period": "Day",
                                    "limit": "200000"
                                },
                                {
                                    "period": "Month",
                                    "limit": "5000000"
                                }
                            ]
                        }
                    },
                    "version": "1.0"
                },
                {
                    "vanityName": "energy",
                    "entitlementId": 112,
                    "name": "Energy",
                    "description": "Energy consumption services",
                    "id": 105,
                    "state": "ACTIVE",
                    "version": "1.0"
                }
            ],
            "vanityName": "real",
            "subscriptions": [
                {
                    "name": "World Weather",
                    "id": 101
                },
                {
                    "name": "Temperature",
                    "id": 105
                },
                {
                    "name": "Allied Mortgage Calculator",
                    "id": 104
                },
                {
                    "name": "New",
                    "id": 110
                }
            ],
            "publicationSettings": {
                "icon": {
                    "displayed": true
                },
                "description": {
                    "displayed": true
                },
                "constraints": {
                    "rate": {
                        "invocations": {
                            "displayed": true,
                            "displayText": ""
                        }
                    }
                },
                "recommended": true
            },
            "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAIAAAC1nk4lAAAABnRSTlMA/6PnjvRcSQRYQD6AOXgKCGNIqgJRFs+syq5kboPUeN5JBsZkG0hxWzj6oMCoAFWc5y4DUJUTMjIAAys3NGla9vV+wxvrHmowCgYBCBVVW8A9p3Pf8HRevgGV2WhT8AAAAASUVORK5CYII=",
            "name": "Real Estate Gold",
            "description": "Allows for high usage.",
            "id": 100,
            "type": "plan"
        },
        {
            "entitlements": [
                {
                    "vanityName": "allied1",
                    "entitlementId": 110,
                    "name": "Allied Mortgage Calculator",
                    "description": "Fast and easy real estate mortgage payment calculator",
                    "id": 100,
                    "state": "ACTIVE",
                    "version": "1.0"
                }
            ],
            "vanityName": "GoldMy",
            "subscriptions": [
                {
                    "name": "Subscribeplan",
                    "id": 108
                }
            ],
            "name": "Goldplan",
            "id": 107,
            "type": "plan"
        }
    ]
}
Back to Top