5.2 Posting JSON request for REST services

The following is the procedure to post JSON requests for REST services:

  1. Open the JSON client.
  2. Select or enter Method as POST.
  3. Enter the server URL in Request URL.
  4. Enter the Header parameters as shown in the following table:

    Table 5-1 JSON Request Header Parameters

    No. Header Name Header Value Description
    1 username Enter the user name to login to the server. This value is used for user authentication.
    2 password Enter the password to login to the server. This value is used for user authentication.
    3 content-type Select or enter application/json. This value denotes that the data in JSON format.
    4 accept Select or enter application/json. This value denotes that the data in JSON format
  5. Select application/json for Body content type.
  6. Enter the JSON message in the body. The following code sample is an example:
    {
    "type": "DIM_ACCOUNT",
    "domain": "FRA",
     
    
    "appId": "OFS_IPE",
    "runtype": 1,
    "runParam": 1, "attributes": {
    "Account Skey": 181, "Account Description": "ABC"
    },
    "additionalParams": {}
    }
    
    The following is the convention for the data in the fields of the preceding code sample:
    {
    "type": <ACTIVITY Table>, "domain": <Processing Segment>, "appId": <Product ID>, "runtype": 1,
    "runParam": 1, "attributes":
    {
    <Required attributes/Business Column names of activity table>:
    <Values>
    },
    "additionalParams": {}
    }
    
  7. Send the JSON message from the client to the server. The server provides a response message with values for successful posting or for errors, if any.