Skip to main content

Smart Contract Registry (0.0.42)

Download OpenAPI specification:Download

Service for Marco Smart Contract Registry

Contract Group

Get the Contract Group instances of a project

Authorizations:
ApplicationToken
query Parameters
project
required
string

The project that you wish to filter by

size
integer <int> [ 5 .. 100 ]
Default: 20

The number of items to return per page

page
integer <int> >= 0
Default: 0

The page number that you want to return

sort
Array of strings
Example: sort=name,name,asc,name,desc

The sort order that you want to return. You can specify one or more comma-separated sort keys, each followed by an optional sort direction of either asc (ascending) or desc (descending).

If you want to sort in descending order, append ,desc to the sort key; otherwise, the default is to sort in ascending order. If you want to sort in ascending order, you can optionally append ,asc.

Examples of valid sort query parameters include:

  • sort=name: Sort by name in ascending order
  • sort=name,desc: Sort by name in descending order
  • sort=name,desc,created,asc: Sort by name in descending order, then by created in ascending order
  • sort=name,desc&sort=created,asc: Sort by name in descending order, then by created in ascending order

Responses

Request samples

curl --request GET \
  --url 'https://api-marco.finboot.com/v1/contract-groups?project=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&sort=SOME_ARRAY_VALUE' \
  --header 'ApplicationToken: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "contentType": "ContractGroupPage"
}

Registers a new Contract Group

Authorizations:
ApplicationToken
Request Body schema: application/json
name
string

Human-readable name of the contract group.

projectId
string

Marco projectId where the contract group will be created.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "projectId": "string"
}

Response samples

Content type
application/json
{
  • "groupId": "string",
  • "name": "string"
}

Get a Contract Group by its ID

Authorizations:
ApplicationToken
path Parameters
contractGroupId
required
string

The ID of the Contract Group that you want to perform actions on

Responses

Request samples

curl --request GET \
  --url https://api-marco.finboot.com/v1/contract-groups/{contractGroupId} \
  --header 'ApplicationToken: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "groupId": "string",
  • "name": "string"
}

Contract

Get the Contract instances of a Contract Group

Authorizations:
ApplicationToken
path Parameters
contractGroupId
required
string

The ID of the Contract Group that you want to perform actions on

query Parameters
size
integer <int> [ 5 .. 100 ]
Default: 20

The number of items to return per page

page
integer <int> >= 0
Default: 0

The page number that you want to return

sort
Array of strings
Example: sort=name,name,asc,name,desc

The sort order that you want to return. You can specify one or more comma-separated sort keys, each followed by an optional sort direction of either asc (ascending) or desc (descending).

If you want to sort in descending order, append ,desc to the sort key; otherwise, the default is to sort in ascending order. If you want to sort in ascending order, you can optionally append ,asc.

Examples of valid sort query parameters include:

  • sort=name: Sort by name in ascending order
  • sort=name,desc: Sort by name in descending order
  • sort=name,desc,created,asc: Sort by name in descending order, then by created in ascending order
  • sort=name,desc&sort=created,asc: Sort by name in descending order, then by created in ascending order

Responses

Request samples

curl --request GET \
  --url 'https://api-marco.finboot.com/v1/contract-groups/{contractGroupId}/instances?size=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&sort=SOME_ARRAY_VALUE' \
  --header 'ApplicationToken: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "contentType": "ContractPage"
}

Get a Smart Contract by its ID

Authorizations:
ApplicationToken
path Parameters
contractGroupId
required
string

The ID of the Contract Group that you want to perform actions on

smartContractId
required
string

The ID of the Smart Contract that you want to perform actions on

Responses

Request samples

curl --request GET \
  --url https://api-marco.finboot.com/v1/contract-groups/{contractGroupId}/instances/{smartContractId} \
  --header 'ApplicationToken: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "contractId": "string",
  • "groupId": "string",
  • "interface": "string",
  • "ledgerReference": {
    },
  • "name": "string"
}

Registers a new instance of a Smart Contract in a Contract Group

Authorizations:
ApplicationToken
Request Body schema: application/json
groupId
string

Unique identifier of the smart contract group where it resides.

interface
string

Interface of the smart contract.

object (LedgerReference)
name
string or null

Human-readable name of the smart contract. Same as contractId if not provided.

Responses

Request samples

Content type
application/json
{
  • "groupId": "string",
  • "interface": "string",
  • "ledgerReference": {
    },
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "contractId": "string",
  • "groupId": "string",
  • "interface": "string",
  • "ledgerReference": {
    },
  • "name": "string"
}