Connector HTTP API

Authentication#

The connector authenticates through a signed timestamp in the header.

headercontent
X-Attr-TimestampTimestamp in milliseconds. Needs to be not older than 5 minutes compared to connector system time
X-Attr-SignatureSignature of signed timestamp
X-Attr-AccountThe account address which signed the signature

Access levels#

Within the connector we define three levels of access:

levelmethodaccess
nonen/a/unrestricted access
monitorverified by configured monitor addressesread-only access except of config or system information
adminverified by configured account addressread and write access to all api end points

/attrace/v1/status#

Get status of this connector.

Example:

curl -X GET 'https://php-connector.testnet.attrace.com/attrace/v1/status' \
--header 'X-Attr-Timestamp: 1605817125967' \
--header 'X-Attr-Signature: Sx/VFCGojVJQATGaiB1FC+XAur0EUnZ4Q/kEEOHApC++k36RDn4+i1BMuWb6a8PrHKa6MrZxpUBXKZHmsVPfAQ=='

Response:

{
"Account": "AD2KRPJVVYI6NC6ZPYPZ4WWRILHUSXWMQCLXZQUMWOPYPH6OYOLDMC3C",
"StoreType": "mysql",
"SystemTime": 1605816208289,
"Language": "php",
"LanguageVersion": "7.3.11-0ubuntu0.19.10.6",
"Arch": "x64",
"Version": "1.5.2",
"ProtocolMode": "restful"
}

/attrace/v1/account#

Get status of this connector.

Example:

curl -X GET 'https://php-connector.testnet.attrace.com/attrace/v1/account \
--header 'X-Attr-Timestamp: 1605817125967' \
--header 'X-Attr-Signature: Sx/VFCGojVJQATGaiB1FC+XAur0EUnZ4Q/kEEOHApC++k36RDn4+i1BMuWb6a8PrHKa6MrZxpUBXKZHmsVPfAQ=='

Response:

{
"Account": "AD2KRPJVVYI6NC6ZPYPZ4WWRILHUSXWMQCLXZQUMWOPYPH6OYOLDMC3C"
}

/attrace/v1/transactions#

Get status of this connector.

Parameters:

  • From: Timestamp in milliseconds, transactions with a timestamp older than this will be filtered out.
  • To: Timestamp in milliseconds, transactions with a timestamp newer than this will be filtered out.
  • Next: Optional next paging value from previous response
  • Limit: Optional limit, default is 100

Example:

curl -X GET 'https://php-connector.testnet.attrace.com/attrace/v1/transactions \
--header 'X-Attr-Timestamp: 1605817125967' \
--header 'X-Attr-Signature: Sx/VFCGojVJQATGaiB1FC+XAur0EUnZ4Q/kEEOHApC++k36RDn4+i1BMuWb6a8PrHKa6MrZxpUBXKZHmsVPfAQ=='

Response:

{
"Items": [
{
"Id": "17",
"Key": "7GKPH6HDWFD4LJPEBRA6RT46BIW3EPESWIRSIGUNPPOWTAZ5EKIQ",
"Value": "CiD5lPP447FHxaXkDEHoz54KLbI8krIjJBqNe91pgz0ikRIjAPSovTWuEeaL2X4fnlrRQs9JXsyAl3zCjLOfh5/Ow5Y2C2IYpKmvit4uIlcKVTpTEiMEGFlnlsE429M1GBU1v1lmZ6u0pcPNQdg7D9/HUzcVKzp/iiIjAPSovTWuEeaL2X4fnlrRQs9JXsyAl3zCjLOfh5/Ow5Y2C2IyBwoFY2xpY2sqQOiKVSNvmU6tgKITOMKTHVg3BfqRfJu7D4eCynKtmyAR4vPM2gMZ4jZIyVhGgsfNIUm5RCttL6suBwxsmlhDdA9CIwAeqiuTPYqSnSnOyAroE42OPHyRSLqJeSj9ZRzsFlsLdVsc",
"Ts": 1605802644644,
"Retries": 0,
"Synced": 1,
"Error": null,
"Metadata": "{\"meta-key\":\"data\"}"
},
{
"Id": "16",
"Key": "GUH72JLHEZZ77E6ZY4VWQ2JTTY7W6OMC2XKLM23VD7RFT73UCRCQ",
"Value": "CiA1D/0lZyZz/5PZxytoaTOeP285gtXUtmt1H+JZ/3QURRIjAPSovTWuEeaL2X4fnlrRQs9JXsyAl3zCjLOfh5/Ow5Y2C2IYgvKYid4uIlcKVTpTEiMEGFlnlsE429M1GBU1v1lmZ6u0pcPNQdg7D9/HUzcVKzp/iiIjAPSovTWuEeaL2X4fnlrRQs9JXsyAl3zCjLOfh5/Ow5Y2C2IyBwoFY2xpY2sqQIx3jicYtOFd2eCd0N4myHoO2iy5DzA5tYCWWmV5rSYByxcBIw65wLfpB2/9sN/SnZgMcseqp1zWZ1avgCiEQwFCIwAeqiuTPYqSnSnOyAroE42OPHyRSLqJeSj9ZRzsFlsLdVsc",
"Ts": 1605800179970,
"Retries": 0,
"Synced": 1,
"Error": null,
"Metadata": null
}
],
"Next": "3"
}