Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #8814 from EOSIO/docs/trace-api-ref-2.0
Browse files Browse the repository at this point in the history
Add RPC Trace API plugin reference to nodeos - 2.0
  • Loading branch information
arhag authored Mar 12, 2020
2 parents fcb81ef + 5ff323e commit 1877644
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
"disable_filters": true,
"disable_summary_gen": true
}
},
{
"name": "swagger",
"options": {
"swagger_path": "plugins/trace_api_plugin/trace_api.swagger.yaml",
"swagger_dest_path": "nodeos/plugins/trace_api_plugin/api-reference",
"disable_filters": true,
"disable_summary_gen": true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- THIS IS A PLACEHOLDER, WILL BE REPLACED BY REDOC INSTANCE -->
52 changes: 52 additions & 0 deletions plugins/trace_api_plugin/trace_api.swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
openapi: 3.0.0
info:
title: Trace API
version: 1.0.0
license:
name: MIT
url: https://opensource.org/licenses/MIT
contact:
url: https://eos.io
servers:
- url: '{protocol}://{host}:{port}/v1/'
variables:
protocol:
enum:
- http
- https
default: http
host:
default: localhost
port:
default: "8080"
components:
schemas: {}
paths:
/trace_api/get_block:
post:
description: Returns a block object containing retired actions and related metadata.
operationId: get_block
requestBody:
content:
application/json:
schema:
type: object
required:
- block_num
properties:
block_num:
type: string
description: Provide a `block number`
responses:
"200":
description: OK - valid response payload
content:
application/json:
schema:
$ref: "https://eosio.github.io/schemata/v2.0/oas/Block.yaml"
"400":
description: Error - requested block number is invalid (not a number, larger than max int)
"404":
description: Error - requested data not present on node
"500":
description: Error - exceptional condition while processing get_block; e.g. corrupt files

0 comments on commit 1877644

Please sign in to comment.