Skip to content

Commit

Permalink
Add outputs/ and delegation/{delegationId} endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrvivian committed Oct 26, 2023
1 parent bda3636 commit 7793a69
Showing 1 changed file with 136 additions and 0 deletions.
136 changes: 136 additions & 0 deletions tips/TIP-0048/openapi3-indexer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,92 @@ tags:
- name: nft outputs
description: Query NFT Outputs.
paths:
/api/indexer/v2/outputs:
get:
tags:
- basic outputs
summary: Returns all types of outputs filtered based on parameters.
description: Returns basic, foundry, account, delegation and nft outputs filtered based on parameters.
parameters:
- in: query
name: hasNativeTokens
schema:
type: boolean
example: true
description: Filters outputs based on the presence of native tokens.
- in: query
name: nativeToken
schema:
type: integer
example: 5
description: Filters outputs that have a certain number of distinct native tokens.
- in: query
name: createdBefore
schema:
type: integer
example: 200
description: Return outputs that were created before a certain slot index.
- in: query
name: createdAfter
schema:
type: integer
example: 200
description: Return outputs that were created after a certain slot index.
- in: query
name: unlockableByAddress
schema:
type: string
example: iota1qrhacyfwlcnzkvzteumekfkrrwks98mpdm37cj4xx3drvmjvnep6xqgyzyx
description: The address unlock related query parameters.
- in: query
name: pageSize
schema:
type: integer
example: 10
description: The maximum amount of items returned in one call. If there are more items, a cursor to the next page is returned too.
The parameter is ignored when pageSize is defined via the cursor parameter.
- in: query
name: cursor
schema:
type: string
example: 0c78e998f5177834ecb3bae1596d5056af76e487386eecb19727465b4be86a790200.10
description: Starts the search from the cursor (createdSlotIndex+outputId.pageSize).
responses:
'200':
description: "Successful operation."
content:
application/json:
schema:
$ref: '#/components/schemas/OutputsResponse'
examples:
Query results in 3 outputs:
$ref: >-
#/components/examples/get-outputs-response-three-example
No matching Output IDs found:
$ref: >-
#/components/examples/get-outputs-empty-response-example
Paging - more items found than it can fit on single page:
$ref: >-
#/components/examples/get-outputs-pagesize2-response-example
'400':
description: "Unsuccessful operation: indicates that the provided data is invalid."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'403':
description: "Unsuccessful operation: indicates that the endpoint is not available for public use."
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenResponse'
'500':
description: "Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalErrorResponse'

/api/indexer/v2/outputs/basic:
get:
tags:
Expand Down Expand Up @@ -413,6 +499,56 @@ paths:
schema:
$ref: '#/components/schemas/InternalErrorResponse'

/api/indexer/v2/outputs/delegation/{delegationId}:
get:
tags:
- delegation outputs
summary: Returns the delegations for the delegationId.
description: Returns the delegations for the delegationId.
parameters:
- in: path
name: delegationId
schema:
type: string
example: "0x1505ec099896ab05d9e08fbc7101ae4dff0093b3943b28f789ed2ca728bcc8d6"
description: Unique identifier of the delegationId.
required: true
responses:
'200':
description: "Successful operation."
content:
application/json:
schema:
$ref: '#/components/schemas/OutputsResponse'
examples:
Query results in single output:
$ref: >-
#/components/examples/get-outputs-response-single-example
'400':
description: "Unsuccessful operation: indicates that the provided data is invalid."
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'403':
description: "Unsuccessful operation: indicates that the endpoint is not available for public use."
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenResponse'
'404':
description: "Unsuccessful operation: indicates that the requested data was not found."
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'500':
description: "Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request."
content:
application/json:
schema:
$ref: '#/components/schemas/InternalErrorResponse'

/api/indexer/v2/outputs/foundry:
get:
tags:
Expand Down

0 comments on commit 7793a69

Please sign in to comment.