cic-internal-integration/apps/cic-cache/doc/openapi/server.yml

145 lines
3.5 KiB
YAML
Raw Normal View History

2021-11-04 07:59:38 +01:00
openapi: "3.0.2"
2021-02-18 06:04:30 +01:00
info:
title: Grassroots Economics CIC Cache
description: Cache of processed transaction data from Ethereum blockchain and worker queues
termsOfService: bzz://grassrootseconomics.eth/terms
contact:
name: Grassroots Economics
url: https://www.grassrootseconomics.org
email: will@grassecon.org
license:
name: GPLv3
version: 0.1.0
paths:
2021-11-04 07:59:38 +01:00
/defaultlimit:
summary: The default limit value of result sets.
get:
tags:
- transactions
description:
Retrieve default limit
operationId: limit.default
responses:
200:
description: Limit query successful
content:
application/json:
schema:
$ref: "#/components/schemas/Limit"
/tx/{offset}/{limit}/{block_offset}/{block_end}:
summary: Bloom filter for batch of latest transactions
description: Generates a bloom filter of the specified transactions in the database. Any path query part having a value of zero will be discarded.
2021-02-18 06:04:30 +01:00
get:
tags:
- transactions
description:
Retrieve transactions
operationId: tx.get
responses:
200:
description: Transaction query successful.
content:
application/json:
schema:
$ref: "#/components/schemas/BlocksBloom"
parameters:
- name: offset
in: path
2021-11-04 07:59:38 +01:00
required: true
2021-02-18 06:04:30 +01:00
schema:
type: integer
format: int32
- name: limit
in: path
2021-11-04 07:59:38 +01:00
required: true
schema:
type: integer
format: int32
- name: block_offset
in: path
required: true
schema:
type: integer
format: int32
- name: block_end
in: path
required: true
2021-02-18 06:04:30 +01:00
schema:
type: integer
format: int32
/tx/{address}/{offset}/{limit}:
description: Bloom filter for batch of latest transactions by account
get:
tags:
- transactions
description:
Retrieve transactions
2021-11-04 07:59:38 +01:00
operationId: tx.get.user
2021-02-18 06:04:30 +01:00
responses:
200:
description: Transaction query successful.
content:
application/json:
schema:
$ref: "#/components/schemas/BlocksBloom"
parameters:
- name: address
in: path
required: true
schema:
type: string
- name: offset
in: path
2021-11-04 07:59:38 +01:00
required: true
2021-02-18 06:04:30 +01:00
schema:
type: integer
format: int32
- name: limit
in: path
2021-11-04 07:59:38 +01:00
required: true
2021-02-18 06:04:30 +01:00
schema:
type: integer
format: int32
components:
schemas:
2021-11-04 07:59:38 +01:00
Limit:
type: integer
format: int32
2021-02-18 06:04:30 +01:00
BlocksBloom:
type: object
properties:
low:
2021-11-04 07:59:38 +01:00
type: integer
2021-02-18 06:04:30 +01:00
format: int32
description: The lowest block number included in the filter
block_filter:
type: string
format: byte
description: Block number filter
blocktx_filter:
type: string
format: byte
description: Block and tx index filter
alg:
type: string
description: Hashing algorithm (currently only using sha256)
filter_rounds:
2021-11-04 07:59:38 +01:00
type: integer
2021-02-18 06:04:30 +01:00
format: int32
description: Number of hash rounds used to create the filter
2021-11-04 07:59:38 +01:00
examples:
data_last:
summary: Get the latest cached transactions.
description: "Get the latest cached transactions. The maximum number of transactions returned is the value returned by the `/defaultlimit` query"
value: "/tx"