CICS DA POST discovery requests

You can use the CICS® DA RESTful API to run the discovery function.

Discovery POST request sample

CICS DA provides a Discovery.rexx sample, which you can use as a template to invoke the discovery function.

POST to run the discovery function

You can run the discovery function by using the CICS DA API. The following example shows a POST discovery request:

POST /CICSTopology/v1/discoveries
Host : example.com:port
Content-Type: application/json
Accept : application/json

Where example.com:port is the host address and port number of your CICS DA server.

Important: The CICS DA RESTful API does not require a body element in the discovery POST request. Also, the discovery report is copied to the link that is specified in the location header field of the response.

Output formats

The GET request can return either Extensible Markup Language (XML) or JavaScript Object Notation (JSON). By default, JSON is returned. However, you can request a particular media type by using the HTTP Accept header, as shown in previous examples. The media types that you can use are listed in the following table:
Table 1. Supported output types and HTTP headers
Data output format HTTP header
JSON Accept : application/json
XML Accept : application/xml

Response to a POST discovery request

On the completion of a POST discovery request, the client receives a response from the CICS DA server. The response consists of one or more HTTP headers, such as a description of the content type, and the details about the discovered resources.

For example, the response to the following POST discovery request:
POST /CICSTopology/v1/discoveries
Host : example.com:port
Content-Type: application/json
Accept : application/json
Might return the following response:
HTTP/1.1 201 Created
Content-Type : application/json

{
    "links": [
        {
            "rel": "self",
            "href": "/CICSTopology/v1/discoveries/1447276995115"
        },
        {
            "rel": "tags",
            "href": "/CICSTopology/v1/discoveries/1447276995115/tags"
        }],
            "completion":100,
            "invokedByUser": "abc"
            "startTime":1447276995115,
            "dispayName":1447276995115,
}


api_post_discovery.html | Timestamp icon Last updated: Friday, 11 December 2015