GET /api/apis/services

Returns a list of valid current services matching the query parameter provided, for selection when creating an API from an existing service.

This operation searches for valid services matching the query parameter, so that one of the services can be selected as the implementation for the API. It is used by the platform portal when adding an API using the Add API with Existing Service option. Note that this operation only returns valid results if the Creation of API with existing service platform setting is enabled in the platform instance. This setting is controlled by the Site Admin.

Authorization Roles/Permissions: Anyone can run this operation, but if the user is not logged in no results are returned. The results returned are dependent on the user's role or roles, and therefore, the user's permission to view the information.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/apis/services?q={value}

Sample Request

The example below shows a search for services with "swagger" as the first few characters.

Sample Request URL

https://{hostname}/api/apis/services?q=swagger

Sample request headers

GET /api/apis/services?q=swagger HTTP/1.1
Host: {hostname}
Accept: application/json
X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

Sample request body

Not applicable.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept

application/json, application/xml

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

application/vnd.soa.v2019+json

Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

Parameter Parm Type Data Type Required Description
q Query string Required The search term used to find a service for selection as the service to use for implementation of the API being added (correct case is not a requirement).

Response

If successful, this operation returns HTTP status code 200, with information about all available services that match the search term.

Sample Response

The sample response below shows successful completion of this operation. There are two matching services.

Sample response headers: application/vnd.soa.v80+json

HTTP/1.1 200 OK
Content-Type: application/vnd.soa.v80+json
Date: Thu, 26 Jul 2018 13:45:53 GMT

Sample response body: application/vnd.soa.v80+json

{
  "APIImplementation" : [ {
    "Name" : "Swagger_Petstore_v1_Live_Virtual",
    "Description" : "This is a sample rendition of the Swagger Petstore API.",
    "ServiceKey" : "uddi:eb9225e0-dfb0-11e5-828e-a8009c36567e",
    "AccessPoints" : [ "http://api11150live.acmepaymentscorp.akana.com:9901/", "http://api11150live.acmepaymentscorp.akana.com:9902/", "http://api11150live.acmepaymentscorp.akana.com:9903/" ]
  }, {
    "Name" : "Swagger_Petstore_v1_Sandbox_Virtual",
    "Description" : "This is a sample rendition of the Swagger Petstore API.",
    "ServiceKey" : "uddi:f5623459-dfb0-11e5-828e-a8009c36567e",
    "AccessPoints" : [ "http://api11150sandbox.acmepaymentscorp.akana.com:9901/", "http://api11150sandbox.acmepaymentscorp.akana.com:9902/", "http://api11150sandbox.acmepaymentscorp.akana.com:9903/" ]
  }, {
    "Name" : "Swagger_Petstore_With_Non_JSON_Extension_File_v1_Live_Virtual",
    "Description" : "This is a sample rendition of the Swagger Petstore API.",
    "ServiceKey" : "uddi:ef39f91b-dfb0-11e5-828e-a8009c36567e",
    "AccessPoints" : [ "http://api11153live.acmepaymentscorp.akana.com:9902/", "http://api11153live.acmepaymentscorp.akana.com:9901/", "http://api11153live.acmepaymentscorp.akana.com:9903/" ]
  } ]
}

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type

application/json, application/xml

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

application/vnd.soa.v2019+json

Response Body

Name Type Description
APIImplementations APIImplementations Contains information about one or more API implementations.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
400 Bad request: Returned if the client sends a malformed request; for example, invalid parameters or body content.For example, you might get this response if you didn't include the required q parameter in the request.
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.