Starting a Transaction

Running a Job

After the job has been created and all the endpoint config is set you can run the job and start a transaction.

You can use the sync-mananger API to start the transaction. You will need the job ID of the job you want to run.

curl --request POST '{{impulse-protocol}}://{{impulse-domain}}:{{impulse-port}}/private/sync-manager/sync/{{job-id}}' \
--header 'Content-Type: application/json' \
--data-raw ''

The response from this endpoint will include the transaction ID. You can save this transaction and use it to track the status of the transaction.

Tracking Transaction Status

To track the status of the transaction you can use a number of endpoints in the sync-manager API.

The most are either the /transaction/{{transaction-id}} or /report endpoints.

Example for /transaction/{{transaction-id}} :

curl --location -g --request GET '{{impulse-protocol}}://{{impulse-domain}}:{{impulse-port}}/private/sync-manager/transactions/{{transaction-id}}?details_limit=10'

The response from this endpoint will provide the details for the transaction, based on the parameter provided as well as if the transaction is active or not. The details can be used to estimate how far along the process is. More information on transaction details can be found in the Transaction Report doc.

Example for /report :

curl --request GET '{{impulse-protocol}}://{{impulse-domain}}:{{impulse-port}}/private/sync-manager/report?start={{startTime}}&end={endTime}}&limit=100&detailLimit=100'

This will provide a report for multiple transactions. You can find your specific transaction by using the start and end times to filter the returned transactions. Then find your specific transaction by matching the transaction id.

Canceling a Job

To cancel a job you can use the /transactions/{{transaction-id}}/cancel endpoint.

curl --location -g --request POST '{{impulse-protocol}}://{{impulse-domain}}:{{impulse-port}}/private/sync-manager/transactions/{{transaction-id}}/cancel' \
--header 'Content-Type: application/json' \
--data-raw ''

This will stop the transaction from continuing further in the process.

Last updated