Skip to content

API-spec

Getting started

To run any verifiably API you'll need and API key and the API key id which are accesible with a verifiably account. For any request you need to send both values as headers to get access.

vBuild

The build API is used to generate build for the vFunctions and get information about those builds.

https://vbuild.us-east-2.verifiably.com/

POST /source

Upload a zipfile with the vFunction contents, you will get a s3 presigned url to upload the data.

params

  • 'objectKey' (string) : Name used to save the uploaded file.

example

curl --request POST -H "x-api-key: 0000" -H "x-api-key-id: 0000" 
--data '{"objectKey":"mercuryVFunction.zip"}' "https://vbuild.us-east-2.verifiably.com/source"

After you get the presigned url you can upload the file with the following command.

curl -X PUT -H "Content-type: multipart/form-data" -T merucryVFunction.zip -L "<presigned-url>"

GET /source

Return all the uploaded files

example

curl --request GET -H "x-api-key: 0000" -H "x-api-key-id: 0000" "https://vbuild.us-east-2.verifiably.com/source"

response

json
{
    'ObjectKeys': [string]
}

POST /build

Start the build process for a vFunction.

params

  • 'objectKey' (string): Key of the uploaded vFunction file that will be used for the build process.

  • 'zipSHA' (string): Sha256 value of the file you will use for the vFunction.

  • 'imageSHA' (string): Sha256 value of the docker image used to build the vFunction.

example

curl --request POST -H "x-api-key: 0000" -H "x-api-key-id: 0000" --data '{"objectKey":"mercuryBankExample.zip", "zipSHA":"fc44232101bc852423b366867b5681ddc26355b69408265b3172a37e254ada27", "imageSHA":"sha256:fa2e29e8a43bcfa49cd3b6255531bbdc4abed7b8cc68b244b988510c8ec636ed"}' "https://vbuild.us-east-2.verifiably.com/build"

response

json
{
    'build_id': string
}

GET /build

List all the builds and their statuses.

example

curl --request GET -H "x-api-key: 0000" -H "x-api-key-id: 0000" "https://vbuild.us-east-2.verifiably.com/build"

GET /build/

Get the status for a specific build.

example

curl --request GET -H "x-api-key: 0000" -H "x-api-key-id: 0000" "https://vbuild.us-east-2.verifiably.com/build/{build_id}"

GET /pcr/

Get the file with the pcr information for a successful build.

example

curl --request GET -H "x-api-key: 0000" -H "x-api-key-id: 0000" "https://vbuild.us-east-2.verifiably.com/pcr/{build_id}"

vFunction

This Api is used to execute vFunctions and check their statuses.

"https://vfunctions.us-east-2.verifiably.com"

POST /execution

Execute a built vFunction.

params

  • 'build_id' (string): The build id of the vFunction to execute.
  • 'params' (dictionary): The parameters that will be passed to the vFunction.

example

curl --request POST -H "x-api-key: 0000" -H "x-api-key-id: 0000" --data 
'{"build_id":"{build_id}", "params": 
{"email":"santiagopassosp@gmail.com", "balance_threshold":"15", "wSockConnectionId":"<wSockConnectionId>"}}' "https://vfunctions.us-east-2.verifiably.com/execution"

response

json
{
    'exectionId': string
}

GET /execution/

Get the execution status for a vFunction.

example

curl --request GET -H "x-api-key: 0000" -H "x-api-key-id: 0000" "https://vfunctions.us-east-2.verifiably.com/execution/{execution_id}"

Verifiably Documentation