Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powergate API Updates #239

Merged
merged 15 commits into from
Nov 20, 2020
Binary file removed docs/images/powergate/help.png
Binary file not shown.
Binary file removed docs/images/powergate/reputation.png
Binary file not shown.
47 changes: 47 additions & 0 deletions docs/powergate/admin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Admin APIs

Powergate includes some administrative APIs. They allow the caller to create and list Storage Profiles, view wallet addresses, send FIL, and show information about jobs and data accross all Storage Profiles managed by the Powergate node.
asutula marked this conversation as resolved.
Show resolved Hide resolved

## Admin Auth Token

Powergate's backend server may be configured with an admin auth token to restrict access to only those clients that provide the token with their requests, so be sure to set the admin token correctly in your [client of choice](/powergate/#powergate-apis). In the case of the Powergate CLI, `pow`, the admin token can be provided with the `--admin-token` flag or by setting the `POW_ADMIN_TOKEN` environment variable.
asutula marked this conversation as resolved.
Show resolved Hide resolved

## CLI Usage

We can get a quick overview of the `pow` admin API below:

```bash
➜ pow admin --help
Provides admin commands

Usage:
pow admin [command]

Available Commands:
jobs Provides admin jobs commands
profiles Provides admin storage profile commands
wallet Provides admin wallet commands

Flags:
--admin-token string admin auth token
-h, --help help for admin

Global Flags:
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token

Use "pow admin [command] --help" for more information about a command.
```

As an example, you can create a new Storage Profile by running:

```bash
➜ export POW_ADMIN_TOKEN=<admin token value>
➜ pow admin profile create
{
"authEntry": {
"id": "57b2f476-cc6f-4063-a8cb-d07652742722",
"token": "2ddab280-8ba7-4579-8026-04573fc8d0f5"
}
}
```
14 changes: 7 additions & 7 deletions docs/powergate/cli/pow.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ pow [flags]
```
-h, --help help for pow
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
-v, --version display version information for pow and the connected server
```

### SEE ALSO

* [pow asks](pow_asks.md) - Provides commands to view asks data
* [pow faults](pow_faults.md) - Provides commands to view faults data
* [pow ffs](pow_ffs.md) - Provides commands to manage ffs
* [pow health](pow_health.md) - Display the node health status
* [pow miners](pow_miners.md) - Provides commands to view miners data
* [pow net](pow_net.md) - Provides commands related to peers and network
* [pow reputation](pow_reputation.md) - Provides commands to view miner reputation data
* [pow admin](pow_admin.md) - Provides admin commands
* [pow config](pow_config.md) - Provides commands to interact with cid storage configs
* [pow data](pow_data.md) - Provides commands to interact with general data APIs
* [pow deals](pow_deals.md) - Provides commands to view Filecoin deal information
* [pow id](pow_id.md) - Returns the storage profile id
* [pow storage-jobs](pow_storage-jobs.md) - Provides commands to query for storage jobs in various states
* [pow version](pow_version.md) - Display version information for pow and the connected server
* [pow wallet](pow_wallet.md) - Provides commands about filecoin wallets

29 changes: 29 additions & 0 deletions docs/powergate/cli/pow_admin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## pow admin

Provides admin commands

### Synopsis

Provides admin commands

### Options

```
--admin-token string admin auth token
-h, --help help for admin
```

### Options inherited from parent commands

```
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow](pow.md) - A client for storage and retreival of powergate data
* [pow admin jobs](pow_admin_jobs.md) - Provides admin jobs commands
* [pow admin profiles](pow_admin_profiles.md) - Provides admin storage profile commands
* [pow admin wallet](pow_admin_wallet.md) - Provides admin wallet commands

31 changes: 31 additions & 0 deletions docs/powergate/cli/pow_admin_jobs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## pow admin jobs

Provides admin jobs commands

### Synopsis

Provides admin jobs commands

### Options

```
-h, --help help for jobs
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin](pow_admin.md) - Provides admin commands
* [pow admin jobs executing](pow_admin_jobs_executing.md) - List executing storage jobs
* [pow admin jobs latest-final](pow_admin_jobs_latest-final.md) - List the latest final storage jobs
* [pow admin jobs latest-successful](pow_admin_jobs_latest-successful.md) - List the latest successful storage jobs
* [pow admin jobs queued](pow_admin_jobs_queued.md) - List queued storage jobs
* [pow admin jobs summary](pow_admin_jobs_summary.md) - Give a summary of storage jobs in all states

