Unsupported content This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

JSON patterns for HTTP requests


You need to supply a JSON document in the body of an HTTP request when the requested operation requires input parameters or you want to set values for one or more standard JSON parameters. POST, PUT, and DELETE requests might include a JSON document; GET requests do not include a JSON document.

The JSON patterns for HTTP requests include a set of standard parameters that can appear in POST, PUT, and DELETE requests. The JSON patterns described in this topic build on the first pattern listed, the standard JSON pattern.

Request messages use the following JSON patterns:

Standard JSON pattern

The following shows the general format of the standard JSON pattern. These parameters are not required; supply them in the JSON document only when you want to set values for them.


{
 "timeout": <timeout in seconds>,
 "preCallout": <guid of a callout object>,
 "postCallout": <guid of a callout object>,
 "callbackURL": <URL>
}

Operation request pattern

Operation requests that require input parameters use the objects in the standard JSON pattern plus an additional object, operationParams, which is a wrapper for the input parameters. For information about formatting the operationParams object, see Passing-input-parameters-with-an-API-request. The JSON document for an operation request uses the following pattern:


{
 "timeout": <timeout in seconds>,
 "preCallout": <guid of a callout object>,
 "postCallout": <guid of a callout object>,
 "callbackURL": <URL>,
 "operationParams": [<list of input parameters>]
}

Search request pattern

Search requests use the operation request pattern with an operationParams object that contains a set of parameters that defines the search query. Include only the parameters necessary to define the search query. If you do not need to set any parameters, you can omit the JSON document. The JSON document for a search request uses the following pattern:


{
 "timeout": <timeout in seconds>,
 "preCallout": <guid of a Callout object>,
 "postCallout": <guid of a Callout object>,
 "callbackURL": <URL>,
 "operationParams": [
    {"name": "criteria",
    "type": "com.bmc.model.beans.QueryNode",
    "multiplicity": "0..1",
    "value": <body of search criteria object JSON>
    },
    {"name": "pageSize",
    "type": "java.lang.Integer",
    "multiplicity": "0..1",
    "value": <value for page size>
    },
    {"name": "pageNumber",
    "type": "java.lang.Integer",
    "multiplicity": "0..1",
    "value": <value for page number>
    },
    {"name": "orderBy",
    "type": "java.lang.String",
    "multiplicity": "0..1",
    "value": <name of the class attribute or relation to sort on>
    },
    {"name": "fillFields",
    "type": "java.lang.String",
    "multiplicity": "0..*",
    "value": ["<attribute>, <relation>, ..."]
    },
    {"name": "ignoreFields",
    "type": "java.lang.String",
    "multiplicity": "0..*",
    "value": ["<attribute>, <relation>, ..."]
    },
    {"name": "isOnboarded",
    "type": "java.lang.Boolean",
    "multiplicity": "0..1",
    "value": ["<attribute>, <relation>, ..."]
    },
    {"name": "providerURI",
    "type": "java.lang.String",
    "multiplicity": "0..1",
    "value": ["<URI of a provider"]
    }
  ]
}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*