API (Individual)


Get details of an API
GET https://apis.wso2.com/api/am/store/v0.10/apis/{apiId}

Using this operation, you can retrieve complete details of a single API. You need to provide the Id of the API to retrive it. `X-WSO2-Tenant` header can be used to retrive an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. **NOTE:** * This operation does not require an Authorization header by default. But if it is provided, it will be validated and checked for permissions of the user, hence you may be able to see APIs which are restricted for special permissions/roles. \n

OAuth 2.0 Scope

Not required

Request

GET https://127.0.0.1:9443/api/am/store/v0.10/apis/c43a325c-260b-4302-81cb-768eafaa3aed

Response

HTTP/1.1 200 OK Content-Type: application/json { "thumbnailUrl": null, "tiers": ["Unlimited"], "businessInformation": { "technicalOwner": "John Doe", "technicalOwnerEmail": "architecture@pizzashack.com", "businessOwner": "Jane Roe", "businessOwnerEmail": "marketing@pizzashack.com" }, "apiDefinition": "{\"paths\":{\"/order\":{\"post\":{\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"description\":\"Create a new Order\",\"parameters\":[{\"schema\":{\"$ref\":\"#/definitions/Order\"},\"description\":\"Order object that needs to be added\",\"name\":\"body\",\"required\":true,\"in\":\"body\"}],\"responses\":{\"201\":{\"headers\":{\"Location\":{\"description\":\"The URL of the newly created resource.\",\"type\":\"string\"},\"Content-Type\":{\"description\":\"The content type of the body.\",\"type\":\"string\"}},\"schema\":{\"$ref\":\"#/definitions/Order\"},\"description\":\"Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity.\"}}}},\"/order/{orderId}\":{\"get\":{\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"description\":\"Get details of an Order\",\"parameters\":[{\"description\":\"Order Id\",\"name\":\"orderId\",\"format\":\"integer\",\"type\":\"number\",\"required\":true,\"in\":\"path\"}],\"responses\":{\"200\":{\"schema\":{\"$ref\":\"#/definitions/Order\"},\"headers\":{},\"description\":\"OK Requested Order will be returned\"}}}}},\"schemes\":[\"https\"],\"produces\":[\"application/json\"],\"swagger\":\"2.0\",\"definitions\":{\"Order\":{\"title\":\"Pizza Order\",\"properties\":{\"customerName\":{\"type\":\"string\"},\"delivered\":{\"type\":\"boolean\"},\"address\":{\"type\":\"string\"},\"pizzaType\":{\"type\":\"string\"},\"creditCardNumber\":{\"type\":\"string\"},\"quantity\":{\"type\":\"number\"},\"orderId\":{\"type\":\"integer\"}},\"required\":[\"orderId\"]}},\"consumes\":[\"application/json\"],\"info\":{\"title\":\"PizzaShackAPI\",\"description\":\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\n\",\"license\":{\"name\":\"Apache 2.0\",\"url\":\"http://www.apache.org/licenses/LICENSE-2.0.html\"},\"contact\":{\"email\":\"architecture@pizzashack.com\",\"name\":\"John Doe\",\"url\":\"http://www.pizzashack.com\"},\"version\":\"1.0.0\"}}", "wsdlUri": null, "isDefaultVersion": false, "endpointURLs": [ { "environmentName": "Production and Sandbox", "environmentType": "hybrid", "environmentURLs": { "http": "http://10.100.7.77:8280//pizzashack/1.0.0", "https": "https://10.100.7.77:8243//pizzashack/1.0.0" } }], "transport": [ "http", "https" ], "tags": ["pizza"], "version": "1.0.0", "description": "This document describe a RESTFul API for Pizza Shack online pizza delivery store.\r\n", "provider": "admin", "name": "PizzaShackAPI", "context": "/pizzashack/1.0.0", "id": "8848faaa-7fd1-478a-baa2-48a4ebb92c98", "status": "PUBLISHED" }

Sample CURL

curl https://127.0.0.1:9443/api/am/store/v0.10/apis/c43a325c-260b-4302-81cb-768eafaa3aed

Parameters

Type Name Description Schema Default
Path

apiId

required

**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**.

String

Header

Accept

optional

Media types acceptable for the response. Default is application/json.

String

application/json

Header

If-None-Match

optional

Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec.

String

Header

If-Modified-Since

optional

Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource.

String

Header

X-WSO2-Tenant

optional

For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from.

String

Responses

HTTP Code Description Schema

200

OK. Requested API is returned

API

304

Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future).

404

Not Found. Requested API does not exist.

Error

406

Not Acceptable. The requested media type is not supported

Error

Get swagger definition
GET https://apis.wso2.com/api/am/store/v0.10/apis/{apiId}/swagger

You can use this operation to retrieve the swagger definition of an API. `X-WSO2-Tenant` header can be used to retrive the swagger definition an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. **NOTE:** * This operation does not require an Authorization header by default. But in order to see a restricted API's swagger definition, you need to provide Authorization header.

OAuth 2.0 Scope

Not required

Request

GET https://127.0.0.1:9443/api/am/store/v0.10/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger

Response

HTTP/1.1 200 OK Content-Type: application/json { "paths": {"/*": {"get": { "x-auth-type": "Application", "x-throttling-tier": "Unlimited", "responses": {"200": {"description": "OK"}} }}}, "x-wso2-security": {"apim": {"x-wso2-scopes": []}}, "swagger": "2.0", "info": { "title": "PhoneVerification", "description": "Verify a phone number", "contact": { "email": "xx@ee.com", "name": "xx" }, "version": "2.0.0" } }

Sample CURL

curl https://127.0.0.1:9443/api/am/store/v0.10/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger

Parameters

Type Name Description Schema Default
Path

apiId

required

**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**.

String

Header

Accept

optional

Media types acceptable for the response. Default is application/json.

String

application/json

Header

If-None-Match

optional

Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec.

String

Header

If-Modified-Since

optional

Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource.

String

Header

X-WSO2-Tenant

optional

For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from.

String

Responses

HTTP Code Description Schema

200

OK. Requested swagger document of the API is returned

304

Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future).

404

Not Found. Requested API does not exist.

Error

406

Not Acceptable. The requested media type is not supported

Error

Get thumbnail image
GET https://apis.wso2.com/api/am/store/v0.10/apis/{apiId}/thumbnail

This operation can be used to download a thumbnail image of an API. **NOTE:** * This operation does not require an Authorization header by default. But in order to see a restricted API's thumbnail, you need to provide Authorization header.

OAuth 2.0 Scope

Not required

Request

GET https://127.0.0.1:9443/api/am/store/v0.10/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail

Response

HTTP/1.1 200 OK Content-Type: image/jpeg [image content]

Sample CURL

curl https://127.0.0.1:9443/api/am/store/v0.10/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail > image.jpg

Parameters

Type Name Description Schema Default
Path

apiId

required

**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**.

String

Header

Accept

optional

Media types acceptable for the response. Default is application/json.

String

application/json

Header

If-None-Match

optional

Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec.

String

Header

If-Modified-Since

optional

Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource.

String

Responses

HTTP Code Description Schema

200

OK. Thumbnail image returned

304

Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future).

404

Not Found. Requested Document does not exist.

Error

406

Not Acceptable. The requested media type is not supported

Error