-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest-examples.http
139 lines (130 loc) · 6.16 KB
/
rest-examples.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
### BALANCES
### get balances default
GET http://localhost:8080/api/v1/balances
Accept: application/json
### get balances for account 5
GET http://localhost:8080/api/v1/balances?account.id=5
Accept: application/json
### get balances for account 0.0.5
GET http://localhost:8080/api/v1/balances?account.id=0.0.5
Accept: application/json
### get balances for account > 10,000
GET http://localhost:8080/api/v1/balances?account.id=gt:0.0.10000&limit=100
Accept: application/json
### get balances for account > 700,000
GET http://localhost:8080/api/v1/balances?account.id=gt:0.0.700000&limit=100
Accept: application/json
### BLOCKS
### get blocks default
GET http://localhost:8080/api/v1/blocks
Accept: application/json
### get block 125
GET http://localhost:8080/api/v1/blocks?block.number=125
Accept: application/json
### get block > 1000
GET http://localhost:8080/api/v1/blocks?block.number=gt:1000
Accept: application/json
### get blocks desc order
GET http://localhost:8080/api/v1/blocks?order=desc
Accept: application/json
### get blocks desc order limit 5
GET http://localhost:8080/api/v1/blocks?order=desc&limit=5
Accept: application/json
### TOKENS
### get tokens default
GET http://localhost:8080/api/v1/tokens
Accept: application/json
### get token public key 9e3359cb5a484e7dd942559b50fda3da70cda4935e7e12cfd56d5dc5c67f96d7
GET http://localhost:8080/api/v1/tokens?publickey=9e3359cb5a484e7dd942559b50fda3da70cda4935e7e12cfd56d5dc5c67f96d7
Accept: application/json
### get token entity 107594 (this returns two elements)
GET http://localhost:8080/api/v1/tokens?token.id=107594
Accept: application/json
### get token > 1000
GET http://localhost:8080/api/v1/tokens?token.id=gt:1000
### get only fungible tokens
GET http://localhost:8080/api/v1/tokens?type=FUNGIBLE_COMMON
Accept: application/json
### get only non-fungible tokens
GET http://localhost:8080/api/v1/tokens?type=NON_FUNGIBLE_UNIQUE
Accept: application/json
### get all types of tokens
GET http://localhost:8080/api/v1/tokens?type=ALL
Accept: application/json
### get tokens from (autoRenew) Account id 950
GET http://localhost:8080/api/v1/tokens?account.id=950
Accept: application/json
### get tokens desc order
GET http://localhost:8080/api/v1/tokens?order=desc
Accept: application/json
### get tokens desc order limit 5
GET http://localhost:8080/api/v1/tokens?order=desc&limit=5
Accept: application/json
###
### getTokenById not specifying a timestamp
GET http://localhost:8080/api/v1/tokens/107594
### getTokenById specifying a timestamp
GET http://localhost:8080/api/v1/tokens/107594?timestamp=1610640452612903002
### getTokenById specifying an earlier timestamp
GET http://localhost:8080/api/v1/tokens/107594?timestamp=1610640421985772001
### getTokenById specifying an earlier timestamp than the passed-in one
GET http://localhost:8080/api/v1/tokens/107594?timestamp=lt:1610640452612903002
###
### listTokenBalancesById specifying only a token id
GET http://localhost:8080/api/v1/tokens/629591/balances?limit=99
### listTokenBalancesById specifying a token id and an account id
GET http://localhost:8080/api/v1/tokens/629591/balances?account.id=644972
### listTokenBalancesById specifying a token id and a range of account ids
GET http://localhost:8080/api/v1/tokens/629591/balances?account.id=gt:644000&account.id=lt:644999&limit=1000
### listTokenBalancesById specifying a token id and a range of account ids, sorted in descending order
GET http://localhost:8080/api/v1/tokens/629591/balances?account.id=gt:644000&account.id=lt:644999&limit=1000&order=desc
### listTokenBalancesById specifying a token id and an account id and a particular balance amount
GET http://localhost:8080/api/v1/tokens/629591/balances?account.id=644972&account.balance=500000000
### listTokenBalancesById specifying a token id and an account id and a particular timestamp -- not yet working
GET http://localhost:8080/api/v1/tokens/629591/balances?account.id=644972×tamp=1644887406787336960
###
### listNfts specifying only a token id
GET http://localhost:8080/api/v1/tokens/1066828/nfts?limit=99
### listNfts specifying a token id and an account id
GET http://localhost:8080/api/v1/tokens/1066828/nfts?account.id=0
### listNfts specifying a token id and a range of account ids
GET http://localhost:8080/api/v1/tokens/1066828/nfts?account.id=gte:0&account.id=lt:9&limit=1000
### listNfts specifying a token id and a range of account ids, sorted in descending order
GET http://localhost:8080/api/v1/tokens/1066828/nfts?account.id=gte:0&account.id=lt:9&limit=1000&order=desc
### TRANSACTIONS
### get transactions by Id
GET http://localhost:8080/api/v1/transactions/0.0.89748-1612413398-472232185
Accept: application/json
### get transactions by Id filter by nonce and scheduled
GET http://localhost:8080/api/v1/transactions/0.0.89748-1612413398-472232185?nonce=0&scheduled=false
Accept: application/json
### get transactions by accountId
GET http://localhost:8080/api/v1/transactions?account.id=969040&limit=10&order=asc&transactiontype=CRYPTOTRANSFER
Accept: application/json
### get transactions by CREDIT type
GET http://localhost:8080/api/v1/transactions?account.id=98&limit=200&order=asc&type=CREDIT
Accept: application/json
### get transactions by DEBIT type
GET http://localhost:8080/api/v1/transactions?account.id=11&limit=2&order=asc&type=DEBIT
Accept: application/json
### ACCOUNTS
### get accounts by Id
GET http://localhost:8080/api/v1/accounts/969040
Accept: application/json
### get accounts by Id and transaction type
GET http://localhost:8080/api/v1/accounts/969040?transactiontype=CRYPTOTRANSFER
Accept: application/json
### get accounts by alias and transaction type
GET http://localhost:8080/api/v1/accounts/ac384c53f03855fa1b3616052f8ba32c6c2a2fec?transactiontype=CRYPTOTRANSFER
Accept: application/json
### get nfts for an account id
GET http://localhost:8080/api/v1/accounts/0/nfts
Accept: application/json
### get nfts for an account id with filters
GET http://localhost:8080/api/v1/accounts/0/nfts?deleted=false&serial_number=1871&token_id=1066828&limit=10&order=asc
### list accounts
GET http://localhost:8080/api/v1/accounts?limit=100
Accept: application/json
### list accounts with filters
GET http://localhost:8080/api/v1/accounts?account.balance<100000&account.id=96040&order=asc&balance=true
Accept: application/json