Skip to content

Commit a4f5dd3

Browse files
docs: added examples for transaction APIs (#1255)
1 parent a93e418 commit a4f5dd3

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

docs/openapi.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ paths:
192192
in: query
193193
description: max number of transactions to fetch
194194
required: false
195+
example: 100
195196
schema:
196197
type: integer
197198
default: 96
@@ -207,6 +208,7 @@ paths:
207208
in: query
208209
description: Filter by transaction type
209210
required: false
211+
example: coinbase
210212
schema:
211213
type: array
212214
items:
@@ -216,6 +218,7 @@ paths:
216218
in: query
217219
description: Include transaction data from unanchored (i.e. unconfirmed) microblocks
218220
required: false
221+
example: true
219222
schema:
220223
type: boolean
221224
example: true
@@ -245,6 +248,7 @@ paths:
245248
in: query
246249
description: Filter to only return transactions with this sender address.
247250
required: false
251+
example: SP1GPBP8NBRXDRJBFQBV7KMAZX1Z7W2RFWJEH0V10
248252
schema:
249253
type: string
250254
- name: recipient_address
@@ -263,6 +267,7 @@ paths:
263267
in: query
264268
description: max number of mempool transactions to fetch
265269
required: false
270+
example: 100
266271
schema:
267272
type: integer
268273
default: 96
@@ -337,6 +342,7 @@ paths:
337342
in: query
338343
description: Array of transaction ids
339344
required: true
345+
example: 0x0a411719e3bfde95f9e227a2d7f8fac3d6c646b1e6cc186db0e2838a2c6cd9c0
340346
schema:
341347
type: array
342348
items:
@@ -390,6 +396,7 @@ paths:
390396
in: path
391397
description: Hash of transaction
392398
required: true
399+
example: 0x0a411719e3bfde95f9e227a2d7f8fac3d6c646b1e6cc186db0e2838a2c6cd9c0
393400
schema:
394401
type: string
395402
- name: event_offset
@@ -439,6 +446,7 @@ paths:
439446
in: path
440447
description: Hash of transaction
441448
required: true
449+
example: 0x0a411719e3bfde95f9e227a2d7f8fac3d6c646b1e6cc186db0e2838a2c6cd9c0
442450
schema:
443451
type: string
444452
get:
@@ -2782,12 +2790,14 @@ paths:
27822790
in: path
27832791
description: Hash of block
27842792
required: true
2793+
example: 0x0a83d82a65460a9e711f85a44616350280040b75317dbe486a923c1131b5ff99
27852794
schema:
27862795
type: string
27872796
- name: limit
27882797
in: query
27892798
description: max number of transactions to fetch
27902799
required: false
2800+
example: 10
27912801
schema:
27922802
type: integer
27932803
- name: offset
@@ -2819,12 +2829,14 @@ paths:
28192829
in: path
28202830
description: Height of block
28212831
required: true
2832+
example: 35000
28222833
schema:
28232834
type: integer
28242835
- name: limit
28252836
in: query
28262837
description: max number of transactions to fetch
28272838
required: false
2839+
example: 10
28282840
schema:
28292841
type: integer
28302842
- name: offset
@@ -2838,6 +2850,7 @@ paths:
28382850
in: query
28392851
description: Include transaction data from unanchored (i.e. unconfirmed) microblocks
28402852
required: false
2853+
example: true
28412854
schema:
28422855
type: boolean
28432856
example: true
@@ -2870,6 +2883,7 @@ paths:
28702883
in: query
28712884
description: max number of transactions to fetch
28722885
required: false
2886+
example: 90
28732887
schema:
28742888
type: integer
28752889
- name: offset
@@ -2883,6 +2897,7 @@ paths:
28832897
in: query
28842898
description: Include transaction data from unanchored (i.e. unconfirmed) microblocks
28852899
required: false
2900+
example: true
28862901
schema:
28872902
type: boolean
28882903
example: true
@@ -3339,41 +3354,40 @@ paths:
33393354
in: query
33403355
description: Hash of transaction
33413356
required: false
3357+
example: 0x29e25515652dad41ef675bd0670964e3d537b80ec19cf6ca6f1dd65d5bc642c5
33423358
schema:
33433359
type: string
3344-
example: '0x29e25515652dad41ef675bd0670964e3d537b80ec19cf6ca6f1dd65d5bc642c5'
33453360
- name: address
33463361
in: query
33473362
description: Stacks address or a Contract identifier
33483363
required: false
3364+
example: ST1HB64MAJ1MBV4CQ80GF01DZS4T1DSMX20ADCRA4
33493365
schema:
33503366
type: string
3351-
example: ST1HB64MAJ1MBV4CQ80GF01DZS4T1DSMX20ADCRA4
33523367
- name: limit
33533368
in: query
33543369
description: number of items to return
33553370
required: false
3371+
example: 100
33563372
schema:
33573373
type: integer
3358-
example: 100
33593374
- name: offset
33603375
in: query
33613376
description: number of items to skip
33623377
required: false
33633378
example: 42000
33643379
schema:
33653380
type: integer
3366-
example: 50
33673381
- name: type
33683382
in: query
33693383
description: Filter the events on event type
33703384
required: false
3385+
example: stx_lock
33713386
schema:
33723387
type: array
33733388
items:
33743389
type: string
33753390
enum: [smart_contract_log, stx_lock, stx_asset, fungible_token_asset, non_fungible_token_asset]
3376-
example: stx_lock
33773391
responses:
33783392
200:
33793393
description: Success

0 commit comments

Comments
 (0)