Resonate API (1.0.0)

Download OpenAPI specification:Download

License: Apache 2.0

Promises

Search promises

query Parameters
id
string

Search promises for matching ids, can include wildcards.

For example:

  • "foo/*" matches all ids starting with "foo/"
  • "*/bar" matches all ids ending with "bar/"
  • "foo/*/bar" matches all ids starting with "foo/" and ending with "/bar"
state
string
Enum: "pending" "resolved" "rejected"

Search promises for matching states

object
limit
integer

Number of results per page

cursor
string

Cursor for pagination

header Parameters
request-id
string

Unique tracking id

Responses

Response samples

Content type
application/json
{
  • "promises": [
    ],
  • "cursor": "string"
}

Create promise

header Parameters
request-id
string

Unique tracking id

idempotency-key
string

Deduplicates requests

strict
boolean

If true, deduplicates only when promise state matches the request

Request Body schema: application/json
required
id
required
string
timeout
required
integer <int64>
object (Value)
object

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "timeout": 0,
  • "param": {
    },
  • "tags": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "PENDING",
  • "timeout": 0,
  • "param": {
    },
  • "value": {
    },
  • "tags": {
    },
  • "idempotencyKeyForCreate": "string",
  • "idempotencyKeyForComplete": "string",
  • "createdOn": 0,
  • "completedOn": 0
}

Create promise and task

header Parameters
request-id
string

Unique tracking id

idempotency-key
string

Deduplicates requests

strict
boolean

If true, deduplicates only when promise state matches the request

Request Body schema: application/json
required
required
object
required
object

Responses

Request samples

Content type
application/json
{
  • "promise": {
    },
  • "task": {
    }
}

Response samples

Content type
application/json
{
  • "promise": {
    }
}

Read promise

path Parameters
id
required
string

The promise id

header Parameters
request-id
string

Unique tracking id

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "PENDING",
  • "timeout": 0,
  • "param": {
    },
  • "value": {
    },
  • "tags": {
    },
  • "idempotencyKeyForCreate": "string",
  • "idempotencyKeyForComplete": "string",
  • "createdOn": 0,
  • "completedOn": 0
}

Complete promise

path Parameters
id
required
string

The promise id

header Parameters
request-id
string

Unique tracking id

idempotency-key
string

Deduplicates requests

strict
boolean

If true, deduplicates only when promise state matches the request

Request Body schema: application/json
required
state
required
string
Enum: "RESOLVED" "REJECTED" "REJECTED_CANCELED"
object (Value)

Responses

Request samples

Content type
application/json
{
  • "state": "RESOLVED",
  • "value": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "PENDING",
  • "timeout": 0,
  • "param": {
    },
  • "value": {
    },
  • "tags": {
    },
  • "idempotencyKeyForCreate": "string",
  • "idempotencyKeyForComplete": "string",
  • "createdOn": 0,
  • "completedOn": 0
}

Callbacks

Create callback

header Parameters
request-id
string

Unique tracking id

Request Body schema: application/json
required
id
required
string
promiseId
required
string
rootPromiseId
required
string
timeout
required
integer <int64>
required
object or string (Recv)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "promiseId": "string",
  • "rootPromiseId": "string",
  • "timeout": 0,
  • "recv": {
    }
}

Response samples

Content type
application/json
{
  • "promise": {
    }
}

Notify

Create a Notification

header Parameters
request-id
string

Unique tracking id

Request Body schema: application/json
required
id
required
string
promiseId
required
string
timeout
required
integer <int64>
required
object or string (Recv)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "promiseId": "string",
  • "timeout": 0,
  • "recv": {
    }
}

Response samples

Content type
application/json
{
  • "promise": {
    }
}

Schedules

Search schedules

query Parameters
id
string

Search schedules for matching ids, can include wildcards.

For example:

  • "foo/*" matches all ids starting with "foo/"
  • "*/bar" matches all ids ending with "bar/"
  • "foo/*/bar" matches all ids starting with "foo/" and ending with "/bar"
object
limit
integer

Number of results

cursor
string

Cursor for pagination

header Parameters
request-id
string

Unique tracking id

Responses

Response samples

