CanisMajor - FIWARE DLT Adaptor (0.0.1)

Download OpenAPI specification:Download

Spec for the CanisMajor DLT adaptor

Ops

Methods to provide some ops-related infos

getHealth

Provide the current health status of CanisMajor.

Responses

Response samples

Content type
application/json
{
  • "status": "UP"
}

NGSI-LD

All supported NGSI-LD endpoints.

createNgsiLDEntity

Entity creation requests.

header Parameters
Link
string

Link header to be used as described in the json-ld spec.

Wallet-Type
string
Value: "vault"

Type of the wallet to be used for signing the transactions.

Wallet-Token
string

Token to be used when contacting the wallet. Type of the token depends on the wallet type.

Wallet-Address
string <url>
Example: http://my-vault.org/v1/ethereum/accounts/bob

Address of the wallet to be used for signing the transactions. If required, it should include path information

Request Body schema:
@context
object (LdContext)
object (GeoProperty)
object (GeoProperty)
object (GeoProperty)
id
string <uri>
type
string (Name) non-empty ^((\d|[a-zA-Z]|_)+(:(\d|[a-zA-Z]|_)+)?(#\d+)?...

NGSI-LD Name

createdAt
string <date-time> (createdAt)
modifiedAt
string <date-time> (modifiedAt)
additional property
Property (object) or Relationship (object) or GeoProperty (object)

Responses

Request samples

Content type
{
  • "@context": { },
  • "location": {
    },
  • "observationSpace": {
    },
  • "operationSpace": {
    },
  • "type": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "modifiedAt": "2019-08-24T14:15:22Z",
  • "property1": {
    },
  • "property2": {
    }
}

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "blockHash": "string",
  • "blockNumber": 0,
  • "cumulativeGasUsed": 0,
  • "gasUsed": 0,
  • "status": "string",
  • "from": "string",
  • "to": "string",
  • "logs": [
    ],
  • "logsBloom": "string",
  • "transactionIndexRaw": "string",
  • "blockNumberRaw": "string",
  • "cumulativeGasUsedRaw": "string",
  • "statusOK": true,
  • "gasUsedRaw": "string",
  • "additionalInformation": { }
}

queryEntities

Retrieve a set of entities which matches a specific query from an NGSI-LD system

query Parameters
id
string

Comma separated list of URIs to be retrieved

idPattern
string <regexp>

Regular expression that must be matched by Entity ids

type
string non-empty

Comma separated list of Entity type names to be retrieved

attrs
string non-empty

Comma separated list of attribute names (properties or relationships) to be retrieved

q
string non-empty

Query

georel
string (georel)

Geo-relationship

geometry
string (geometryEnum)

Geometry

coordinates
string non-empty

Coordinates serialized as a string

geoproperty
string non-empty

The name of the property that contains the geo-spatial data that will be used to resolve the geoquery

csf
string non-empty

Context Source Filter

limit
integer [ 1 .. 100 ]

Pagination limit

offset
integer
Default: 0

Pagination offset

options
string
Enum: "keyValues" "sysAttrs"

Options dictionary

header Parameters
Link
string

Link header to be used as described in the json-ld spec.

Wallet-Type
string
Value: "vault"

Type of the wallet to be used for signing the transactions.

Wallet-Token
string

Token to be used when contacting the wallet. Type of the token depends on the wallet type.

Wallet-Address
string <url>
Example: http://my-vault.org/v1/ethereum/accounts/bob

Address of the wallet to be used for signing the transactions. If required, it should include path information

Related-Entity
string <uri>

ID of an NGSI-LD entity to related the query to, f.e. a user

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "blockHash": "string",
  • "blockNumber": 0,
  • "cumulativeGasUsed": 0,
  • "gasUsed": 0,
  • "status": "string",
  • "from": "string",
  • "to": "string",
  • "logs": [
    ],
  • "logsBloom": "string",
  • "transactionIndexRaw": "string",
  • "blockNumberRaw": "string",
  • "cumulativeGasUsedRaw": "string",
  • "statusOK": true,
  • "gasUsedRaw": "string",
  • "additionalInformation": { }
}

postUpdateNgsiLDEntity

EntityUpdate requests.

path Parameters
entityId
required
string <uri>

ID of an NGSI-LD entity

header Parameters
Link
string

Link header to be used as described in the json-ld spec.

Wallet-Type
string
Value: "vault"

Type of the wallet to be used for signing the transactions.

Wallet-Token
string

Token to be used when contacting the wallet. Type of the token depends on the wallet type.

Wallet-Address
string <url>
Example: http://my-vault.org/v1/ethereum/accounts/bob

Address of the wallet to be used for signing the transactions. If required, it should include path information

