Registries

Create a registry

POST https://api.borlaug.network/ar/registries

Create a new registry

Headers

Name
Type
Description

BWS-Idempotency-Key

string

An optional header that will be returned with the same value in the response

Content-Type

string

application/json

Authorization

string

The authorization token

Request Body

Name
Type
Description

did

string

DID of registry owner (Hex format)

name

string

Registry name

settings

object

Settings to apply for all assets in this registry

{
    "result": "success",
    "id": "2",
    "timestamp": "2020-04-01T12:39:18.009365600",
    "block": "0x64c3bf6839388fd1e06d6597a7fba278039a760a5a81da83770b3d5479afb169",
    "extrinsic": "0xc5edb3fe4527d971e7adbd6525402029c47d1ff548d3898dd7c2c7ea00d63c33"
}
{
	"name" : "My Collection",
	"did" : "0x3863ca92d8afd54a45547a7c3e840d3dbb626f0d1919001dff328fc868fe4d6e",
	"settings": {
	  "prefix": "ASSET-",
	  "sequence_start": "24"
	}
}

Get a list of Registries

GET https://api.borlaug.network/ar/registries

Headers

Name
Type
Description

Authorization

string

The authorization token

BWS-Idempotency-Key

string

An idempotency key

{
    "registries": [
        {
            "registry_id": 1,
            "name": "Test Registry",
            "settings": {
                "prefix": "ASSET-",
                "sequence_start": 5
            },
            "block": "0x4ba4d1355227cea3d1850860d0834b34afbb11170f0ca712852af48f4d87ae98",
            "extrinsic": "0x40fbd99b5c293be369999c1f450a9411cc541f16508e30f73a54b4ff2e12d86d"
        }
    ]
}

Rename the registry

PATCH https://api.borlaug.network/ar/registries/:registryid

Path Parameters

Name
Type
Description

registryid

string

The id of the registry to update

Headers

Name
Type
Description

Content-Type

string

application/json

BWS-Idempotency-Key

string

Authorization

string

Request Body

Name
Type
Description

settings

string

name

string

{
    "result": "success",
    "message": "Registry Updated",
    "timestamp": "2020-04-01T12:49:26.449112400"
}
{
	"name" : "Test Registry",
	"settings" : {
		"prefix" : "ASSET-",
		"sequence_start" : 8
	}
}

Deletes a registry and all assets in it

DELETE https://api.borlaug.network/ar/registries/:registryid

Path Parameters

Name
Type
Description

registryid

string

The id of the registry to delete

Headers

Name
Type
Description

Content-Type

string

application/json

BWS-Idempotency-Key

string

Authorization

string

Request Body

Name
Type
Description

did

string

Did of registry owner

{
    "result": "success",
    "message": "Registry Deleted",
    "timestamp": "2020-04-01T12:52:12.006750900",
    "block": "0x948f0d09ed2698a681e36fafd63e32facdb45981252440516971f7bcff99f48a",
    "extrinsic": "0x6d53701d06f027cde7b749f8c58fb1c70000d365b2ce924d57495ee6c916acb5"
}
{	
	"did" : "0x3863ca92d8afd54a45547a7c3e840d3dbb626f0d1919001dff328fc868fe4d6e"	
}

Last updated

Was this helpful?