API Transcript example

Example

API transcript example
{
    "executionId": "c287163b-2bdc-4782-9d48-08e6fba689c5",
    "transcript": [
        {
            "type": "api_task_created",
            "executionId": "c287163b-2bdc-4782-9d48-08e6fba689c5",
            "message": {
                "type": "dispatch_api_task",
                "taskId": "api_31708510ced0a56232267d4575064026180118e52c7e9236f366202e14934bd5/1.0.0",
                "executionId": "c287163b-2bdc-4782-9d48-08e6fba689c5",
                "msgHash": "d9f648e930aad474222fc74270a6f5d49f8930466039b0f7acc1033c78d74a9b",
                "signature": {
                    "v": 27,
                    "r": "b3d3729fd664f29af14d5820ddbce23afe9e23134c2c79f987620b1ef6372dde",
                    "s": "798b945ad2b6cbb72d95b32683df406abccff128f78d85e1602d8058978eb0ad"
                },
                "executionTimeout": 10000,
                "ledgerName": "evm",
                "blockHash": "0x86cb327206e8563143f261cb1dd9f9ac6275a5a7b594520a1e17e725ad4e3b4b",
                "blockNumber": 35259754,
                "chainId": "43113",
                "taskRegistryContractAddress": "0x1560bc2c39E71d28CC4A8E0FeCd124d4B3e23Aaf",
                "taskAuthorizationContractAddress": "0x25685b07f914d65d61c171E3dF80b472fFFE615A",
                "taskRequesterAddress": "0xA9fBb882D3b3e5132227290084613Dc021EEF767",
                "taskPath": "/test/pet",
                "taskVersion": 1,
                "senderAddress": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
                "input": {
                    "path": "/store/order",
                    "method": "POST",
                    "body": {
                        "id": 1,
                        "petId": 198772,
                        "quantity": 7,
                        "shipDate": "2077-08-24T14:15:22Z",
                        "status": "approved",
                        "complete": true
                    }
                }
            },
            "msgHash": "79c7764beddcbb3f778b64ac5bbceb859d9eb7d0ed3a7c4cba9b523be93ea8a4",
            "signature": {
                "v": 27,
                "r": "3c5f5a226bd9d24e78d6d8a0de21f0383aa5ec6f912f15d50bd8c03484962bad",
                "s": "635bdd8a8effa6fce32cf973687407d1f86703da5f4bc7ecd3858520894a765e"
            },
            "publicKey": "0423fcbc3763e133bbec077378366887191b9dc7053bea44505ba7df8fa7d571be967f04e5246261884b3737ff94de900bca12aa41367138c033558d36d81b9299",
            "sequencerAddress": "0xE3AcBBB129F14681C315028dB0A156597fb5058B",
            "timestamp": 1723038585615
        },
        {
            "type": "api_outcome",
            "executionId": "c287163b-2bdc-4782-9d48-08e6fba689c5",
            "message": {
                "executionId": "c287163b-2bdc-4782-9d48-08e6fba689c5",
                "senderAddress": "0xE3AcBBB129F14681C315028dB0A156597fb5058B",
                "bodyResponse": {
                    "id": 1,
                    "petId": 198772,
                    "quantity": 7,
                    "shipDate": "2077-08-24T14:15:22.000+0000",
                    "status": "approved",
                    "complete": true
                },
                "msgHash": "b345f75e549d8f2bbd1dc19e0cda5b051fa445a3c001af709a89ad9c234ae29b",
                "signature": {
                    "v": 28,
                    "r": "8d7ba46170c40641bb81268d0bba90eb363d56203a0b1a9f4e411a30561fae8e",
                    "s": "255ae94b05e1b4d3778bcf3ca89b8f42feeef38afa41e57281861e84adaa416b"
                },
                "tlsHandshakeHash": "cc237625ec906d3c13218bfb92fa68ad8ebb0c02f915595a29894603a85de22c",
                "status": "succeed",
                "totalTransferredBytes": {
                    "request": 194,
                    "response": 438
                }
            },
            "msgHash": "5c027624a78fbcc501980e29b829de043e34f8a66082f8c2921e2abb518c89cd",
            "signature": {
                "v": 27,
                "r": "1cc41bd22ebccc6a8e2330fe93fe82129c45ddf8481d06b8ccb0e8964778c0fe",
                "s": "4311929d9ffa973d43ddeeac3ca9a79e908319dde03c0f52ee7f60adc84ad404"
            },
            "sequencerAddress": "0xE3AcBBB129F14681C315028dB0A156597fb5058B",
            "timestamp": 1723038586385
        },
        {
            "type": "execution_completed",
            "executionId": "c287163b-2bdc-4782-9d48-08e6fba689c5",
            "transcriptHash": "132d2ece9d928bd75ead8731c0330ff84972f592710bf879546f0e15c9576d3a",
            "status": "ReadyForInvoice",
            "signature": {
                "v": 28,
                "r": "f8e3b178e23f21cc7889a3ecc1cee43889151d2bac518f418558205b7ae284cc",
                "s": "4e2fa5c0847da6bae77abca31525b798d668394832f91984e9db6f8626d11714"
            },
            "signerAddress": "0xE3AcBBB129F14681C315028dB0A156597fb5058B",
            "timestamp": 1723038586420
        }
    ],
    "timestamp": 1723038599680,
    "msgHash": "2830132a38f429ba34cb2431d1a31e0fa68ae602bdba7a9de6a32fcb39635a23",
    "signature": {
        "v": 27,
        "r": "df564db9c2e0e066f4861f65059aa68689549cbcb34822c14f7415fb15fda45b",
        "s": "3b2d2c7dd2acd7e62cb3c22be2bbde06c36836f950e6ca1c03b857f82ca6a339"
    }
}

