Skip to content

Commit 7190974

Browse files
docs: added examples for microblocks, accounts, transactions and non-fungible tokens (#1268)
* Added examples for missing API's * fix the hash example for v1/block/{hash}
1 parent 0d81369 commit 7190974

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

docs/openapi.yaml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ paths:
543543
required: true
544544
schema:
545545
type: string
546-
example: 0x044b6ee5bdc7d3cb16e9a263e892b8060b4f64c72900b02093b9f6fa74ae8a67
546+
example: 0x3bfcdf84b3012adb544cf0f6df4835f93418c2269a3881885e27b3d58eb82d47
547547
get:
548548
summary: Get microblock
549549
description: Retrieves a specific microblock by `hash`
@@ -619,7 +619,7 @@ paths:
619619
- name: hash
620620
in: path
621621
description: Hash of the block
622-
example: 0xbf06705d0b8c2389eb4b3a19ce72096b7158b158e2cd4ceb27d8de9db19bb3be
622+
example: "0x4839a8b01cfb39ffcc0d07d3db31e848d5adf5279d529ed5062300b9f353ff79"
623623
required: true
624624
schema:
625625
type: string
@@ -1382,16 +1382,17 @@ paths:
13821382
- name: principal
13831383
in: path
13841384
description: Stacks address or a contract identifier
1385-
example: SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0
13861385
required: true
13871386
schema:
13881387
type: string
1388+
example: SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE
13891389
- name: tx_id
13901390
in: path
13911391
description: Transaction id
13921392
required: true
13931393
schema:
13941394
type: string
1395+
example: 0x34d79c7cfc2fe525438736733e501a4bf0308a5556e3e080d1e2c0858aad7448
13951396
responses:
13961397
200:
13971398
description: Success
@@ -1419,29 +1420,31 @@ paths:
14191420
- name: principal
14201421
in: path
14211422
description: Stacks address or a Contract identifier
1422-
example: SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0
14231423
required: true
14241424
schema:
14251425
type: string
1426+
example: SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0
14261427
- name: limit
14271428
in: query
14281429
description: max number of account transactions to fetch
14291430
required: false
14301431
schema:
14311432
type: integer
1433+
example: 20
14321434
- name: offset
14331435
in: query
14341436
description: index of first account transaction to fetch
14351437
required: false
1436-
example: 42000
14371438
schema:
14381439
type: integer
1440+
example: 10
14391441
- name: height
14401442
in: query
14411443
description: Filter for transactions only at this given block height
14421444
required: false
14431445
schema:
14441446
type: number
1447+
example: 66119
14451448
- name: unanchored
14461449
in: query
14471450
description: Include transaction data from unanchored (i.e. unconfirmed) microblocks
@@ -1454,9 +1457,9 @@ paths:
14541457
in: query
14551458
description: returned data representing the state up until that point in time, rather than the current block.
14561459
required: false
1457-
example: 60000
14581460
schema:
14591461
type: string
1462+
example: 60000
14601463
responses:
14611464
200:
14621465
description: Success
@@ -1479,21 +1482,23 @@ paths:
14791482
in: path
14801483
description: Stacks address
14811484
required: true
1482-
example: SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0
14831485
schema:
14841486
type: string
1487+
example: SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0
14851488
- name: block_height
14861489
in: query
14871490
description: Optionally get the nonce at a given block height.
14881491
required: false
14891492
schema:
14901493
type: number
1494+
example: 66119
14911495
- name: block_hash
14921496
in: query
14931497
description: Optionally get the nonce at a given block hash. Note - Use either of the query parameters but not both at a time.
14941498
required: false
14951499
schema:
14961500
type: string
1501+
example: 0x72d53f3cba39e149dcd42708e535bdae03d73e60d2fe853aaf61c0b392f521e9
14971502

14981503
responses:
14991504
200:
@@ -1526,13 +1531,14 @@ paths:
15261531
required: false
15271532
schema:
15281533
type: integer
1534+
example: 20
15291535
- name: offset
15301536
in: query
15311537
description: index of first account assets to fetch
15321538
required: false
1533-
example: 42000
15341539
schema:
15351540
type: integer
1541+
example: 42000
15361542
- name: unanchored
15371543
in: query
15381544
description: Include transaction data from unanchored (i.e. unconfirmed) microblocks
@@ -1545,9 +1551,9 @@ paths:
15451551
in: query
15461552
description: returned data representing the state at that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time.
15471553
required: false
1548-
example: 60000
15491554
schema:
15501555
type: string
1556+
example: 60000
15511557
responses:
15521558
200:
15531559
description: Success
@@ -2849,7 +2855,7 @@ paths:
28492855
in: path
28502856
description: Height of block
28512857
required: true
2852-
example: 69057
2858+
example: 66119
28532859
schema:
28542860
type: integer
28552861
- name: limit
@@ -3187,6 +3193,7 @@ paths:
31873193
required: false
31883194
schema:
31893195
type: integer
3196+
example: 1
31903197
- name: offset
31913198
in: query
31923199
description: index of first tokens to fetch
@@ -3207,7 +3214,7 @@ paths:
32073214
/extended/v1/tokens/{contractId}/nft/metadata:
32083215
get:
32093216
operationId: get_contract_nft_metadata
3210-
summary: Non fungible tokens metadata for contract id
3217+
summary: Non fungible tokens metadata for contract ID
32113218
description: Retrieves metadata for non fungible tokens for a given contract id. More information on Non-Fungible Tokens on the Stacks blockchain can be found [here](https://docs.stacks.co/write-smart-contracts/tokens#non-fungible-tokens-nfts).
32123219
tags:
32133220
- Non-Fungible Tokens

0 commit comments

Comments
 (0)