Skip to main content
POST
/
subscriptions
Create a subscription
import requests

url = "https://{FUSION HOST}/api/subscriptions"

payload = {
    "resource": "<string>",
    "topic": "<string>",
    "numberOfListenerThreads": 123,
    "maxRetries": 123,
    "initialPosition": "<string>",
    "contextProperties": {},
    "id": "<string>"
}
headers = {
    "Authorization": "Basic <encoded-value>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "resource": "<string>",
  "topic": "<string>",
  "numberOfListenerThreads": 123,
  "maxRetries": 123,
  "initialPosition": "<string>",
  "contextProperties": {},
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

context
string

The app to which this object belongs, as app:SomeApp. If the object is not part of this app, the request fails. Other comma-separated contexts in the context parameter are allowed but ignored.

Body

application/json
resource
string
topic
string
numberOfListenerThreads
integer
maxRetries
integer
initialPosition
string
contextProperties
object
id
string

Response

201 - application/json

Created

resource
string
topic
string
numberOfListenerThreads
integer
maxRetries
integer
initialPosition
string
contextProperties
object
id
string