docs/server/http-api/api.md
The Base URL used in this documentation is <a href="https://kurrent.io">https://kurrent.io</a>, you should replace it with the same url you use to view the administration UI.
Endpoints for Stream operations
<a id="opIdRead a stream"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/streams/{stream}
GET /streams/{stream}
Read a stream
Read a stream, receiving a standard AtomFeed document as a response.
<h3 id="read-a-stream-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream ID |
| embed | query | string | false | none |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdWrite to a stream"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/streams/{stream} \
-H 'Content-Type: application/json' \
-H 'Kurrent-ExpectedVersion: 0' \
-H 'Kurrent-EventType: string' \
-H 'Kurrent-EventId: 0' \
-H 'Kurrent-RequireLeader: true'
POST /streams/{stream}
Append to a stream
Append to a stream.
Body parameter
{
"body": {}
}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The name of the stream |
| Kurrent-ExpectedVersion | header | integer | false | Expected stream version |
| Kurrent-EventType | header | string | false | The event type associated to a posted body |
| Kurrent-EventId | header | GUID | false | Event ID associated to a posted body |
| Kurrent-RequireLeader | header | boolean | false | Wether to run on a leader node |
| body | body | streamData | true | Stream events to create |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | New stream created | None |
| 307 | Temporary Redirect | Temporary Redirect | None |
| 400 | Bad Request | Append request body invalid | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdDelete a stream"></a>
Code samples
# You can also use wget
curl -X DELETE https://kurrent.io/streams/{stream}
DELETE /streams/{stream}
Deletes a stream
Delete specified stream
<h3 id="delete-a-stream-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream ID to delete |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Stream deleted | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdAlternative stream URL"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/streams/{stream}/incoming/{guid}
POST /streams/{stream}/incoming/{guid}
An alternative URL to post events to
A URL generated by KurrentDB if you don't supply an ID when creating a stream. You then post events to this URL.
<h3 id="alternative-stream-url-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The name of the stream |
| guid | path | string | true | Autogenerated UUID |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | New event created | None |
| 400 | Bad Request | Bad request | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdRead stream event"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/streams/{stream}/{event}
GET /streams/{stream}/{event}
Read a stream event
Reads a single event from a stream.
<h3 id="read-stream-event-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream ID |
| event | path | string | true | The event ID |
| embed | query | string | false | none |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet {n} events"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/streams/{stream}/{event}/{count}
GET /streams/{stream}/{event}/{count}
Paginate backwards through stream events
Paginate backwards though stream events by a specified amount.
<h3 id="get-{n}-events-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream ID |
| event | path | string | true | The event ID |
| count | path | integer(int64) | true | How many events to skip backwards from in the request. |
| embed | query | string | false | none |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdPage back through events"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/streams/{stream}/{event}/backward/{count}
GET /streams/{stream}/{event}/backward/{count}
Paginate backwards through stream events
Paginate backwards though stream events by a specified amount.
<h3 id="page-back-through-events-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream ID |
| event | path | string | true | The event ID |
| count | path | integer(int64) | true | How many events to skip backwards from in the request. |
| embed | query | string | false | none |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdPage forward through events"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/streams/{stream}/{event}/forward/{count}
GET /streams/{stream}/{event}/forward/{count}
Paginate forwards through stream events
Paginate forwards though stream events by a specified amount.
<h3 id="page-forward-through-events-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream ID |
| event | path | string | true | The event ID |
| count | path | integer(int64) | true | How many events to skip forwards in the request. |
| embed | query | string | false | none |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdRead stream metadata"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/streams/{stream}/metadata
GET /streams/{stream}/metadata
Reads the metadata of a stream
Returns metadata of a stream, typically information associated with an event that is not part of the event.
<h3 id="read-stream-metadata-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream ID |
| embed | query | string | false | none |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdUpdate stream metadata"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/streams/{stream}/metadata \
-H 'Content-Type: application/json'
POST /streams/{stream}/metadata
Update stream metadata
Update the metadata of a stream.
Body parameter
{
"eventId": "string",
"eventType": "string",
"data": {
"maxAge": 0,
"maxCount": 0,
"truncateBefore": 0,
"cacheControl": "string",
"acl": {
"r": "string",
"w": "string",
"d": "string",
"mr": "string",
"mw": "string"
}
}
}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The name of the stream |
| body | body | StreamMetadataItem | false | Metadata object |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | New stream created | None |
| 400 | Bad Request | Bad request | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet all events"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/streams/$all
GET /streams/$all
Returns all events from all streams
Returns all events from all streams, you must provide user details.
<h3 id="get-all-events-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| embed | query | string | false | none |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
Endpoints for Subscription operations
<a id="opIdGet all subscriptions"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/subscriptions
GET /subscriptions
Get information for all subscriptions
Returns all subscriptions from all streams.
<h3 id="get-all-subscriptions-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | New persistant subscription | None |
| 400 | Bad Request | bad input parameter | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet subscription stream information"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/subscriptions/{stream}
GET /subscriptions/{stream}
Returns information about the subscriptions for a stream
Needed
<h3 id="get-subscription-stream-information-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream name |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet subscription information"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/subscriptions/{stream}/{subscription}/info
GET /subscriptions/{stream}/{subscription}/info
Reads stream information via a persistent subscription
Needed
<h3 id="get-subscription-information-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet a stream"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/subscriptions/{stream}/{subscription}
GET /subscriptions/{stream}/{subscription}
Read a stream
Read a specified stream by a persistent subscription.
<h3 id="get-a-stream-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| embed | query | string | false | Needed |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdUpdate subscription"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/subscriptions/{stream}/{subscription} \
-H 'Content-Type: application/json'
POST /subscriptions/{stream}/{subscription}
Update a persistant subscription
You can edit the settings of an existing subscription while it is running. This will drop the current subscribers and will reset the subscription internally.
Body parameter
{
"minCheckPointCount": 2,
"startFrom": 0,
"ResolveLinkTos": true,
"readBatchSize": 5,
"namedConsumerStrategy": "RoundRobin",
"extraStatistics": true,
"maxRetryCount": 7,
"liveBufferSize": 1,
"messageTimeoutMilliseconds": 3,
"maxCheckPointCount": 2,
"maxSubscriberCount": 9,
"checkPointAfterMilliseconds": 6,
"bufferSize": 5
}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| body | body | SubscriptionItem | false | Subscription to create |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Subscription updated | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdCreate subscription"></a>
Code samples
# You can also use wget
curl -X PUT https://kurrent.io/subscriptions/{stream}/{subscription} \
-H 'Content-Type: application/json'
PUT /subscriptions/{stream}/{subscription}
Create a persistent subscription
Before interacting with a subscription group, you need to create one. You will receive an error if you attempt to create a subscription group more than once. This requires admin permissions.
Body parameter
{
"minCheckPointCount": 2,
"startFrom": 0,
"ResolveLinkTos": true,
"readBatchSize": 5,
"namedConsumerStrategy": "RoundRobin",
"extraStatistics": true,
"maxRetryCount": 7,
"liveBufferSize": 1,
"messageTimeoutMilliseconds": 3,
"maxCheckPointCount": 2,
"maxSubscriberCount": 9,
"checkPointAfterMilliseconds": 6,
"bufferSize": 5
}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| body | body | SubscriptionItem | false | Subscription to create |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Subscription created | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdDelete subscription"></a>
Code samples
# You can also use wget
curl -X DELETE https://kurrent.io/subscriptions/{stream}/{subscription}
DELETE /subscriptions/{stream}/{subscription}
Deletes a subscription
Deletes a subscription
<h3 id="delete-subscription-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet {n} subscription events"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/subscriptions/{stream}/{subscription}/{count}
GET /subscriptions/{stream}/{subscription}/{count}
Reads a stream via a persistent subscription and return a specific number of events
Reads a stream via a persistent subscription and return a specific number of events
<h3 id="get-{n}-subscription-events-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| count | path | integer(int64) | true | How many events to return for the request. |
| embed | query | string | false | none |
| Parameter | Value |
|---|---|
| embed | None |
| embed | Content |
| embed | Rich |
| embed | Body |
| embed | PrettyBody |
| embed | TryHarder |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdAcknowledge a single message"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/subscriptions/{stream}/{subscription}/ack/{messageid}
POST /subscriptions/{stream}/{subscription}/ack/{messageid}
Acknowledge a single message
Clients must acknowledge (or not acknowledge) messages in the competing consumer model. If the client fails to respond in the given timeout period, the message will be retried. You should use the rel links in the feed for acknowledgements not bookmark URIs as they are subject to change in future versions.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| messageid | path | string | true | The id of the message that needs to be acked |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | New persistant subscription | None |
| 400 | Bad Request | bad input parameter | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdAcknowledge multiple messages"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/subscriptions/{stream}/{subscription}/ack
POST /subscriptions/{stream}/{subscription}/ack
Acknowledge multiple messages
Clients must acknowledge (or not acknowledge) messages in the competing consumer model. If the client fails to respond in the given timeout period, the message will be retried. You should use the rel links in the feed for acknowledgements not bookmark URIs as they are subject to change in future versions.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| ids | query | string | false | The ids of the messages that need to be acked separated by commas |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | New persistant subscription | None |
| 400 | Bad Request | bad input parameter | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdDon't acknowledge a single message"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/subscriptions/{stream}/{subscription}/nack/{messageid}
POST /subscriptions/{stream}/{subscription}/nack/{messageid}
Negative acknowledge a single message
Clients must acknowledge (or not acknowledge) messages in the competing consumer model. If the client fails to respond in the given timeout period, the message will be retried. You should use the rel links in the feed for acknowledgements not bookmark URIs as they are subject to change in future versions.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| messageid | path | string | true | The id of the message that needs to be nacked |
| action | query | string | false | <ul><li>Park - Don't retry the message, park it until a request is sent to reply the parked messages</li><li>Retry - Retry the message</li><li>Skip - Discard the message</li><li>Stop - Stop the subscription</li></ul> |
| Parameter | Value |
|---|---|
| action | Park |
| action | Retyr |
| action | Skip |
| action | Stop |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | New persistant subscription | None |
| 400 | Bad Request | bad input parameter | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdDon't acknowledge multiple messages"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/subscriptions/{stream}/{subscription}/nack
POST /subscriptions/{stream}/{subscription}/nack
Negative acknowledge multiple messages
Clients must acknowledge (or not acknowledge) messages in the competing consumer model. If the client fails to respond in the given timeout period, the message will be retried. You should use the rel links in the feed for acknowledgements not bookmark URIs as they are subject to change in future versions.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| ids | query | string | false | The ids of the messages that need to be nacked separated by commas |
| action | query | string | false | <ul><li>Park - Don't retry the message, park it until a request is sent to reply the parked messages</li><li>Retry - Retry the message</li><li>Skip - Discard the message</li><li>Stop - Stop the subscription</li></ul> |
| Parameter | Value |
|---|---|
| action | Park |
| action | Retry |
| action | Skip |
| action | Stop |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | New persistant subscription | None |
| 400 | Bad Request | bad input parameter | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdReplay previously parked messages"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/subscriptions/{stream}/{subscription}/replayParked
POST /subscriptions/{stream}/{subscription}/replayParked
Replay any previously parked messages in a stream
Replay any previously parked messages in a stream that were parked by a negative acknowledgement action.
<h3 id="replay-previously-parked-messages-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| stream | path | string | true | The stream the persistent subscription is on |
| subscription | path | string | true | The name of the subscription group |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
Endpoints for Projection operations
<a id="opIdGet all projections"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projections/any
GET /projections/any
Get all projections
Returns all projections defined in KurrentDB.
<h3 id="get-all-projections-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet all non-transient projections"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projections/all-non-transient
GET /projections/all-non-transient
Get all non-transient projections
Returns all known projections except ad-hoc projections.
<h3 id="get-all-non-transient-projections-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet all queries"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projections/onetime
GET /projections/onetime
Get all queries
Returns all queries defined in KurrentDB.
<h3 id="get-all-queries-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdCreate a onetime projection"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/projections/onetime
POST /projections/onetime
Create a onetime projection
Create a new onetime projection.
<h3 id="create-a-onetime-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | query | string | false | Name of the projection |
| type | query | string | false | The projection type |
| enabled | query | boolean | false | Is the projection enabled |
| checkpoints | query | boolean | false | Are checkpoints enabled |
| emit | query | boolean | false | Is emit enabled |
| trackemittedstreams | query | boolean | false | Should your projection create a separate stream and write any streams it emits to that stream. |
| Parameter | Value |
|---|---|
| type | JS |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | New projection created | None |
| 400 | Bad Request | Bad request | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet all continious projections"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projections/continuous
GET /projections/continuous
Get all continious projections
Returns all continually running projections defined in KurrentDB.
<h3 id="get-all-continious-projections-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdCreate a continious projection"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/projections/continuous
POST /projections/continuous
Create a continious projection
Create a new continious projection.
<h3 id="create-a-continious-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | query | string | false | Name of the projection |
| enabled | query | boolean | false | Is the projection enabled |
| checkpoints | query | boolean | false | Are checkpoints enabled |
| emit | query | boolean | false | Is emit enabled |
| type | query | string | false | The projection type |
| trackemittedstreams | query | boolean | false | Should your projection create a separate stream and write any streams it emits to that stream. |
| Parameter | Value |
|---|---|
| type | JS |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | New projection created | None |
| 400 | Bad Request | Bad request | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdRead projection events based on a query"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/projections/read-events
POST /projections/read-events
Read events from projection based on a query definition
Read events from projection based on a query definition, i.e. fromAll, fromStream, fromStreams
<h3 id="read-projection-events-based-on-a-query-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet all transient projections"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projections/transient
GET /projections/transient
Get all transient projections
Returns all transient projections defined in KurrentDB.
<h3 id="get-all-transient-projections-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdCreate a transient projection"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/projections/transient
POST /projections/transient
Create a transient projection
Create a new transient projection.
<h3 id="create-a-transient-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | query | string | false | Name of the projection |
| type | query | string | false | The projection type |
| enabled | query | boolean | false | Is the projection enabled |
| Parameter | Value |
|---|---|
| type | JS |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | New user created | None |
| 400 | Bad Request | Bad request | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet projection definition"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projection/{name}/query
GET /projection/{name}/query
Get projection definition
Returns definition of the specified projection.
<h3 id="get-projection-definition-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| config | query | boolean | false | Wether to return the projection definition config. |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdUpdate projection definition"></a>
Code samples
# You can also use wget
curl -X PUT https://kurrent.io/projection/{name}/query
PUT /projection/{name}/query
Update projection definition
Update the specified projection definition.
<h3 id="update-projection-definition-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| type | query | string | false | The projection type |
| emit | query | boolean | false | Is emit enabled |
| Parameter | Value |
|---|---|
| type | JS |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet the projection state"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projection/{name}/state
GET /projection/{name}/state
Get the projection state
Return the current state of the specified projection.
<h3 id="get-the-projection-state-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| partition | query | string | false | The partition name in state |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet result of projection"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projection/{name}/result
GET /projection/{name}/result
Get result of projection
Get the final result of a projection.
<h3 id="get-result-of-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| partition | query | string | false | The partition name in state |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet projection statistics"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projection/{name}/statistics
GET /projection/{name}/statistics
Get projection statistics
Returns the statistics for a projection, such as how many events, the status etc.
<h3 id="get-projection-statistics-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdDisable projection"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/projection/{name}/command/disable
POST /projection/{name}/command/disable
Disable projection
Disable the specified projection.
<h3 id="disable-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| enableRunAs | query | boolean | false | Run as the user issuing the command. |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdEnable projection"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/projection/{name}/command/enable
POST /projection/{name}/command/enable
Enable projection
Enable the specified projection.
<h3 id="enable-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| enableRunAs | query | boolean | false | Run as the user issuing the command. |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdReset projection"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/projection/{name}/command/reset
POST /projection/{name}/command/reset
Reset projection
Reset the specified projection.
<h3 id="reset-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| enableRunAs | query | boolean | false | Run as the user issuing the command. |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdAbort projection"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/projection/{name}/command/abort
POST /projection/{name}/command/abort
Abort projection
Abort the specified projection.
<h3 id="abort-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| enableRunAs | query | boolean | false | Run as the user issuing the command. |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet projection config"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projection/{name}/config
GET /projection/{name}/config
Get the config of a projection
Returns the performance configuration of the specified projection.
<h3 id="get-projection-config-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdUpdate projection config"></a>
Code samples
# You can also use wget
curl -X PUT https://kurrent.io/projection/{name}/config
PUT /projection/{name}/config
Update the config of a projection
Update the performance configuration of the specified projection.
<h3 id="update-projection-config-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet a projection"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/projection/{name}
GET /projection/{name}
Get a projection
Returns a specific projection.
<h3 id="get-a-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The name of the projection |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdDelete a projection"></a>
Code samples
# You can also use wget
curl -X DELETE https://kurrent.io/projection/{name}
DELETE /projection/{name}
Deletes a projection
Deletes a projection
<h3 id="delete-a-projection-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | The projection to delete |
| deleteStateStream | query | boolean | false | TBD |
| deleteCheckpointStream | query | boolean | false | TBD |
| deleteEmittedStreams | query | boolean | false | TBD |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Projection deleted | None |
| 401 | Unauthorized | Unauthorized | None |
Endpoints for Admin operations
<a id="opIdShutdown a node"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/admin/shutdown
POST /admin/shutdown
Shutdown a node
Issues a shut down command to a node.
<h3 id="shutdown-a-node-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
Issue a resign command to the Leader node which will explicitly start a round of elections:
curl -X POST -d {} https://{leader_address}:2113/admin/node/resign -u admin:changeit
Note: The resigned leader node automatically has reduced priority in the elections, but it is still possible that the same node will be elected leader again.
<a id="opIdScavenge a node"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/admin/scavenge
POST /admin/scavenge
Scavenge a node
Scavenge reclaims disk space by rewriting database chunks, minus the events to delete, and then deleting the old chunks.
<h3 id="scavenge-a-node-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| startFromChunk | query | integer | false | The chunk ID to start the scavenge operation from. |
| threads | query | integer | false | The number of threads to run the scavenge operation on (max 4). |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdStop a scavenge"></a>
Code samples
# You can also use wget
curl -X DELETE https://kurrent.io/admin/scavenge/{scavengeId}
DELETE /admin/scavenge/{scavengeId}
Stop a scavenge operation
Stop a running scavenge operation.
<h3 id="stop-a-scavenge-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| scavengeId | path | integer | true | The scavenge ID |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdMerge Indexes"></a>
Code samples
# You can also use wget
curl -X POST -d{} https://kurrent.io/admin/mergeindexes
POST /admin/mergeindexes
Merge indexes
Manually merge indexes after a scavenge operation
<h3 id="merge-indexes-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
Endpoints for Info operations
<a id="opIdGet info for node"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/info
GET /info
Get info for node
Returns information about node.
<h3 id="get-info-for-node-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet configuration for node"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/info/options
GET /info/options
Get configuration for node
Returns configuration details about node.
<h3 id="get-configuration-for-node-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 401 | Unauthorized | Unauthorized | None |
Endpoints for User operations
<a id="opIdGet all users"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/users/
GET /users/
Get all users
Returns all users defined in KurrentDB.
<h3 id="get-all-users-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdCreate a user"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/users/ \
-H 'Content-Type: application/json'
POST /users/
Create a User
Create a new user.
Body parameter
{
"LoginName": "admin",
"FullName": "KurrentDB Admin",
"Groups": [
"Admin",
"DataScience"
],
"Password": "aVerySecurePassword"
}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | UserItem | false | User to create |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | New user created | None |
| 400 | Bad Request | Bad request | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet a user"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/users/{login}
GET /users/{login}
Get user
Returns the user currently authenticated with the API, or the user specified.
<h3 id="get-a-user-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| login | path | string | true | The user passed to the API call. |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdUpdate a user"></a>
Code samples
# You can also use wget
curl -X PUT https://kurrent.io/users/{login} \
-H 'Content-Type: application/json'
PUT /users/{login}
Update specified user
Update the FullName of Groups of the specified user.
Body parameter
{
"FullName": "KurrentDB Admin",
"Groups": [
"Admin",
"DataScience"
]
}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| login | path | string | true | The user's name |
| body | body | UserUpdateItem | false | User to update |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdDelete a user"></a>
Code samples
# You can also use wget
curl -X DELETE https://kurrent.io/users/{login}
DELETE /users/{login}
Deletes a user
Delete specified user.
<h3 id="delete-a-user-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| login | path | string | true | The user's name |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | User deleted | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdEnable a user"></a>
Code samples
# You can also use wget
curl -X PUT https://kurrent.io/users/{login}/command/enable
PUT /users/{login}/command/enable
Enable the specified user
Enable the acount of the specified user.
<h3 id="enable-a-user-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| login | path | string | true | The user's name |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdDisable a user"></a>
Code samples
# You can also use wget
curl -X PUT https://kurrent.io/users/{login}/command/disable
PUT /users/{login}/command/disable
Disable the specified user
Disable the acount of the specified user.
<h3 id="disable-a-user-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| login | path | string | true | The user's name |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdReset password"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/users/{login}/command/reset-password \
-H 'Content-Type: application/json'
POST /users/{login}/command/reset-password
Reset user password
Reset the password of the specified user.
Body parameter
{
"NewPassword": "aNewSecurePassword"
}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| login | path | string | true | The user's name |
| body | body | PasswordResetItem | true | The new password for the user |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 400 | Bad Request | Bad request | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdChange password"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/users/{login}/command/change-password \
-H 'Content-Type: application/json'
POST /users/{login}/command/change-password
Change user password
Change the password of the specified user.
Body parameter
{
"CurrentPassword": "anOldSecurePassword",
"NewPassword": "aNewSecurePassword"
}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| login | path | string | true | The user's name |
| body | body | PasswordChangeItem | true | The new password for the user |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 400 | Bad Request | Bad request | None |
| 401 | Unauthorized | Unauthorized | None |
Endpoints for Statistics operations.
<a id="opIdGet all stats"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/stats \
-H 'Accept: application/json'
GET /stats
Get all stats
Returns all stats enabled for KurrentDB.
Example responses
200 Response
{
"proc": {
"startTime": "string",
"id": 0,
"mem": 0,
"cpu": 0,
"cpuScaled": 0,
"threadsCount": 0,
"contentionsRate": 0,
"thrownExceptionsRate": 0,
"gc": {
"allocationSpeed": 0,
"gen0ItemsCount": 0,
"gen0Size": 0,
"gen1ItemsCount": 0,
"gen1Size": 0,
"gen2ItemsCount": 0,
"gen2Size": 0,
"largeHeapSize": 0,
"timeInGc": 0,
"totalBytesInHeaps": 0
},
"diskIo": {
"readBytes": 0,
"writtenBytes": 0,
"readOps": 0,
"writeOps": 0
},
"tcp": {
"connections": 0,
"receivingSpeed": "string",
"sendingSpeed": 0,
"inSend": 0,
"measureTime": 0,
"pendingReceived": 0,
"pendingSend": 0,
"receivedBytesSinceLastRun": 0,
"receivedBytesTotal": 0,
"sentBytesSinceLastRun": 0,
"sentBytesTotal": 0
}
},
"sys": {
"cpu": 0,
"freeMem": 0,
"drive": {
"driveName": {
"availableBytes": 0,
"totalBytes": 0,
"usage": 0,
"usedBytes": 0
}
}
},
"es": {
"checksum": 0,
"checksumNonFlushed": 0,
"queue": {
"queueName": "string",
"groupName": "string",
"avgItemsPerSecond": 0,
"avgProcessingTime": 0,
"currentIdleTime": "string",
"currentItemProcessingTime": "string",
"idleTimePercent": 0,
"length": 0,
"lengthCurrentTryPeak": 0,
"lengthLifetimePeak": 0,
"totalItemsProcessed": 0,
"inProgressMessage": "string",
"lastProcessedMessage": "string"
},
"writer": {
"lastFlushSize": 0,
"lastFlushDelayMs": 0,
"meanFlushSize": 0,
"meanFlushDelayMs": 0,
"maxFlushSize": 0,
"maxFlushDelayMs": 0,
"queuedFlushMessages": 0
},
"readIndex": {
"cachedRecord": 0,
"notCachedRecord": 0,
"cachedStreamInfo": 0,
"notCachedStreamInfo": 0,
"cachedTransInfo": 0,
"notCachedTransInfo": 0,
"hashCollisions": 0
}
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<Stats>
<proc>
<startTime>string</startTime>
<id>0</id>
<mem>0</mem>
<cpu>0</cpu>
<cpuScaled>0</cpuScaled>
<threadsCount>0</threadsCount>
<contentionsRate>0</contentionsRate>
<thrownExceptionsRate>0</thrownExceptionsRate>
<gc>
<allocationSpeed>0</allocationSpeed>
<gen0ItemsCount>0</gen0ItemsCount>
<gen0Size>0</gen0Size>
<gen1ItemsCount>0</gen1ItemsCount>
<gen1Size>0</gen1Size>
<gen2ItemsCount>0</gen2ItemsCount>
<gen2Size>0</gen2Size>
<largeHeapSize>0</largeHeapSize>
<timeInGc>0</timeInGc>
<totalBytesInHeaps>0</totalBytesInHeaps>
</gc>
<diskIo>
<readBytes>0</readBytes>
<writtenBytes>0</writtenBytes>
<readOps>0</readOps>
<writeOps>0</writeOps>
</diskIo>
<tcp>
<connections>0</connections>
<receivingSpeed>string</receivingSpeed>
<sendingSpeed>0</sendingSpeed>
<inSend>0</inSend>
<measureTime>0</measureTime>
<pendingReceived>0</pendingReceived>
<pendingSend>0</pendingSend>
<receivedBytesSinceLastRun>0</receivedBytesSinceLastRun>
<receivedBytesTotal>0</receivedBytesTotal>
<sentBytesSinceLastRun>0</sentBytesSinceLastRun>
<sentBytesTotal>0</sentBytesTotal>
</tcp>
</proc>
<sys>
<cpu>0</cpu>
<freeMem>0</freeMem>
<drive>
<driveName>
<availableBytes>0</availableBytes>
<totalBytes>0</totalBytes>
<usage>0</usage>
<usedBytes>0</usedBytes>
</driveName>
</drive>
</sys>
<es>
<checksum>0</checksum>
<checksumNonFlushed>0</checksumNonFlushed>
<queue>
<queueName>string</queueName>
<groupName>string</groupName>
<avgItemsPerSecond>0</avgItemsPerSecond>
<avgProcessingTime>0</avgProcessingTime>
<currentIdleTime>string</currentIdleTime>
<currentItemProcessingTime>string</currentItemProcessingTime>
<idleTimePercent>0</idleTimePercent>
<length>0</length>
<lengthCurrentTryPeak>0</lengthCurrentTryPeak>
<lengthLifetimePeak>0</lengthLifetimePeak>
<totalItemsProcessed>0</totalItemsProcessed>
<inProgressMessage>string</inProgressMessage>
<lastProcessedMessage>string</lastProcessedMessage>
</queue>
<writer>
<lastFlushSize>0</lastFlushSize>
<lastFlushDelayMs>0</lastFlushDelayMs>
<meanFlushSize>0</meanFlushSize>
<meanFlushDelayMs>0</meanFlushDelayMs>
<maxFlushSize>0</maxFlushSize>
<maxFlushDelayMs>0</maxFlushDelayMs>
<queuedFlushMessages>0</queuedFlushMessages>
</writer>
<readIndex>
<cachedRecord>0</cachedRecord>
<notCachedRecord>0</notCachedRecord>
<cachedStreamInfo>0</cachedStreamInfo>
<notCachedStreamInfo>0</notCachedStreamInfo>
<cachedTransInfo>0</cachedTransInfo>
<notCachedTransInfo>0</notCachedTransInfo>
<hashCollisions>0</hashCollisions>
</readIndex>
</es>
</Stats>
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of stats | Stats |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdGet specified stat"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/stats/{statPath}
GET /stats/{statPath}
Get stats sub path
Returns the sub path of the KurrentDB statistics available.
<h3 id="get-specified-stat-parameters">Parameters</h3>| Name | In | Type | Required | Description |
|---|---|---|---|---|
| statPath | path | string | true | The stats sub path |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
| 401 | Unauthorized | Unauthorized | None |
<a id="opIdReturn Gossip details"></a>
Code samples
# You can also use wget
curl -X GET https://kurrent.io/gossip
GET /gossip
Return Gossip details for cluster
Return Gossip details for nodes in cluster.
<h3 id="return-gossip-details-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
<a id="opIdUpdate Gossip details"></a>
Code samples
# You can also use wget
curl -X POST https://kurrent.io/gossip
POST /gossip
Update Gossip details for cluster
Update Gossip details for nodes in a cluster.
<h3 id="update-gossip-details-responses">Responses</h3>| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | None |
| 404 | Not Found | Not found | None |
<a id="schemauseritem"></a> <a id="schema_UserItem"></a> <a id="tocSuseritem"></a> <a id="tocsuseritem"></a>
{
"LoginName": "admin",
"FullName": "KurrentDB Admin",
"Groups": [
"Admin",
"DataScience"
],
"Password": "aVerySecurePassword"
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| LoginName | string | false | none | The new users login name. |
| FullName | string | false | none | The full name for the new user. |
| Groups | [string] | false | none | The groups the new user is a member of. |
| Password | string | false | none | The password for the new user. |
<a id="schemauserupdateitem"></a> <a id="schema_UserUpdateItem"></a> <a id="tocSuserupdateitem"></a> <a id="tocsuserupdateitem"></a>
{
"FullName": "KurrentDB Admin",
"Groups": [
"Admin",
"DataScience"
]
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| FullName | string | false | none | The full name of the new user. |
| Groups | [string] | false | none | The groups the new user should become a member of. |
<a id="schemapasswordresetitem"></a> <a id="schema_PasswordResetItem"></a> <a id="tocSpasswordresetitem"></a> <a id="tocspasswordresetitem"></a>
{
"NewPassword": "aNewSecurePassword"
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| NewPassword | string | false | none | The new password for the user |
<a id="schemapasswordchangeitem"></a> <a id="schema_PasswordChangeItem"></a> <a id="tocSpasswordchangeitem"></a> <a id="tocspasswordchangeitem"></a>
{
"CurrentPassword": "anOldSecurePassword",
"NewPassword": "aNewSecurePassword"
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| CurrentPassword | string | false | none | The current password for the user |
| NewPassword | string | false | none | The new password for the user |
<a id="schemastreamdata"></a> <a id="schema_streamData"></a> <a id="tocSstreamdata"></a> <a id="tocsstreamdata"></a>
{
"body": {}
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| body | object | true | none | Event data |
<a id="schemastreamitem"></a> <a id="schema_StreamItem"></a> <a id="tocSstreamitem"></a> <a id="tocsstreamitem"></a>
{
"minCheckPointCount": 2,
"startFrom": 0,
"ResolveLinkTos": true,
"readBatchSize": 5,
"namedConsumerStrategy": "RoundRobin",
"extraStatistics": true,
"maxRetryCount": 7,
"liveBufferSize": 1,
"messageTimeoutMilliseconds": 3,
"maxCheckPointCount": 2,
"maxSubscriberCount": 9,
"checkPointAfterMilliseconds": 6,
"bufferSize": 5
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ResolveLinkTos | boolean | false | none | Whether to resolve link events |
| startFrom | integer(int64) | false | none | Which event position in the stream the subscription should start from |
| extraStatistics | boolean | false | none | Whether to track latency statistics on this subscription |
| checkPointAfterMilliseconds | integer(int64) | false | none | The amount of time to try to checkpoint after |
| liveBufferSize | integer(int64) | false | none | The size of the buffer (in-memory) listening to live messages as they happen before paging occurs |
| readBatchSize | integer(int64) | false | none | The number of events to read per batch when reading the history |
| bufferSize | integer(int64) | false | none | The number of events to cache when paging through history |
| maxCheckPointCount | integer(int64) | false | none | The maximum number of messages not checkpointed before forcing a checkpoint |
| maxRetryCount | integer(int64) | false | none | The maximum number of retries (due to timeout) before a message is considered to be parked |
| maxSubscriberCount | integer(int64) | false | none | The maximum number of TCP subscribers allowed |
| messageTimeoutMilliseconds | integer(int64) | false | none | The amount of time after which to consider a message as timedout and retried |
| minCheckPointCount | integer(int64) | false | none | The minimum number of messages to write to a checkpoint |
| namedConsumerStrategy | string | false | none | The strategy to use for distributing events to client consumers |
| Property | Value |
|---|---|
| namedConsumerStrategy | RoundRobin |
| namedConsumerStrategy | DispatchToSingle |
| namedConsumerStrategy | Pinned |
<a id="schemastreammetadataitem"></a> <a id="schema_StreamMetadataItem"></a> <a id="tocSstreammetadataitem"></a> <a id="tocsstreammetadataitem"></a>
{
"eventId": "string",
"eventType": "string",
"data": {
"maxAge": 0,
"maxCount": 0,
"truncateBefore": 0,
"cacheControl": "string",
"acl": {
"r": "string",
"w": "string",
"d": "string",
"mr": "string",
"mw": "string"
}
}
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| eventId | string | false | none | Alphanumeric ID |
| eventType | string | false | none | The type of event |
| data | StreamMetadataItem_data | false | none | none |
<a id="schemasubscriptionitem"></a> <a id="schema_SubscriptionItem"></a> <a id="tocSsubscriptionitem"></a> <a id="tocssubscriptionitem"></a>
{
"minCheckPointCount": 2,
"startFrom": 0,
"ResolveLinkTos": true,
"readBatchSize": 5,
"namedConsumerStrategy": "RoundRobin",
"extraStatistics": true,
"maxRetryCount": 7,
"liveBufferSize": 1,
"messageTimeoutMilliseconds": 3,
"maxCheckPointCount": 2,
"maxSubscriberCount": 9,
"checkPointAfterMilliseconds": 6,
"bufferSize": 5
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ResolveLinkTos | boolean | false | none | Whether to resolve link events |
| startFrom | integer(int64) | false | none | Which event position in the stream the subscription should start from |
| extraStatistics | boolean | false | none | Whether to track latency statistics on this subscription |
| checkPointAfterMilliseconds | integer(int64) | false | none | The amount of time to try to checkpoint after |
| liveBufferSize | integer(int64) | false | none | The size of the buffer (in-memory) listening to live messages as they happen before paging occurs |
| readBatchSize | integer(int64) | false | none | The number of events to read per batch when reading the history |
| bufferSize | integer(int64) | false | none | The number of events to cache when paging through history |
| maxCheckPointCount | integer(int64) | false | none | The maximum number of messages not checkpointed before forcing a checkpoint |
| maxRetryCount | integer(int64) | false | none | The maximum number of retries (due to timeout) before a message is considered to be parked |
| maxSubscriberCount | integer(int64) | false | none | The maximum number of TCP subscribers allowed |
| messageTimeoutMilliseconds | integer(int64) | false | none | The amount of time after which to consider a message as timedout and retried |
| minCheckPointCount | integer(int64) | false | none | The minimum number of messages to write to a checkpoint |
| namedConsumerStrategy | string | false | none | The strategy to use for distributing events to client consumers |
| Property | Value |
|---|---|
| namedConsumerStrategy | RoundRobin |
| namedConsumerStrategy | DispatchToSingle |
| namedConsumerStrategy | Pinned |
<a id="schemastreammetadataitem_data"></a> <a id="schema_StreamMetadataItem_data"></a> <a id="tocSstreammetadataitem_data"></a> <a id="tocsstreammetadataitem_data"></a>
{
"maxAge": 0,
"maxCount": 0,
"truncateBefore": 0,
"cacheControl": "string",
"acl": {
"r": "string",
"w": "string",
"d": "string",
"mr": "string",
"mw": "string"
}
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| maxAge | integer | false | none | The maximum age of events in the stream |
| maxCount | integer | false | none | The maximum count of events in the stream |
| truncateBefore | integer | false | none | Events prior to this event are truncated and removed |
| cacheControl | string | false | none | Period of time to make feed head cacheable |
| acl | object | false | none | Access control list for this stream |
| » r | string | false | none | Read roles |
| » w | string | false | none | Write roles |
| » d | string | false | none | Delete roles |
| » mr | string | false | none | Metadata read roles |
| » mw | string | false | none | Metadata write roles |
<a id="schemastats"></a> <a id="schema_Stats"></a> <a id="tocSstats"></a> <a id="tocsstats"></a>
{
"proc": {
"startTime": "string",
"id": 0,
"mem": 0,
"cpu": 0,
"cpuScaled": 0,
"threadsCount": 0,
"contentionsRate": 0,
"thrownExceptionsRate": 0,
"gc": {
"allocationSpeed": 0,
"gen0ItemsCount": 0,
"gen0Size": 0,
"gen1ItemsCount": 0,
"gen1Size": 0,
"gen2ItemsCount": 0,
"gen2Size": 0,
"largeHeapSize": 0,
"timeInGc": 0,
"totalBytesInHeaps": 0
},
"diskIo": {
"readBytes": 0,
"writtenBytes": 0,
"readOps": 0,
"writeOps": 0
},
"tcp": {
"connections": 0,
"receivingSpeed": "string",
"sendingSpeed": 0,
"inSend": 0,
"measureTime": 0,
"pendingReceived": 0,
"pendingSend": 0,
"receivedBytesSinceLastRun": 0,
"receivedBytesTotal": 0,
"sentBytesSinceLastRun": 0,
"sentBytesTotal": 0
}
},
"sys": {
"cpu": 0,
"freeMem": 0,
"drive": {
"driveName": {
"availableBytes": 0,
"totalBytes": 0,
"usage": 0,
"usedBytes": 0
}
}
},
"es": {
"checksum": 0,
"checksumNonFlushed": 0,
"queue": {
"queueName": "string",
"groupName": "string",
"avgItemsPerSecond": 0,
"avgProcessingTime": 0,
"currentIdleTime": "string",
"currentItemProcessingTime": "string",
"idleTimePercent": 0,
"length": 0,
"lengthCurrentTryPeak": 0,
"lengthLifetimePeak": 0,
"totalItemsProcessed": 0,
"inProgressMessage": "string",
"lastProcessedMessage": "string"
},
"writer": {
"lastFlushSize": 0,
"lastFlushDelayMs": 0,
"meanFlushSize": 0,
"meanFlushDelayMs": 0,
"maxFlushSize": 0,
"maxFlushDelayMs": 0,
"queuedFlushMessages": 0
},
"readIndex": {
"cachedRecord": 0,
"notCachedRecord": 0,
"cachedStreamInfo": 0,
"notCachedStreamInfo": 0,
"cachedTransInfo": 0,
"notCachedTransInfo": 0,
"hashCollisions": 0
}
}
}
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| proc | object | false | none | Stats on the currently active process |
| » startTime | string | false | none | Time the associated process started |
| » id | integer | false | none | Id of the associated process |
| » mem | integer | false | none | Virtual memory used by the associated process |
| » cpu | number | false | none | CPU usage of the process |
| » cpuScaled | number | false | none | CPU usage of the process scaled by logical processor count |
| » threadsCount | integer | false | none | Number of threads used by process |
| » contentionsRate | number | false | none | The rate at which threads in the process attempt to acquire a managed lock unsuccessfully |
| » thrownExceptionsRate | number | false | none | Number of exceptions thrown per second |
| » gc | object | false | none | Stats on garbage collection |
| »» allocationSpeed | number | false | none | Memory allocation speed |
| »» gen0ItemsCount | number | false | none | Number of generation 0 garbage collections |
| »» gen0Size | number | false | none | Generation 0 heap size |
| »» gen1ItemsCount | number | false | none | Number of generation 1 garbage collections |
| »» gen1Size | number | false | none | Generation 1 heap size |
| »» gen2ItemsCount | number | false | none | Number of generation 2 garbage collections |
| »» gen2Size | number | false | none | Generation 2 heap size |
| »» largeHeapSize | number | false | none | Large object heap size |
| »» timeInGc | number | false | none | Percentage of time in garbage collection |
| »» totalBytesInHeaps | number | false | none | Total bytes in all heaps |
| » diskIo | object | false | none | Disk input and output stats |
| »» readBytes | number | false | none | The number of bytes read by KurrentDB since server start |
| »» writtenBytes | number | false | none | The number of bytes written by KurrentDB since server start |
| »» readOps | number | false | none | The number of read operations by KurrentDB since server start |
| »» writeOps | number | false | none | The number of write operations by KurrentDB since server start |
| » tcp | object | false | none | TCP connection stats |
| »» connections | integer | false | none | Number of TCP connections to KurrentDB |
| »» receivingSpeed | string | false | none | Receiving speed in bytes per second |
| »» sendingSpeed | number | false | none | Sending speed in bytes per second |
| »» inSend | number | false | none | Number of bytes sent to connections but not yet acknowledged by the receiving party |
| »» measureTime | number | false | none | Time elapsed since last stats read |
| »» pendingReceived | number | false | none | Number of bytes waiting to be received by connections |
| »» pendingSend | number | false | none | Number of bytes waiting to be sent to connections |
| »» receivedBytesSinceLastRun | number | false | none | Total bytes received by TCP connections since last run |
| »» receivedBytesTotal | number | false | none | Total bytes received by TCP connections |
| »» sentBytesSinceLastRun | number | false | none | Total bytes sent to TCP connections since last run |
| »» sentBytesTotal | number | false | none | Total bytes sent from TCP connections |
| sys | object | false | none | System usage stats |
| » cpu | number | false | none | Total CPU usage in percentage |
| » freeMem | number | false | none | Free memory in bytes |
| » drive | object | false | none | Drive usage stats |
| »» driveName | object | false | none | Drive path |
| »»» availableBytes | number | false | none | Remaining bytes of space available to KurrentDB |
| »»» totalBytes | number | false | none | Total bytes of space available to KurrentDB |
| »»» usage | number | false | none | Percentage usage of space used by KurrentDB |
| »»» usedBytes | number | false | none | Total bytes of space used by KurrentDB |
| es | object | false | none | none |
| » checksum | number | false | none | none |
| » checksumNonFlushed | number | false | none | none |
| » queue | object | false | none | Multiple queue instance stats |
| »» queueName | string | false | none | Queue name |
| »» groupName | string | false | none | Group queue is a member of |
| »» avgItemsPerSecond | integer | false | none | The average number of items processed per second by the queue |
| »» avgProcessingTime | number | false | none | Average number of items processed per second |
| »» currentIdleTime | string | false | none | Time elapsed since queue went idle |
| »» currentItemProcessingTime | string | false | none | Time elapsed processing the current item |
| »» idleTimePercent | number | false | none | Percentage of time queue spent idle |
| »» length | integer | false | none | Number of items in the queue |
| »» lengthCurrentTryPeak | number | false | none | The highest number of items in the queue within the past 100ms |
| »» lengthLifetimePeak | number | false | none | The highest number of items in the queue |
| »» totalItemsProcessed | number | false | none | The total number of items processed by the queue |
| »» inProgressMessage | string | false | none | Current message type queue is processing |
| »» lastProcessedMessage | string | false | none | Last message type processed |
| » writer | object | false | none | Storage writing stats |
| »» lastFlushSize | number | false | none | Last flush size |
| »» lastFlushDelayMs | number | false | none | Last flush delay in ms |
| »» meanFlushSize | number | false | none | Average flush size |
| »» meanFlushDelayMs | number | false | none | Average flush delay in ms |
| »» maxFlushSize | number | false | none | Max flush size |
| »» maxFlushDelayMs | number | false | none | Max flush delay in ms |
| »» queuedFlushMessages | integer | false | none | Queued flush messages |
| » readIndex | object | false | none | none |
| »» cachedRecord | number | false | none | Number of cached record reads |
| »» notCachedRecord | number | false | none | Number of uncached record reads |
| »» cachedStreamInfo | number | false | none | none |
| »» notCachedStreamInfo | number | false | none | none |
| »» cachedTransInfo | number | false | none | none |
| »» notCachedTransInfo | number | false | none | none |
| »» hashCollisions | number | false | none | none |