Create subscription
POST/subscriptions
Create subscription.
Request
- application/json
Bodyrequired
kafka://<cluster_name>/<topic_name>
, e.g.kafka://my-cluster/my-topic
service://<service_name>/<service_name>
, e.g.service://Counter/count
sourceSource (string)required
Source uri. Accepted forms:
sinkSink (string)required
Sink uri. Accepted forms:
options objectnullable
Responses
- 201
- 400
- 403
- 404
- 409
- 500
- 503
Created
- application/json
- Schema
- Example (auto)
Schema
idString (string)required
sourcestringrequired
sinkstringrequired
options objectrequired
{
"id": "string",
"source": "string",
"sink": "string",
"options": {}
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://quickstart-update.documentation-beg.pages.dev/subscriptions");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"source\": \"string\",\n \"sink\": \"string\",\n \"options\": {}\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());