Acknowledge project event stream
Required scope: events:listen
Acknowledges every event up to and including sequence on a stream opened with ack=manual. Acknowledgements are cumulative and idempotent. Use the same credential that opened the stream.
curl --request POST \
--url https://api.polymorfa.com/platform/projects/{projectId}/events/stream/{streamId}/ack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cursor": "<string>",
"sequence": 4503599627370496
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cursor: '<string>', sequence: 4503599627370496})
};
fetch('https://api.polymorfa.com/platform/projects/{projectId}/events/stream/{streamId}/ack', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/projects/{projectId}/events/stream/{streamId}/ack"
payload = {
"cursor": "<string>",
"sequence": 4503599627370496
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/projects/{projectId}/events/stream/{streamId}/ack"
payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"sequence\": 4503599627370496\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}false{
"data": {
"streamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"acknowledgedCursor": "<string>",
"sequence": 123,
"replayed": true
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}Authorizations
Send your team API key or project token as Authorization: Bearer <token>. The credential must have the required permissions. Project tokens can access only their own project.
Path Parameters
Identifier of the Polymorfa project that owns this resource.
Value constraints
| Constraint | Accepted input |
|---|---|
| Format | uuid |
Identifier for the stream.
Value constraints
| Constraint | Accepted input |
|---|---|
| Format | uuid |
Body
Specifies cursor for this management platform access event stream ack request.
Value constraints
| Constraint | Accepted input |
|---|---|
| String length | 1 through 4096 characters |
1 - 4096Specifies sequence for this management platform access event stream ack request.
Value constraints
| Constraint | Accepted input |
|---|---|
| Numeric value | 1 through 9007199254740991 (inclusive) |
1 <= x <= 9007199254740991Response
Acknowledged
Structured data carried by this object.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.polymorfa.com/platform/projects/{projectId}/events/stream/{streamId}/ack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cursor": "<string>",
"sequence": 4503599627370496
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cursor: '<string>', sequence: 4503599627370496})
};
fetch('https://api.polymorfa.com/platform/projects/{projectId}/events/stream/{streamId}/ack', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/projects/{projectId}/events/stream/{streamId}/ack"
payload = {
"cursor": "<string>",
"sequence": 4503599627370496
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/projects/{projectId}/events/stream/{streamId}/ack"
payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"sequence\": 4503599627370496\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}false{
"data": {
"streamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"acknowledgedCursor": "<string>",
"sequence": 123,
"replayed": true
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}