Generic method responses for IMS

A successful response generates an HTTP status code of 200. Failures produce an appropriate status code and an error message describing the cause of the failure.

File Manager Service Provider generates the following JSON format in response to a successful generic method request for IMS data:

{
    "segments" :
    [
        {
            "last" : boolean,
            "layout" : “string”,
            “segname” : “string”,
            "fields" :
            [
                {
                    “field" : "string",
                    "type" : "string",
                    "dimension" : integer,
                    "value" : "string-number-array-or-null",
                    "error" : "string"
                }
            ]
        }
    ] ,
    "token" : "string"
}

Key fields for a generic method response are explained in the following table:

Key Description
segments An array of 0 or more segments from the IMS data resource.
last If present, is indicates that the segment is last in the IMS resource.
layout The name of the segment layout that was used to map this segment.
segname The name of the IMS database segment.
fields Each segment is represented as an array of 1 or more fields.
field The name of the layout field.
type The File Manager data type of the field. For a list of data types, see Dynamic Template panel.
dimension If the field is an array, the dimension of the array. For example, a value of 2 represents a two-dimensional array.
value The value of the data field. A null value means the value could not be determined.
error Short error text explaining why the field value is null (that is, why the value could not be determined.
token A File Manager session token. A token is returned when a request sets "session" : true and does not also pass a token value. The token represents a File Manager/IMS session running in the z/OS® environment and can be used by subsequent requests when multiple accesses by a client are required.

To end the FM/IMS session, the client must send a request with the token and "session" : false, otherwise the session will eventually time out if inactive.