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
14 changes: 10 additions & 4 deletions docs/hub/cli/hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ The Hub Client.
### Options

```
--api string API target (default "api.hub.textile.io:443")
-h, --help help for hub
-o, --org string Org username
-s, --session string User session token
--api string API target (default "api.hub.textile.io:443")
-h, --help help for hub
--identity string User identity
--key string User API key
--newIdentity Generate a new user identity
-o, --org string Org username
--secret string User API secret
-s, --session string User session token
--token string User identity token
```

### SEE ALSO

* [hub billing](hub_billing.md) - Billing management
* [hub buck](hub_buck.md) - Manage an object storage bucket
* [hub destroy](hub_destroy.md) - Destroy your account
* [hub init](hub_init.md) - Initialize account
Expand Down
17 changes: 17 additions & 0 deletions docs/hub/cli/hub_billing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# hub billing

Manages your billing preferences.

### Options

```
-h, --help help for billing
```

### SEE ALSO

* [hub](hub.md) - Hub Client
* [hub billing portal](hub_billing_portal.md) - Open billing web portal
* [hub billing setup](hub_billing_setup.md) - Setup usage billing
* [hub billing usage](hub_billing_usage.md) - Show usage and billing info
* [hub billing users](hub_billing_users.md) - list contributing users
17 changes: 17 additions & 0 deletions docs/hub/cli/hub_billing_portal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# hub billing portal

Opens a web portal for managing billing preferences.

```
hub billing portal [flags]
```

### Options

```
-h, --help help for portal
```

### SEE ALSO

* [hub billing](hub_billing.md) - Billing management
17 changes: 17 additions & 0 deletions docs/hub/cli/hub_billing_setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# hub billing setup

Sets up metered usage billing.

```
hub billing setup [flags]
```

### Options

```
-h, --help help for setup
```

### SEE ALSO

* [hub billing](hub_billing.md) - Billing management
20 changes: 20 additions & 0 deletions docs/hub/cli/hub_billing_usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# hub billing usage

Shows usage and billing information.

Use the --user flag to get usage for a dependent user.

```
hub billing usage [flags]
```

### Options

```
-h, --help help for usage
-u, --user string User multibase encoded public key
```

### SEE ALSO

* [hub billing](hub_billing.md) - Billing management
19 changes: 19 additions & 0 deletions docs/hub/cli/hub_billing_users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# hub billing users

Lists users contributing to billing usage.

```
hub billing users [flags]
```

### Options

```
-h, --help help for users
--limit int Page size (max 1000) (default 25)
--offset int Page offset (returned by each request)
```

### SEE ALSO

* [hub billing](hub_billing.md) - Billing management
1 change: 0 additions & 1 deletion docs/hub/cli/hub_buck_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ hub buck init [flags]
--cid string Bootstrap the bucket with a UnixFS Cid from the IPFS network
-e, --existing Initializes from an existing remote bucket if true
-h, --help help for init
--key string Bucket key
-n, --name string Bucket name
-p, --private Obfuscates files and folders with encryption
-q, --quiet Write minimal output
Expand Down
2 changes: 1 addition & 1 deletion docs/hub/cli/hub_buck_push.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ hub buck push [flags]
```
-f, --force Allows non-fast-forward updates if true
-h, --help help for push
--maxsize int Max bucket size in MiB (default 1024)
--maxsize int Max bucket size in MiB (default 4096)
-q, --quiet Write minimal output
-y, --yes Skips the confirmation prompt if true
```
Expand Down
9 changes: 1 addition & 8 deletions docs/hub/cli/hub_pow.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ Interact with Powergate.
* [hub](hub.md) - Hub Client
* [hub pow addrs](hub_pow_addrs.md) - List Filecoin wallet addresses associated with the current account or org
* [hub pow balance](hub_pow_balance.md) - Display the FIL balance of a wallet address
* [hub pow connectedness](hub_pow_connectedness.md) - Get the connectedness state to a Filecoin peer
* [hub pow find-peer](hub_pow_find-peer.md) - Find a Filecoin peer by id
* [hub pow health](hub_pow_health.md) - Check the health of the Powergate node
* [hub pow info](hub_pow_info.md) - Display information about the Powergate associated with the current account or org to any other account
* [hub pow new-addr](hub_pow_new-addr.md) - Create a Filecoin wallet addresses associated with the current account or org
* [hub pow peers](hub_pow_peers.md) - List Powergate's Filecoin peers
* [hub pow info](hub_pow_info.md) - Get information about the current storate state of a cid
* [hub pow retrievals](hub_pow_retrievals.md) - List Powergate retrieval deal records associated with the current account or org
* [hub pow show](hub_pow_show.md) - Display information about a stored CID
* [hub pow show-all](hub_pow_show-all.md) - Display information about all stored CIDs
* [hub pow storage](hub_pow_storage.md) - List Powergate storage deal records associated with the current account or org
17 changes: 0 additions & 17 deletions docs/hub/cli/hub_pow_connectedness.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/hub/cli/hub_pow_find-peer.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/hub/cli/hub_pow_health.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/hub/cli/hub_pow_info.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# hub pow info

Display information about the Powergate associated with the current account or org to any other account.
Get information about the current storate state of a cid

```
hub pow info [flags]
hub pow info [optional cid1,cid2,...] [flags]
```

### Options
Expand Down
19 changes: 0 additions & 19 deletions docs/hub/cli/hub_pow_new-addr.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/hub/cli/hub_pow_peers.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/hub/cli/hub_pow_show-all.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/hub/cli/hub_pow_show.md

This file was deleted.

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 users, view wallet addresses, send FIL, and show information about jobs and data across all users managed by the Powergate node.

## 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
users Provides admin users 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 user auth token

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

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

```bash
➜ export POW_ADMIN_TOKEN=<admin token value>
➜ pow admin user create
{
"user": {
"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 user 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 user 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 user 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 users](pow_admin_users.md) - Provides admin users commands
* [pow admin wallet](pow_admin_wallet.md) - Provides admin wallet commands

Loading