Search the logs across many contracts with multiple contract calls. Chained logs are not
included but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}`
or `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied
and span a time range of at most seven days.
## Ordering
The order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only.
Note: The default order for this API is currently DESC
## Filtering
When filtering there are some restrictions enforced to ensure correctness and scalability.
**The table below defines the restrictions and support for the endpoint**
| Query Param | Comparison Operator | Support | Description | Example |
| ------------- | ------------------- | ------- | --------------------- | ------- |
| index | eq | Y | Single occurrence only. Requires the presence of timestamp | ?index=X |
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=lte:X |
| | gt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=gte:X |
| timestamp | eq | Y | Single occurrence only. | ?timestamp=Y
| | ne | N | | |
| | lt(e) | Y | Single occurrence only. Optional second timestamp **gt(e)** | ?timestamp=lte:Y
| | gt(e) | Y | Single occurrence only. Optional second timestamp **lt(e)** | ?timestamp=gte:Y
Both filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search.
contracts
Getcontractslogs is an example object payload from Hedera, with 8 top-level fields. It illustrates the shape of data this provider's APIs accept or return.
{
"operationId": "getContractsLogs",
"method": "GET",
"path": "/api/v1/contracts/results/logs",
"summary": "List contracts logs across many contracts on the network",
"description": "Search the logs across many contracts with multiple contract calls. Chained logs are not\nincluded but can be found by calling `/api/v1/contracts/{contractId}/results/{timestamp}`\nor `/api/v1/contracts/results/{transactionId}`. When searching by topic a timestamp parameter must be supplied\nand span a time range of at most seven days.\n\n## Ordering\nThe order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only.\n\nNote: The default order for this API is currently DESC\n\n## Filtering\nWhen filtering there are some restrictions enforced to ensure correctness and scalability.\n\n**The table below defines the restrictions and support for the endpoint**\n\n| Query Param | Comparison Operator | Support | Description | Example |\n| ------------- | ------------------- | ------- | --------------------- | ------- |\n| index | eq | Y | Single occurrence only. Requires the presence of timestamp | ?index=X |\n| | ne | N | | |\n| | lt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=lte:X |\n| | gt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=gte:X |\n| timestamp | eq | Y | Single occurrence only. | ?timestamp=Y\n| | ne | N | | |\n| | lt(e) | Y | Single occurrence only. Optional second timestamp **gt(e)** | ?timestamp=lte:Y\n| | gt(e) | Y | Single occurrence only. Optional second timestamp **lt(e)** | ?timestamp=gte:Y\n\n\nBoth filters must be a single occurrence of **gt(e)** or **lt(e)** which provide a lower and or upper boundary for search.\n",
"tags": [
"contracts"
],
"parameters": [
{
"name": "index",
"in": "query",
"description": "Contract log index",
"required": false
},
{
"name": "limit",
"in": "query",
"description": "The maximum number of items to return",
"required": false
},
{
"name": "order",
"in": "query",
"description": "The order in which items are listed",
"required": false
},
{
"name": "timestamp",
"in": "query",
"description": "The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to convert a date to the 'seconds' part of the Unix time.",
"required": false
},
{
"name": "topic0",
"in": "query",
"description": "The first topic associated with a contract log. Requires a timestamp range also be populated.",
"required": false
},
{
"name": "topic1",
"in": "query",
"description": "The second topic associated with a contract log. Requires a timestamp range also be populated.",
"required": false
},
{
"name": "topic2",
"in": "query",
"description": "The third topic associated with a contract log. Requires a timestamp range also be populated.",
"required": false
},
{
"name": "topic3",
"in": "query",
"description": "The fourth topic associated with a contract log. Requires a timestamp range also be populated.",
"required": false
},
{
"name": "transaction.hash",
"in": "query",
"description": "A hex encoded 32-byte ethereum transaction hash or 48-byte hedera transaction hash.",
"required": false
}
],
"responses": {
"200": "OK",
"400": "Invalid parameter"
}
}