Request Body schema:
@context
object (LdContext)
object (GeoProperty)
object (GeoProperty)
object (GeoProperty)
id
string <uri>
type
string (Name) non-empty ^((\d|[a-zA-Z]|_)+(:(\d|[a-zA-Z]|_)+)?(#\d+)?...

NGSI-LD Name

createdAt
string <date-time> (createdAt)
modifiedAt
string <date-time> (modifiedAt)
additional property
Property (object) or Relationship (object) or GeoProperty (object)

Responses

Request samples

Content type
{
  • "@context": { },
  • "location": {
    },
  • "observationSpace": {
    },
  • "operationSpace": {
    },
  • "type": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "modifiedAt": "2019-08-24T14:15:22Z",
  • "property1": {
    },
  • "property2": {
    }
}

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "blockHash": "string",
  • "blockNumber": 0,
  • "cumulativeGasUsed": 0,
  • "gasUsed": 0,
  • "status": "string",
  • "from": "string",
  • "to": "string",
  • "logs": [
    ],
  • "logsBloom": "string",
  • "transactionIndexRaw": "string",
  • "blockNumberRaw": "string",
  • "cumulativeGasUsedRaw": "string",
  • "statusOK": true,
  • "gasUsedRaw": "string",
  • "additionalInformation": { }
}

retrieveEntityById

Retrieve an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters

path Parameters
entityId
required
string <uri>

ID of an NGSI-LD entity

query Parameters
attrs
string non-empty

Comma separated list of attribute names (properties or relationships) to be retrieved

type
string (Name) non-empty ^((\d|[a-zA-Z]|_)+(:(\d|[a-zA-Z]|_)+)?(#\d+)?...

Entity Type

options
string
Enum: "keyValues" "sysAttrs"

Options dictionary

header Parameters
Link
string

Link header to be used as described in the json-ld spec.

Wallet-Type
string
Value: "vault"

Type of the wallet to be used for signing the transactions.

Wallet-Token
string

Token to be used when contacting the wallet. Type of the token depends on the wallet type.

Wallet-Address
string <url>
Example: http://my-vault.org/v1/ethereum/accounts/bob

Address of the wallet to be used for signing the transactions. If required, it should include path information

Responses

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "blockHash": "string",
  • "blockNumber": 0,
  • "cumulativeGasUsed": 0,
  • "gasUsed": 0,
  • "status": "string",
  • "from": "string",
  • "to": "string",
  • "logs": [
    ],
  • "logsBloom": "string",
  • "transactionIndexRaw": "string",
  • "blockNumberRaw": "string",
  • "cumulativeGasUsedRaw": "string",
  • "statusOK": true,
  • "gasUsedRaw": "string",
  • "additionalInformation": { }
}

upsertEntities

Batch updated or replace multiple entities at once.

header Parameters
Wallet-Type
string
Value: "vault"

Type of the wallet to be used for signing the transactions.

Wallet-Token
string

Token to be used when contacting the wallet. Type of the token depends on the wallet type.

Wallet-Address
string <url>
Example: http://my-vault.org/v1/ethereum/accounts/bob

Address of the wallet to be used for signing the transactions. If required, it should include path information

Request Body schema:
Array
@context
object (LdContext)
object (GeoProperty)
object (GeoProperty)
object (GeoProperty)
id
string <uri>
type
string (Name) non-empty ^((\d|[a-zA-Z]|_)+(:(\d|[a-zA-Z]|_)+)?(#\d+)?...

NGSI-LD Name

createdAt
string <date-time> (createdAt)
modifiedAt
string <date-time> (modifiedAt)
additional property
Property (object) or Relationship (object) or GeoProperty (object)

Responses

Request samples

Content type
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "transactionHash": "string",
  • "blockHash": "string",
  • "blockNumber": 0,
  • "cumulativeGasUsed": 0,
  • "gasUsed": 0,
  • "status": "string",
  • "from": "string",
  • "to": "string",
  • "logs": [
    ],
  • "logsBloom": "string",
  • "transactionIndexRaw": "string",
  • "blockNumberRaw": "string",
  • "cumulativeGasUsedRaw": "string",
  • "statusOK": true,
  • "gasUsedRaw": "string",
  • "additionalInformation": { }
}

Entity

Endpoints the get transaction information about entities.

getEntitiesWithTransactions

Get entities where transactions exist.

Responses

Response samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "count": 0,
  • "records": [
    ]
}

getEntityWithTransactions

Get all transactions for a given entity

path Parameters
entityId
required
string <uri>

ID of an NGSI-LD entity

Responses

Response samples

Content type
application/json
{
  • "entityId": "http://example.com",
  • "txDetails": [
    ]
}