Get available plans for an API
/apiplatform/management/v1/apis/{apiId}/entitlements/plans
Returns a collection of plans available to the {apiId} API. By default, the name and ID of plans are returned.
User must have Plan Manger or API Manger role. This call is made in the context of an API so the Mange API or Entitle API grant on the API to invoke the call. The return includes Plans for which the user has Manage Plan or Entitle API to Plan grant.
Request
- application/json
-
apiId: string
A unique ID referencing a specific API.
-
fields(optional): array
Collection Format:
csv
Pass optional fields, separated by commas, in this parameter to return them in the response. See the operation's description for a list of field values. -
limit(optional): integer(int32)
Number of items to retrieve.
1
is the minumum;128
is the maximum.Default Value:128
-
offset(optional): integer(int32)
Offset the list returned results by this amount. Default is zero.Default Value:
0
- orderBy(optional): array
-
q(optional): string
Pass filtering criteria, using the SCIM filter expression syntax
-
totalResults(optional): boolean
Include the total result count in the response.Default Value:
false
Response
- application/json
200 Response
object
-
count(optional):
integer(int32)
The number of items in this collection.
object
-
totalResults(optional):
integer(int32)
The total number of results available. Only provided if the showTotalResults query parameter is set to true
object
403 Response
object
-
detail(optional):
string
Detailed error message
-
errorCode(optional):
string
Application specific error code
-
errorDetails(optional):
array errorDetails
additional errors
-
errorPath(optional):
string
-
instance(optional):
string
URI to the link that provides more detail about the error
-
status(optional):
string
HTTP status code
-
title:
string
Summary error message
-
type:
string
Error type
500 Response
object
-
detail(optional):
string
Detailed error message
-
errorCode(optional):
string
Application specific error code
-
errorDetails(optional):
array errorDetails
additional errors
-
errorPath(optional):
string
-
instance(optional):
string
URI to the link that provides more detail about the error
-
status(optional):
string
HTTP status code
-
title:
string
Summary error message
-
type:
string
Error type
Examples
The following example shows how to retrieve the collection of plans available for the {apiID}
API 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/apiplatform/management/v1/apis/{apiId}/entitlements/plans
-
{apiId}
is the unique ID for an API. To retrieve available API IDs, 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/12.2.1.0.0 Date: Mon, 12 Feb 2018 11:56:39 GMT Content-Length: 2235 Content-Type: application/json X-oracle-dms-ecid: a7070a18-e96d-4e69-a511-58eafd07a798-0000cda1 X-oracle-dms-rid: 0 Via: 1.1 otd_opc Proxy-agent: Oracle-Traffic-Director/12.2.1.0.0
Example of Response Body
The following example shows the contents of the response body in JSON format, including the details of the associated plan and API.
{ "offset": 0, "count": 10, "limit": 128, "hasMore": false, "links": [ { "templated": "true", "method": "GET", "rel": "self", "href": "http://example.com/apiplatform/management/v1/apis/100/entitlements/plans?offset=0=128" } ], "items": [ { "createdAt": "2018-02-05T10:27:33-0800", "updatedBy": "admin", "createdBy": "admin", "name": "Free", "description": "Everything is free.", "id": "103", "version": "1.0", "updatedAt": "2018-02-05T11:23:21-0800" }, { "createdAt": "2018-02-05T22:41:48-0800", "updatedBy": "admin", "createdBy": "admin", "name": "myplan", "id": "108", "updatedAt": "2018-02-05T22:41:48-0800" }, { "createdAt": "2018-02-06T00:59:30-0800", "updatedBy": "admin", "createdBy": "admin", "name": "Myplan", "description": "This is my plan", "id": "109", "version": "v1", "updatedAt": "2018-02-06T00:59:30-0800" }, { "createdAt": "2018-02-05T10:27:29-0800", "updatedBy": "admin", "createdBy": "admin", "name": "Real Estate Gold", "description": "Allows for high usage.", "id": "100", "version": "1.0", "updatedAt": "2018-02-05T11:26:42-0800" }, { "createdAt": "2018-02-05T10:27:29-0800", "updatedBy": "admin", "createdBy": "admin", "name": "Weather Gold", "description": "A high usage plan that lets you check the weather as oftern as you want.", "id": "101", "version": "1.0", "updatedAt": "2018-02-05T11:26:07-0800" }, { "createdAt": "2018-02-05T10:27:29-0800", "updatedBy": "admin", "createdBy": "admin", "name": "Energy Supreme", "description": "A plan for intermediate usage.", "id": "102", "version": "1.0", "updatedAt": "2018-02-05T11:24:37-0800" }, { "createdAt": "2018-02-09T17:39:29-0800", "updatedBy": "admin", "createdBy": "admin", "name": "mybasicplan", "id": "116", "updatedAt": "2018-02-09T17:44:54-0800" }, { "createdAt": "2018-02-06T01:05:16-0800", "updatedBy": "admin", "createdBy": "admin", "name": "MyGoldplan", "description": "This is my plan", "id": "112", "version": "v2", "updatedAt": "2018-02-08T00:19:24-0800" }, { "createdAt": "2018-02-12T01:50:35-0800", "updatedBy": "admin", "createdBy": "admin", "name": "Energy", "id": "117", "version": "2.0", "updatedAt": "2018-02-12T01:50:35-0800" }, { "createdAt": "2018-02-05T21:51:34-0800", "updatedBy": "admin", "createdBy": "admin", "name": "Goldplan", "description": "Mygold", "id": "107", "version": "2.0", "updatedAt": "2018-02-05T22:49:37-0800" } ] }