GET details of an API

You can use the HTTP method GET to obtain information about a specific IBM® z/OS® Connect API.

zosConnect-2.0 Applies to zosConnect-2.0.

HTTP method
GET
URI
/zosConnect/apis/{APIname}
Description
Gets the details of the requested IBM z/OS Connect API.
Security
Users with Admin, Operations or Reader authority can get details of an API, users with Invoke authority cannot. For more information about user authorization, see Overview of IBM z/OS Connect security.
Return body
{
  "name":"{name}",
  "version":"{version}",
  "description":"{API description}",
  "status": "Started|Stopped",
  "apiUrl":"http(s)://{host}:{port}/{basePath}"
  "documentation": {
    "swagger":"http(s)://{host}:{port}/{basePath}/api-docs"
  },
  "services": [
    {
      "name": "{service name}",
      "uri": "http(s)://{host}:{port}/zosConnect/services/{service name}"
    }
  ]
}
where:
  • apiUrl is the URL you use to invoke the API.
  • swagger contains the URL where the Swagger document for the API can be obtained. For more details see Documenting your API using Swagger
Example body
{
  "name":"HospitalAPI",
  "version":"1.0.0",
  "description":"API for Hospital app",
  "status": "Started",
  "apiUrl":"http://localhost:9080/hospital",
  "documentation": {
    "swagger":"http://localhost:9080/hospital/api-docs"
  },
  "services": [
    {
      "name": "patient",
      "uri": "http://localhost:9080/zosConnect/services/patient"
    }
  ]
}
Errors
The following error can occur:
404 Not found
The API was not found.