This is a note, hidden until location.search=?notes
Contents:
Click for info. Double-click to run.
Introduction,
Authenticate,
Get Wallets,
Post Wallet,
Get Tokens by Wallet, Get Token by ID, Get Transactions by Token ID,
Transfers Explained, Get Transfers by Wallet, Get Transfer Details by ID, Get Tokens by Transfer,
Post Transfers, Accept Transfer, Decline Transfer, Fulfill Transfer, Delete Transfer,
Trusts Explained,
Get Trusts,
Post Trust Request,
Accept Trust,
Decline Trust,
Delete Trust
API requests need three headers:
- TREETRACKER-API-KEY:<api-key> - Authorization:Bearer <token> - Content-Type:application/json
Every user's first request to the API is Authenticate. That returns a Bearer token good for about one year.
Do not confuse the Bearer <token> with the other use of token in the API.
In all other cases, a token is a data object that describes a tree.
Authenticate
Provide a wallet's name or ID, and its password. Receive a bearer token to go in the header of subsequent API requests. Without the bearer token, requests return 403: ERROR: Authentication, token not verified.
POST /wallet/auth
Request body:
{"wallet": "nameOrID", "password": "string"}
Response:
200: OK {token: string}
Errors:
200: OK: 1.10.3
Use
404: Not Found <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Error</title></head><body><pre>Cannot POST /authnot</pre></body></html>
Post your request to
404: Not Found 404: Could not find entity by wallet name: <name>
Correct the value of
415: Unsupported Media Type 415: Invalid content type. API only supports application/json
Provide the header:
401: Unauthorized 401: Invalid access - no API key 401: Invalid API access
Provide a correct header: 'TREETRACKER-API-KEY:<api-key>'
422: Unprocessable Entity 422: "wallet" is required 422: "password" is required
Provide the request body: {"wallet": "name", "password": "value"}
401: Unauthorized 401: Invalid credentials
Correct the value of
Authorization errors in subsequent requests:
500: Internal Server Error 500: Unknown error (undefined) 403: Forbidden 403: ERROR: Authentication, token not verified
Provide a correct header:
Get Wallets
Get information regarding this session's authenticated wallet and the wallets it manages.
GET /wallet/wallets?limit=n&start=n
limit: Required integer. The maximum number of wallet objects to return.
start: Optional integer, defaults to 1, the beginning. Of the tokens in the wallet, the one to start the list. But the precise order of wallet records is unpredictable.
Response, an array of wallet objects:
200: OK { wallets: [ { id: string, name: string, password: string | null, salt: string | null, logo_url: string |null created_at: date_string tokens_in_wallet: number } ]}
Errors:
422: Unprocessable Entity 422: "limit" is required 422: "limit" must be a number 422: "start" must be a number 422: "start" must be greater than or equal to 1
The path must end with
issue 276 At GET /wallet/wallets?limit=n&start=n GET /wallet/tokens?limit=n&start=n GET /wallet/tokens/<token_id>/transactions?limit=n&start=n GET /wallet/transfers?limit=n&start=n GET /wallet/transfers/<transfer_id>/tokens?limit=n&start=n GET /wallet/trust_relationships?limit=n&start=n ?limit=n&start=n produces unexpected results. Issue 261 replaces "start, defaults to 1" with "offset, defaults to 0" It seems we should also fix limit to mean the maximum number of items to return, not the index of the last item to select from the source array. In other words, replace JavaScript array.slice(start,limit) with array.slice(start,(start+limit)) Why? Because as it works now, limit can be a negative number, which is hard to understand if you don't know the length of the array. And because if start>limit, it returns nothing: ?limit=4&start=5 returns [] And limit < 1 should return the same error as start < 1: 422: "limit" must be greater than or equal to 1.
Post Wallet
Create a new wallet that is managed by this session's authenticated wallet.
POST /wallet/wallets
Request body:
{"wallet": "nameOrID"}
Response:
200: OK {"wallet": "nameOrID"}
Errors:
500: Unknown error (Unexpected token c in JSON at position n)}
Provide valid JSON format in the request body.
400: invalid wallet name:<badname>
What are the rules for wallet names?
403: Forbidden 403: The wallet '<duplicateName>' has been existed
A new wallet name must be unique to Greenstand. We suggest an email address.
issue #266 I think we mean "The wallet <name> already exists"
Get Tokens by Wallet
Get a list of the tokens in this session's authenticated wallet or any wallet it manages.
GET /wallet/tokens?limit=n&start=n&wallet=name
limit: Required integer. The maximum number of tokens to return.
start: Optional integer, defaults to 1, the beginning. Of the tokens in the wallet, the one to start the list. Within a wallet, token number 1 is the one that most recently arrived.
wallet: Optional name or ID, defaults to this session's authenticated wallet.
Response, an array of token objects:
200: OK { tokens: [ { id: uuid, capture_id: uuid, wallet_id: uuid, transfer_pending: boolean, transfer_pending_id: uuid, created_at: date, updated_at: date, origin: null, claim: false, links: {capture: /webmap/tree?uuid=string} } ]}
links.capture: Path to tree data
Errors:
404: Not Found 404: Could not find entity by wallet name: <badName>
The wallet you specified does not exist. See Get Wallets, above, for a list of existing wallets.
422: Unprocessable Entity 422: "wallet" is not allowed to be empty
The path need not include
403: Forbidden 403: Wallet do not belongs to wallet logged in
You can only view tokens in wallets that you manage. See Get Wallets, above, for a list.
issue #267 We mean "Wallet does not belong to...
422: Unprocessable Entity 422: "limit" is required 422: "limit" must be a number 422: "start" must be a number 422: "start" must be greater than or equal to 1
The path must include
Get Token by ID
Get details about one specified token in this session's authenticated wallet or a wallet it manages.
GET /wallet/tokens/<token_id>
<token_id>: Replace with a token ID.
Response, a token object:
200: OK { id: uuid, capture_id: uuid, wallet_id: uuid, transfer_pending: boolean, transfer_pending_id: uuid, created_at: date, updated_at: date, origin: null, claim: false, links: {capture: /webmap/tree?uuid=string} }
links.capture: Path to tree data
Errors:
500: Internal Server Error 500: Unknown error (select * from "token" ... invalid input syntax for type uuid: "<bad_token_id")
Copy the <token_id> accurately. Token IDs comform to the rules of universally unique identifiers (UUIDs): 32 hex digits and 4 hyphens in a specific pattern. Though the request will work if any or all of the hyphens are removed.
404: Not Found 404: can not found token by id:<token_id>
The specified token_id does not exist.
issue #268 We mean "cannot find token...
401: Unauthorized 401: Have no permission to visit this token
You can only read tokens that reside in wallets that you manage.
Get Transactions by Token ID
For a specified token, get a history of all transfers.
GET /wallet/tokens/<token_id>/transactions?limit=n&start=n
Why
<token_id>: Replace with a token ID.
limit: Required integer. The maximum number of transfer objects to return.
start: Optional integer, defaults to 1, the beginning. Of the transfer objects in the wallet, the one to start the list. But the order of transfer records is unpredictable.
How long is history retained? Do records of completed transfers get deleted at some point?
Response, an array of history objects:
200: OK { history: [ { processed_at: date sender_wallet: string receiver_wallet: string } ] }
Errors:
500: Internal Server Error 500: Unknown error (select * from "token" ... invalid input syntax for type uuid: "<bad_token_id")
Copy the <token_id> accurately. Token IDs comform to the rules of universally unique identifiers (UUIDs): 32 hex digits and 4 hyphens in a specific pattern. Though the request will work if any or all of the hyphens are removed.
404: Not Found 404: can not found token by id:<token_id>
The specified token_id does not exist.
issue #268 We mean "cannot find token...
401: Unauthorized 401: Have no permission to visit this token
You can only read the history of tokens that reside in wallets that you manage.
422: Unprocessable Entity 422: "limit" is required 422: "limit" must be a number 422: "start" must be a number 422: "start" must be greater than or equal to 1
The path must include
Transfers Explained
A transfer moves tokens from one wallet to another by a variety of paths. It is easy to confuse them. This section explains the process and terminology.
Post a transfer:
The
Accept or fulfill a transfer:
The
In some cases, the origin and target wallets are
But when the origin and target are relative strangers, the transfer does not complete until the target agrees to it. If the target is the destination, the target posts an
Decline or delete a transfer:
In the event that a target objects to a transfer, the target can post a
The originator may withdraw a request before the target accepts, fulfills, or declines. To do that, the originator sends a
Transfer states:
Every transfer data object includes a
What is
What is
What is
The property transfer.claim is not yet implemented. Right? It's value now is always false? When it is implemented, a POST /wallet/transfers request with claim:true means the tokens cannot be further transferred after the current transfer completes.
Get Transfers by Wallet
For a specified wallet, get a list of the transfers in a specified state. The transfers available are those for which the origin, source, or destination is the currently authenticated wallet or any wallet it manages.
GET /wallet/transfers?limit=n&start=n&wallet=nameOrID&state=value
limit: Required integer. The maximum number of transfer objects to return.
start: Optional integer, defaults to 1, the beginning. Of the transfer objects in the wallet, the one to start the list. But the order of the transfers is unpredictable.
wallet: Optional string or ID, defaults to currently logged-in wallet. List transfers to, from, or requested by this wallet.
state: Optional string, defaults to * (all). Possible values:
Response, an array of transfer objects:
200: OK { transfers: [ { id: transfer_id type: send, deduct, or managed parameters: { tokens: [token_id,token_id,token_id] or bundle: { bundle_size: integer } } state: requested, pending, completed, cancelled, or failed created_at: date closed_at: date active: boolean claim: false originating_wallet: walletNameOrID source_wallet: walletNameOrID destination_wallet: walletNameOrID } ] }
Errors:
422: Unprocessable Entity 422: "state" must be one of [requested, pending, completed, cancelled, failed]
Fix the value of
422: Unprocessable Entity 422: "limit" is required 422: "limit" must be a number 422: "start" must be a number 422: "start" must be greater than or equal to 1
The path must include
404: Not Found 404: Could not find entity by wallet name: <badName>
The wallet you specified does not exist. See Get Wallets, above, for a list of existing wallets.
422: Unprocessable Entity 422: "wallet" is not allowed to be empty
The path need not include
Is this resource working as intended?
It shows me transfers between strangers, transfers that I had nothing to do with.
I log in to PhilNorcross and
Get Transfer Details by ID
Get details for one specific transfer.
GET /wallet/transfers/<transfer_id>
<transfer_id>: Replace with a transfer ID.
Response, a transfer object:
200: OK { id: transfer_id type: send, deduct, or managed parameters: { tokens: [token_id,token_id,token_id] or bundle: { bundle_size: integer } } state: requested, pending, completed, cancelled, or failed created_at: date closed_at: date active: boolean claim: false originating_wallet: walletNameOrID source_wallet: walletNameOrID destination_wallet: walletNameOrID }
Errors:
404: Not Found 404: Can not find this transfer or it is related to this wallet
You can only read details of transfers to or from the wallets you manage.
issue #269 Don't we mean "Cannot find...it is not related to this wallet"?
422: Unprocessable Entity 422: "transfer_id" must be a valid GUID
Copy the <transfer_id> accurately. Transfer IDs comform to the rules of globally unique identifiers (GUIDs): 32 hex digits and 4 hyphens in a specific pattern.
issue #270 Everywhere else we use UUID, not GUID.
At GET token by ID, I can delete the hyphens from the UUID and it still works. Is that OK?
Get Tokens by Transfer
Get tokens by transfer is not yet working?
Get a list of the tokens moved by a given transfer.
GET /wallet/transfers/<transfer_id>/tokens?limit=n&start=n
<transfer_id>: Replace with a transfer ID.
limit: Required integer. The maximum number of tokens to return.
start: Optional integer, defaults to 1, the beginning. Of the tokens in the transfer, the one to start the list. But the precise order of token records is unpredictable.
Response:
500: Internal Server Error { code: 500, message: Unknown error (result is not iterable) }
Post Transfers
Send a request to move tokens from one wallet to another, as allowed by the wallets' trust relationships. Specify tokens by their IDs, or specify a number of tokens.
The session's authenticated wallet makes the request--it is the originating_wallet.
The other party to the request is the requestee or target.
Tokens are debited from from the sender_wallet and credited to the receiver_wallet.
If the wallets share the right trust relationship, transfers take place immediately and automatically. Otherwise, the server stores the request and waits for the requestee to accept or decline it.
POST /wallet/transfers
Request body:
{ "sender_wallet": "nameOrID", "receiver_wallet": "nameOrID", "bundle":{"bundle_size": integer} }
or
{ "sender_wallet": "nameOrID", "receiver_wallet": "nameOrID", "tokens": ["token_id","token_id"] }
Tag selection does not yet work. {"matching_all_tags": ["tag","tag","tag"] }
Response:
201: Created 202: Accepted
Accepted? That's confusing. We still need the destination to POST /wallet/transfers/<transfer_id>/accept. So it's easy to think "It was accepted. Why to we need to accept again?" In the same situation POST /wallet/trust_relationships returns 200: OK. Let's do that here.
Response body, a transfer object:
200: OK { id: transfer_id type: send, deduct, or managed parameters: { tokens: [token_id,token_id,token_id] or bundle: { bundle_size: integer } } state: completed, requested, or pending created_at: date closed_at: date active:true claim:false originating_wallet: walletNameOrID source_wallet: walletNameOrID destination_wallet: walletNameOrID }
Are the timestamps working as intended? I create a pending transfer request, the values created_at and closed_at are identical. Then I accept the transfer, the state changes to completed, but created_at and closed_at do not change. Likewise with trust relationships: created_at and updated_at are identical and never change.
The POST transfer request speaks of "sender_wallet" and "receiver_wallet." A transfer object speaks of "source_wallet" and "destination_wallet." Using two pairs of names for the same pair of roles causes needless confusion, it seems.
I can post a transfer to and from the same wallet. The source = destination, sender = receiver. The response is 201: Created. It seems to me that such a request should return an error.
Errors
404: Not Found 404: Could not find entity by wallet name:<wallet_name> 404: can not found token by id:<token_id>
Fix the wallet names and/or token IDs in the request body.
issue #268 We mean "cannot find token...
403: Forbidden 403: Do not have enough tokens to send
Decrease the value of
403: Forbidden 403: The token <token_id> can not be transfer for some reason, for example, it's been pending for another transfer
Change the list of token IDs in the request body. Or replace the list with bundle: { bundle_size: n }. If you own the token, you can learn what has happened by posting a request to get transactions by token ID. When a transfer request asks you to send tokens, respond by posting a request to fulfill the transfer, not by posting a new transfer.
issue #271 We mean "cannot be transferred"
403: Forbidden 403: The token <token_id> do not belongs to sender wallet
Fix the list of token IDs in the request body.
Or write
issue #272 We mean "The token <token_id> does not belong to...
422: Unprocessable Entity 422:"tokens[n]" contains a duplicate value
Do not list the same token twice in the request body.
422: Unprocessable Entity 422: "bundle.bundle_size" must be a number 422: "bundle.bundle_size" must be greater than or equal to 1
For the value of
Accept Transfer
A destination wallet completes a pending transfer by accepting in-coming tokens.
POST /wallet/transfers/<transfer_id>/accept
<transfer_id>: Replace with a transfer ID.
Response, a transfer object:
200: OK { id: transfer_id type: send, deduct, or managed parameters: { tokens: [token_id,token_id,token_id] or bundle: { bundle_size: integer } } state: completed created_at: date closed_at: date active:true claim:false originating_wallet: walletNameOrID source_wallet: walletNameOrID destination_wallet: walletNameOrID }
Errors:
403: Forbidden 403: Current account has no permission to accept this transfer
Only the target destination can accept a transfer. The originating wallet is not allowed to.
403: Forbidden 403: The transfer state is not pending
The transfer asks the target wallet to send tokens, not receive them.
The transfer state is
Fulfill Transfer
A source wallet completes a requested transfer by sending out-going tokens to their destination.
POST /wallet/transfers/<transfer_id>/fulfill
<transfer_id>: Replace with a transfer ID.
Request body:
{"implicit":true}
{ tokens: [ token_id, token_id, token_id ] }
In my tests, implicit:false gets the same result as implicit:true Nonetheless, implicit must be either true or false, implicit:null returns an error: 422: "implicit" must be a boolean
Response, a transfer object:
200: OK { id: transfer_id type: send, deduct, or managed parameters: { tokens: [token_id,token_id,token_id] or bundle: { bundle_size: integer } } state: completed created_at: date closed_at: date active:true claim:false originating_wallet: walletNameOrID source_wallet: walletNameOrID destination_wallet: walletNameOrID }
Errors:
404: Not Found <!DOCTYPE html><html lang="en">Error ... Cannot POST /transfers/<transfer_id>/fullfill
In the path, spell fulfill with 3 ells, not 4.
403: Forbidden 403: Current account has no permission to fulfill this transfer
The transfer asks the target wallet to receive tokens, not send them.
The transfer state is
403: Forbidden 403: Operation forbidden, the transfer state is wrong
The transfer has already been completed, declined, or cancelled
422: Unprocessable Entity 422: "implicit" is required
Add the missing message body, probably:
issue #273 Implicit is not required. An array of token IDs will also work in some cases. So we might say "A message body is required"
422: Unprocessable Entity 422: "implicit" is not allowed
In the message body, do not write both literal token IDs
and the implicit property. Use one or the other, most likely
403: Forbidden 403: No need to specify tokens
In the message body, write
issue #274 So we mean to say "Must not specify tokens."
404: Not Found 404: can not found token by id:<token_id>
In the message body, revise the list of token IDs, or write
issue #268 We mean "cannot find token...
403: Forbidden 403: Too few tokens to transfer, please provide n tokens for this transfer 403: Too many tokens to transfer, please provide n tokens for this transfer
You provided fewer or more token IDs than the transfer requested in the
500 Internal Server Error 500: Unknown error (... invalid input syntax for type uuid: "$tokenid")
You probably wrote a bad token ID. In the message body, write
Decline Transfer
The target wallet of a transfer--whether its the source or destination--refuses to complete the transfer.
POST /wallet/transfers/<transfer_id>/decline
<transfer_id>: Replace with a transfer ID.
Response, a transfer object:
200: OK { id: transfer_id type: send, deduct, or managed parameters: { tokens: [token_id,token_id,token_id] or bundle: { bundle_size: integer } } state: cancelled created_at: date closed_at: date active:true claim:false originating_wallet: walletNameOrID source_wallet: walletNameOrID destination_wallet: walletNameOrID }
Errors:
403: Forbidden 403: The transfer state is not pending and requested
The transfer has already been either completed, deleted, or declined.
403: Forbidden 403: Current account has no permission to decline this transfer
Only the target wallet can decline a transfer.
The originating wallet can only
404: Not Found 404: Can not found transfer by id:<transfer_id>
Fix the transfer ID in the path.
issue #275 We mean "cannot find transfer...
Delete Transfer
The originator cancels a transfer before target accepts or fulfills it.
The documentation in the *.yaml file for Postman says the "executer" can delete a transfer. The executer of a transfer is the originating wallet. Right?
DELETE /wallet/transfers/<transfer_id>
<transfer_id>: Replace with a transfer ID.
Response, a transfer object:
200: OK { id: transfer_id type: send, deduct, or managed parameters: { tokens: [token_id,token_id,token_id] or bundle: { bundle_size: integer } } state: cancelled created_at: date closed_at: date active:true claim:false originating_wallet: walletNameOrID source_wallet: walletNameOrID destination_wallet: walletNameOrID }
Errors:
403 Forbidden 403:The transfer state is not pending and requested
The transfer has already been either completed, deleted, or declined.
403: Forbidden 403: Current account has no permission to cancel this transfer
Only the originating wallet can delete a transfer. The target wallet can accept, fulfill, or decline.
404: Not Found 404: Can not found transfer by id:<transfer_id>
Fix the transfer ID in the path.
Trust Relationships Explained
A trust relationship allows one wallet to move tokens to or from another without getting permission for each individual transfer. It can let Alice transfer tokens to Bob, for example, without Bob posting his acceptance.
Who Trusts Who?
GET
Request and Accept Trust
To create a trust relationship, the
Once accepted, a trust remains in effect indefinitely, until either party cancels it.
Trust Relationship Roles
Trusts would be easier to understand if requests and objects used the same terms.
And what is the purpose of the "actor_wallet" and the state "cancelled_by_actor"? Will they gain a purpose in the next version, when requests can include "requester_wallet"?
Decline or Delete a Trust
The originator can cancel a trust at any time--before or after acceptance--with a
The requestee can refuse at any time--before or after acceptance--with a
After an accept, then a DELETE, the requestee can accept again and the state becomes "trusted" again. It seems the origin cannot confidently end a trust. Is that as intended?
DELETE & decline both set the state to "cancelled_by_..." It would help users remember who DELETEs and who declines if the resulting states were "declined_by_requestee" and "DELETEd_by_originator" or simply "declined" and "DELETED".
Trust Request Types
Four kinds of trust request allow tokens to move to or from either party, under the control of either party, as follows:
The originating wallet can also transfer the requestee's tokens to itself.
The requestee wallet can also transfer the originator's tokens to itself.
Are request_types manage and yield working as intended? Manage lets me send to the requestee and take (deduct) from the requestee. I can't transfer my tokens some other wallet that the requestee manages. I can't transfer requestee's tokens to some other wallet that the requestee manages.
Posting request_type "deduct" or "release" returns an error:
Origin gets to transfer this way: send: origin's token ---> requestee's wallet deduct: origin's wallet <--- requestee's token manage: both send and deduct Requestee gets to transfer this way: receive: origin's wallet <--- requestee's token release: origin's token ---> requestee's wallet yield: both receive and release
Get Trusts
Get a list of requested, established, and/or cancelled trust relationships related to the currently authorized wallet and any wallets it manages.
GET /wallet/trust_relationships?limit=n&start=n&state=string&request_type=string&type=string
limit: Required integer. The maximum number of trust objects to return.
start: Optional integer, defaults to 1, the beginning. Of the trust objects on the server, the one to start the list. But the precise order of trust records is unpredictable.
state: Optional string:
request_type: Optional string
The originating wallet can also transfer the requestee's tokens to itself.
The requestee wallet can also transfer the originator's tokens to itself.
type: Optional string
Response, an array of trust relationship objects:
200: OK { trust_relationships: [ { id: uuid type: string request_type: string state: string created_at: date updated_at: date orginating_wallet: string actor_wallet: string target_wallet: string } ] }
Errors:
500: Internal Server Error 500: Unknown error (...invalid input value for...trust_state_type: "<value>") 500: Unknown error (...invalid input value for...trust_request_type: "<value>") 500: Unknown error (...invalid input value for...trust_type: "<value>")
In the request path, provide a value for
422: Unprocessable Entity 422: "limit" is required 422: "limit" must be a number 422: "start" must be a number 422: "start" must be greater than or equal to 1
The path must include
Post Trust Request
Request a new trust relationship from another wallet.
POST /wallet/trust_relationships
Request body:
{ "trust_request_type": "string", "requestee_wallet": "nameOrID" }
trust_request_type:
The originating wallet can also transfer the requestee's tokens to itself.
The requestee wallet can also transfer the originator's tokens to itself.
We use
v 0.9 will add: requester_wallet: Optional string. Defaults to currently logged-in wallet
Response, a trust relationship object:
200: OK { id: uuid type: string request_type: string state: requested created_at: date updated_at: date orginating_wallet: <currently logged-in wallet> actor_wallet: string target_wallet: string }
Errors:
403: Forbidden 403: The trust relationship has been requested or trusted
Trust relationship requests cannot be duplicated.
Use
422: Unprocessable Entity 422 "trust_request_type" must be one of [send, receive, manage, yield, deduct, release]
Revise the message body to use a valid request type.
500: Internal Server Error 500: Unknown error (Class constructor HttpError cannot be invoked without 'new')
Request types
404: Not Found 404: Could not find entity by wallet name: <wallet_name>
In the message body, fix the value of
Accept Trust
With the accept message, the requestee allows a trust to take effect. The accept message will re-instate a trust relationship that was previously declined or DELETEd
POST /wallet/trust_relationships/<trust_relationship_id>/accept
<trust_relationship_id>: Replace with a trust relationship ID.
Response, a trust relationship object:
200: OK { id: uuid type: string request_type: string state: trusted created_at: date updated_at: date orginating_wallet: string actor_wallet: string target_wallet: <currently logged-in wallet> }
Errors:
403: Forbidden 403: Have no permission to accept this relationship.
Check the
Decline Trust
With the decline message, the requestee cancels a previously accepted trust relationship, or refuses to let a new one take effect.
POST /wallet/trust_relationships/<trust_relationship_id>/decline
<trust_relationship_id>: Replace with a trust relationship ID.
Response, a trust relationship object:
200: OK { id: uuid type: string request_type: string state: cancelled_by_target created_at: date updated_at: date orginating_wallet: string actor_wallet: string target_wallet: <currently logged-in wallet> }
Errors:
403: Forbidden 403: Have no permission to decline this relationship.
Check the
Delete Trust
With the DELETE message, the originator of a trust relationship cancels it, regardless of whether the requestee has already accepted it.
DELETE /wallet/trust_relationships/<trust_relationship_id>
<trust_relationship_id>: Replace with a trust relationship ID.
Response, a trust relationship object:
200: OK { id: uuid type: string request_type: string state: cancelled_by_originator created_at: date updated_at: date orginating_wallet: <currently logged-in wallet> actor_wallet: string target_wallet: string }
Errors:
404: Not Found 404: Can not found wallet_trust by id:<trust_relationship_id> 500: Internal Server Error 500: Unknown error (...invalid input syntax for type uuid: "<trust_relationship_id>")
In your request path, provide the correct trust ID.
403: Forbidden 403: Have no permission to cancel this relationship
Check the
v. 0.9 adds 1 more resource: GET /events
back-to-top