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

Back to top

URL

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

Back to top

Sample Request

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

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.

Back to top

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

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.

Back to top

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).

Back to top

Response

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

Back to top

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/" ]
  } ]
}

Back to top

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

HTTP/1.1 200 OK
Content-Type: application/vnd.soa.v80+xml
Date: Thu, 26 Jul 2018 13:47:22 GMT

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<APIImplementations xmlns="http://soa.com/xsd/api/1.0" xmlns:ns2="http://soa.com/xsd/deploymentzone/1.0" 
xmlns:ns3="http://soa.com/xsd/business/1.0" xmlns:ns4="http://soa.com/xsd/legals/1.0" 
xmlns:ns5="http://soa.com/xsd/dnmodel/1.0" xmlns:ns6="http://soa.com/xsd/resource/1.0">
  <APIImplementation>
    <Name>Swagger_Petstore_v1_Live_Virtual</Name>
    <Description>This is a sample rendition of the Swagger Petstore API.</Description>
    <ServiceKey>uddi:eb9225e0-dfb0-11e5-828e-a8009c36567e</ServiceKey>
    <AccessPoints>http://api11150live.acmepaymentscorp.akana.com:9901/</AccessPoints>
    <AccessPoints>http://api11150live.acmepaymentscorp.akana.com:9902/</AccessPoints>
    <AccessPoints>http://api11150live.acmepaymentscorp.akana.com:9903/</AccessPoints>
  </APIImplementation>
  <APIImplementation>
    <Name>Swagger_Petstore_v1_Sandbox_Virtual</Name>
    <Description>This is a sample rendition of the Swagger Petstore API.</Description>
    <ServiceKey>uddi:f5623459-dfb0-11e5-828e-a8009c36567e</ServiceKey>
    <AccessPoints>http://api11150sandbox.acmepaymentscorp.akana.com:9901/</AccessPoints>
    <AccessPoints>http://api11150sandbox.acmepaymentscorp.akana.com:9902/</AccessPoints>
    <AccessPoints>http://api11150sandbox.acmepaymentscorp.akana.com:9903/</AccessPoints>
  </APIImplementation>
  <APIImplementation>
    <Name>Swagger_Petstore_With_Non_JSON_Extension_File_v1_Live_Virtual</Name>
    <Description>This is a sample rendition of the Swagger Petstore API.</Description>
    <ServiceKey>uddi:ef39f91b-dfb0-11e5-828e-a8009c36567e</ServiceKey>
    <AccessPoints>http://api11153live.acmepaymentscorp.akana.com:9902/</AccessPoints>
    <AccessPoints>http://api11153live.acmepaymentscorp.akana.com:9901/</AccessPoints>
    <AccessPoints>http://api11153live.acmepaymentscorp.akana.com:9903/</AccessPoints>
  </APIImplementation>
</APIImplementations>

Back to top

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

Back to top

Response Body

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

Back to top

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 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.

Back to top

Related Topics