Content type
application/json
{
  • "schedules": [
    ],
  • "cursor": "string"
}

Create schedule

header Parameters
request-id
string

Unique tracking id

idempotency-key
string

Deduplicates requests

Request Body schema: application/json
required
id
string
description
string
cron
string
object
promiseId
string
promiseTimeout
integer <int64>
object (Value)
object
idempotencyKey
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "cron": "string",
  • "tags": {
    },
  • "promiseId": "string",
  • "promiseTimeout": 0,
  • "promiseParam": {
    },
  • "promiseTags": {
    },
  • "idempotencyKey": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "cron": "string",
  • "tags": {
    },
  • "promiseId": "string",
  • "promiseTimeout": 0,
  • "promiseParam": {
    },
  • "promiseTags": {
    },
  • "idempotencyKey": "string"
}

Read schedule

path Parameters
id
required
string

The schedule id

header Parameters
request-id
string

Unique tracking id

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "cron": "string",
  • "tags": {
    },
  • "promiseId": "string",
  • "promiseTimeout": 0,
  • "promiseParam": {
    },
  • "promiseTags": {
    },
  • "idempotencyKey": "string",
  • "lastRunTime": 0,
  • "nextRunTime": 0,
  • "createdOn": 0
}

Delete a schedule

path Parameters
id
required
string

The schedule id

header Parameters
request-id
string

Unique tracking id

Responses

Locks

Acquire lock

header Parameters
request-id
string

Unique tracking id

Request Body schema: application/json
required
resourceId
required
string
executionId
required
string
processId
required
string
ttl
required
integer

Responses

Request samples

Content type
application/json
{
  • "resourceId": "string",
  • "executionId": "string",
  • "processId": "string",
  • "ttl": 0
}

Response samples

Content type
application/json
{
  • "resourceId": "string",
  • "executionId": "string",
  • "processId": "string",
  • "ttl": 0,
  • "expiresAt": 0
}

Release lock

header Parameters
request-id
string

Unique tracking id

Request Body schema: application/json
required
resourceId
required
string
executionId
required
string

Responses

Request samples

Content type
application/json
{
  • "resourceId": "string",
  • "executionId": "string"
}

Heartbeat locks

header Parameters
request-id
string

Unique tracking id

Request Body schema: application/json
required
processId
required
string

Responses

Request samples

Content type
application/json
{
  • "processId": "string"
}

Response samples

Content type
application/json
{
  • "locksAffected": 0
}

Tasks

Claim task

header Parameters
request-id
string

Unique tracking id

Request Body schema: application/json
required
id
required
string

The task id

counter
required
integer

The task counter

processId
required
string

Unique process id that identifies the claimer

ttl
required
integer <int64>

Time to live in milliseconds

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "counter": 0,
  • "processId": "string",
  • "ttl": 0
}

Response samples

Content type
application/json
{
  • "type": "invoke",
  • "promises": {
    }
}

Claim task

path Parameters
id
required
string

The task id

counter
required
integer

The task counter

header Parameters
request-id
string

Unique tracking id

Responses

Response samples

Content type
application/json
{
  • "type": "invoke",
  • "promises": {
    }
}

Complete task

Request Body schema: application/json
required
id
required
string

The task id

counter
required
integer

The task counter

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "counter": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "counter": 0,
  • "timeout": 0,
  • "processId": "string",
  • "createdOn": 0,
  • "completedOn": 0
}

Complete task

path Parameters
id
required
string

The task id

counter
required
integer

The task counter

header Parameters
request-id
string

Unique tracking id

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "counter": 0,
  • "timeout": 0,
  • "processId": "string",
  • "createdOn": 0,
  • "completedOn": 0
}

Heartbeat tasks

header Parameters
request-id
string

Unique tracking id

Request Body schema: application/json
required
processId
required
string

Responses

Request samples

Content type
application/json
{
  • "processId": "string"
}

Response samples

Content type
application/json
{
  • "tasksAffected": 0
}

Heartbeat task

path Parameters
id
required
string

The task id

counter
required
integer

The task counter

header Parameters
request-id
string

Unique tracking id

Responses

Response samples

Content type
application/json
{
  • "tasksAffected": 0
}