Get an API iteration resource
/apiplatform/management/v1/apis/{apiId}/iterations/{iterId}/resources/{pathname}
Returns the resource at {pathname}
for the {iterId}
iteration of the {apiId}
API. API resources are files attached to an API containing overview or documentation text or other files. The {pathname}
is the filename of the resource you want to view. The pathnames of attached resources appear in the artifacts array returned in response from the /apis/{apiId}/iterations/{iterId}
resource.
Users requesting this resource must be assigned the API Manager, Plan Manager, or Gateway Manager role and must be issued the Manage API, View All Details or View Public Details grant for the specified API.
Request
- application/json
-
apiId: string
A unique ID referencing a specific API.
-
iterId: string
A unique ID referencing a specific iteration of an API.
-
pathname: string
The path to the API resource.
Response
- application/json
200 Response
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 resource for a specific iteration of an 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}/iterations/{iterId}/resources/{pathname}
-
{apiId}
is the unique Id for an API. To retrieve available API IDs, see Get APIs. -
{iterId}
is the unique ID for an iteration. To retrieve the iteration Id of an API, see Get API details. -
{pathname}
is the path name of the resource. The path names of attached resources appear in the artifacts array returned in response from Get API iteration details. For example,"artifacts": [ { { "content-type": "text/html; charset=utf-8", "pathname": "api103_overview_htmloverview_bootcamp.htm" } ]
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: Wed, 22 Mar 2017 06:23:18 GMT Content-Length: 1493 Content-Type: text/html;charset=utf-8 X-oracle-dms-ecid: 49d14691-2176-4c99-aed3-38438604f528-00001dcd 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 contents of the api103_overview_htmloverview_bootcamp.htm
file requested in the cURL example.
<div style="width:75%;text-align:justify;font-family:sans-serif"> <div> <h2 style="color:blue">API Overview </h2> <p> This API allows you to interface with our energy company's billing system. Specifically, the API receives a customer number and returns that customer's usage and billing details for the most recent billing cycle. You can also retrieve a usage and billing estimate for the upcoming billing cycle. </p> <h3>Using the API</h3> <div style="background-color:#f8f8f8;padding:10px 35px 10px 35px;width:80%"> <p> After <span style="font-weight:bold">registering</span>, you can access the API by using any client capable of making calls to an HTTP resource. See the documentation tab for detailed information about using this API. </p> <p> To register, first create a record for your application in the developer portal. After you have done this you can register your application to this API. </p> </div> <h3>Terms of Use</h3> <div style="background-color:#f8f8f8;padding:10px 35px 10px 35px;width:80%" > <p> The API requires a <span style="font-weight:bold">application key</span>. Requests without this key in a header or query parameter are automatically rejected. You can find the key on the Application's detail page after you register your application for this API. </p> </div> </div> </div> <p><em>Oracle Confidential. Copyright 2016, Oracle and/or its affiliates. All rights reserved.</em></p>