32 changes: 32 additions & 0 deletions docs/powergate/cli/pow_admin_jobs_executing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## pow admin jobs executing

List executing storage jobs

### Synopsis

List executing storage jobs

```
pow admin jobs executing [flags]
```

### Options

```
-c, --cids strings optional cids filter to apply
-h, --help help for executing
-i, --instance-id string optional instance id filter to apply
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin jobs](pow_admin_jobs.md) - Provides admin jobs commands

32 changes: 32 additions & 0 deletions docs/powergate/cli/pow_admin_jobs_latest-final.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## pow admin jobs latest-final

List the latest final storage jobs

### Synopsis

List the latest final storage jobs

```
pow admin jobs latest-final [flags]
```

### Options

```
-c, --cids strings optional cids filter to apply
-h, --help help for latest-final
-i, --instance-id string optional instance id filter to apply
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin jobs](pow_admin_jobs.md) - Provides admin jobs commands

32 changes: 32 additions & 0 deletions docs/powergate/cli/pow_admin_jobs_latest-successful.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## pow admin jobs latest-successful
asutula marked this conversation as resolved.
Show resolved Hide resolved

List the latest successful storage jobs

### Synopsis

List the latest successful storage jobs

```
pow admin jobs latest-successful [flags]
```

### Options

```
-c, --cids strings optional cids filter to apply
-h, --help help for latest-successful
-i, --instance-id string optional instance id filter to apply
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin jobs](pow_admin_jobs.md) - Provides admin jobs commands

32 changes: 32 additions & 0 deletions docs/powergate/cli/pow_admin_jobs_queued.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## pow admin jobs queued

List queued storage jobs

### Synopsis

List queued storage jobs

```
pow admin jobs queued [flags]
```

### Options

```
-c, --cids strings optional cids filter to apply
-h, --help help for queued
-i, --instance-id string optional instance id filter to apply
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin jobs](pow_admin_jobs.md) - Provides admin jobs commands

32 changes: 32 additions & 0 deletions docs/powergate/cli/pow_admin_jobs_summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## pow admin jobs summary

Give a summary of storage jobs in all states

### Synopsis

Give a summary of storage jobs in all states

```
pow admin jobs summary [flags]
```

### Options

```
-c, --cids strings optional cids filter to apply
-h, --help help for summary
-i, --instance-id string optional instance id filter to apply
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin jobs](pow_admin_jobs.md) - Provides admin jobs commands

28 changes: 28 additions & 0 deletions docs/powergate/cli/pow_admin_profiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## pow admin profiles

Provides admin storage profile commands

### Synopsis

Provides admin storage profile commands

### Options

```
-h, --help help for profiles
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin](pow_admin.md) - Provides admin commands
* [pow admin profiles create](pow_admin_profiles_create.md) - Create a Powergate storage profile.
* [pow admin profiles list](pow_admin_profiles_list.md) - List all Powergate storage profiles.
asutula marked this conversation as resolved.
Show resolved Hide resolved

30 changes: 30 additions & 0 deletions docs/powergate/cli/pow_admin_profiles_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## pow admin profiles create

Create a Powergate storage profile.

### Synopsis

Create a Powergate storage profile.

```
pow admin profiles create [flags]
```

### Options

```
-h, --help help for create
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin profiles](pow_admin_profiles.md) - Provides admin storage profile commands

30 changes: 30 additions & 0 deletions docs/powergate/cli/pow_admin_profiles_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## pow admin profiles list

List all Powergate storage profiles.

### Synopsis

List all Powergate storage profiles.

```
pow admin profiles list [flags]
```

### Options

```
-h, --help help for list
```

### Options inherited from parent commands

```
--admin-token string admin auth token
--serverAddress string address of the powergate service api (default "127.0.0.1:5002")
-t, --token string storage profile auth token
```

### SEE ALSO

* [pow admin profiles](pow_admin_profiles.md) - Provides admin storage profile commands

Loading