Skip to content

Commit

Permalink
chore: add auth sections for core API
Browse files Browse the repository at this point in the history
  • Loading branch information
xadahiya committed Dec 2, 2023
1 parent eccbf9b commit 7bf66fc
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 2 deletions.
29 changes: 28 additions & 1 deletion docs/build-with-powerloom/snapshotter-node/core-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,31 @@ sidebar_position: 0

Core API facilitates access to the finalized protocol state on the smart contract running on the anchor chain. Although it is possible to directly query the smart contract, it is not recommended as it is expensive and slow. Instead, you can use the Core API to access the finalized state. Every snapshotter node runs a Core API service that can be accessed by other services or applications.

We have hosted snapshotter nodes for UniswapV2 and Zkevm Quests on the PowerLoom Protocol's testnet. You can interact with those endpoints directly from the next couple of sections.
We have hosted snapshotter nodes for UniswapV2 and Zkevm Quests on the PowerLoom Protocol's testnet. You can interact with those endpoints directly from the next couple of sections.

## Hosted API
![Changing Base URL in UI](/images/base_url_selection.png)

All the API endpoints are available for the given protocols.

```
💡 While the endpoints allow nominal usage for public access without an API key, we **do not** recommend them for developers. Doing so can severely restrict access to your IP address.
```


### Steps to generate API key for privileged access

Follow the steps to generate the API key to access the mentioned API endpoints in the postman collection:

1. Visit [Snapshotter API Dashboard](https://snapshotter-api-dashboard.powerloom.io/) and enter your email to Sign In.

![Screenshot 2022-11-30 at 10.56.19 PM.png](/images/Screenshot_2022-12-14_at_6.21.41_PM.png)

1. You will see a pop-up as shown below. *Note: Don’t close this tab*

![Screenshot 2022-11-30 at 10.57.36 PM.png](/images/Screenshot_2022-12-14_at_6.21.51_PM.png)

2. Login through the link provided on the email and go back to the [Dashboard](https://pooler-api-dashboard.powerloom.io/) tab to get the API key. It should look as shown below

![Screenshot 2022-11-30 at 11.02.31 PM.png](/images/Screenshot_2022-12-14_at_6.27.54_PM.png)

59 changes: 58 additions & 1 deletion docs/build-with-powerloom/snapshotter-node/core-api/sidebar.js
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
module.exports = [{"type":"doc","id":"Snapshotter Core API/snapshotter-core-api"},{"type":"category","label":"UNTAGGED","items":[{"type":"doc","id":"Snapshotter Core API/health-check-health-get","label":"Health Check","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-current-epoch-current-epoch-get","label":"Get Current Epoch","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-epoch-info-epoch-epoch-id-get","label":"Get Epoch Info","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-project-last-finalized-epoch-info-last-finalized-epoch-project-id-get","label":"Get Project Last Finalized Epoch Info","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-data-for-project-id-epoch-id-data-epoch-id-project-id-get","label":"Get Data For Project Id Epoch Id","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-finalized-cid-for-project-id-epoch-id-cid-epoch-id-project-id-get","label":"Get Finalized Cid For Project Id Epoch Id","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-snapshotter-overall-status-internal-snapshotter-status-get","label":"Get Snapshotter Overall Status","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-snapshotter-project-level-status-internal-snapshotter-status-project-id-get","label":"Get Snapshotter Project Level Status","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-snapshotter-epoch-processing-status-internal-snapshotter-epoch-processing-status-get","label":"Get Snapshotter Epoch Processing Status","className":"api-method get"},{"type":"doc","id":"Snapshotter Core API/get-task-status-post-task-status-post","label":"Get Task Status Post","className":"api-method post"}]}];
module.exports = [{
"type": "doc",
"id": "Snapshotter Core API/snapshotter-core-api"
}, {
"type": "category",
"label": "UNTAGGED",
"items": [{
"type": "GET",
"id": "Snapshotter Core API/health-check-health-get",
"label": "Health Check",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-current-epoch-current-epoch-get",
"label": "Get Current Epoch",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-epoch-info-epoch-epoch-id-get",
"label": "Get Epoch Info",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-project-last-finalized-epoch-info-last-finalized-epoch-project-id-get",
"label": "Get Project Last Finalized Epoch Info",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-data-for-project-id-epoch-id-data-epoch-id-project-id-get",
"label": "Get Data For Project Id Epoch Id",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-finalized-cid-for-project-id-epoch-id-cid-epoch-id-project-id-get",
"label": "Get Finalized Cid For Project Id Epoch Id",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-snapshotter-overall-status-internal-snapshotter-status-get",
"label": "Get Snapshotter Overall Status",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-snapshotter-project-level-status-internal-snapshotter-status-project-id-get",
"label": "Get Snapshotter Project Level Status",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-snapshotter-epoch-processing-status-internal-snapshotter-epoch-processing-status-get",
"label": "Get Snapshotter Epoch Processing Status",
"className": "api-method get"
}, {
"type": "doc",
"id": "Snapshotter Core API/get-task-status-post-task-status-post",
"label": "Get Task Status Post",
"className": "api-method post"
}]
}];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/base_url_selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7bf66fc

Please sign in to comment.