Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Specifying a callback URL

...

Include in JSON BODY

Most asynchronous operations support setting callback URLs in the JSON BODY (if they do the documentation will say so). The parameters are:

callbackurl

The callback URL. It may contain query parameters. The URL is called with HTTP POST.

string?, Optional

callback

Permits to specify both a URL and HTTP headers.

  • url : include the URL to be triggered

  • headers : Optional array to set header key and value pairs.

Example:

Code Block
{
  "url": "https://callme.com/trigger?ref=1233",
  "headers": [
    { "key": "auth", "value": "ssjj2" }
  ]
}

object?, Optional

Include as URL query parameter

Alternatively, it is possible to set the callbackurl as a URL query parameter. We recommend against this option unless the method does not allow to include JSON in the body.

In this case make sure to properly URL-Encode the URL:

Code Block
breakoutModewide
../contents/push?callbackurl=http%3A%2F%2Fcallmeback.mycompany.com%3Foperationid%3D22222%26mydata%3Dabcde

Callback execution

When the operation completes with success or failure, the URL is called using HTTP POST and the operation details are included in the JSON body. See Asynchronous operations for the operation result properties.

...