Root message

Property
Description
Possible values

executionId

Current execution ID

Text

List of all the messages generated during the API Task execution

timestamp

Transcript query request timestamp. The moment when the task-requester calls the transcript query endpoint.

Number

msgHash

Transcript Hash

Text

signature

query-service signature

v: Text r: Text s: Text

Execution Lifecycle messages

api_task_created

This message is logged into the transcript once the dispatch-service receives a new API task execution request.

Property
Description
Possible values

type

Message type

api_task_created

executionId

Current execution ID

Text

Original message received from the task-requester

msgHash

Current Message Hash

Text

signature

v: Text r: Text s: Text

publickey

Text

sequencerAddress

Text

timestamp

task_created message created timestamp

Number

Task created original Message: dispatch_task

Property
Description
Values

type

Message type

dispatch_api_task

taskId

API Task ID

Text

executionId

Current execution ID

Text

msgHash

Current message Hash

Text

signature

v: Text r: Text s: Text

executionTimeout

number

ledgerName

Current ledger in usage

['avalanche']

blockHash

Current block hash

Text

blockNumber

Current block number

Number

chainId

Unique ID for blockchain identification

Number

taskRegistryContractAddress

Task registration Smart contract Address

Text

taskAuthorizationContractAddress

Task Authorization Contract Address

Text

taskRequesterAddress

Task Requester Address. This address will pay for the task execution

Text

taskPath

Provided path for task execution. It must contain the namespace and taskname

Text

taskVersion

Provided version Task for execution

Number

senderAddress

Text

input

API Task Input parameters

path: Endpoint Path method: {POST, GET} body: Body endpoint values

api_outcome

This message is logged into the transcript once the API-adapter receives the responser from the API provider.

Property
Description
Values

type

Message type

api_outcome

executionId

Current execution ID

Text

Original message received from the api provider

msgHash

Current message Hash

Text

signature

v: Text r: Text s: Text

sequencerAddress

Text

timestamp

Message sent timestamp

Number

api_outcome original Message: api_fetcher_outcome

Property
Description
Values

type

Message type

api_fetcher_outcome

executionId

Current execution ID

Text

senderAddress

Text

bodyResponse

API provider response

Text

msgHash

Current message Hash

Text

signature

v: Text r: Text s: Text

tlsHandshakeHash

TLS handshake information hash

Text

status

API execution status

{Failed, Success, Running}

totalTransferredBytes

Bytes transferred during the API execution.

  • request: Total bytes transferred in the Request

  • response: Total bytes transferred in the Response.

To see the full TLS hasdshake information, execute TBD endpoint with the tldHandshakeHash value

execution_completed

This message is logged into the transcript after the API was executed or a timeout has occurred (whichever happens first).

Property
Description
Values

type

Message type

execution_completed

executionId

Current execution ID

Text

transcriptHash

Text

status

Final execution status

["ReadyForInvoice", "Error"]

errorDetails

Only present if there was an error during the execution.

The details of any error thrown by the protocol or its services

signature

v: Text r: Text s: Text

signerAddress

Text

timestamp

Message sent timestamp

unixTimestamp

execution complete statuses

Status
Description

ReadyForInvoice

The API was executed, so the protocol is ready to process the execution's invoices

Error

There was an error during the API execution. Please check the errorDetails field.

Last updated

Was this helpful?