Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
change to apigeecli
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Jul 20, 2019
1 parent 4403f61 commit c288de4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
builds:
-
main: ./main.go
binary: apigeeapi
binary: apigeecli
goos:
- linux
- darwin
Expand Down
86 changes: 43 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# apigeeapi
# apigeecli

This is a tool to interact with [Apigee APIs](https://apigee.googleapis.com). The tool let you manage (get, list) environments, proxies, etc.

# Installation

`apigeeapi` is a binary and you can download the appropriate one for your platform from [here](https://github.com/srinandan/apigeeapi/releases)
`apigeecli` is a binary and you can download the appropriate one for your platform from [here](https://github.com/srinandan/apigeepi/releases)

NOTE: Supported platforms are:
* Darwin
* Windows
* Linux

# What you need to know about apigeeapi
# What you need to know about apigeecli

You must have an account on [Apigee Hybrid](https://docs.apigee.com/hybrid/beta2) to perform any `apigeeapi` functions. These functions include:
You must have an account on [Apigee Hybrid](https://docs.apigee.com/hybrid/beta2) to perform any `apigeecli` functions. These functions include:

* Manage API proxies,
* Manage API Products,
Expand All @@ -30,7 +30,7 @@ Create a service account with appropriate persmissions. Refer to this [link](htt

## Access Token

`apigeeapi` can use the service account directly and obtain an access token. However, the user can also provide an access token.
`apigeecli` can use the service account directly and obtain an access token. However, the user can also provide an access token.

Print the access token

Expand All @@ -47,44 +47,44 @@ The following options are available for security

Pass the access token
```
apigeeapi -t $TOKEN
apigeecli -t $TOKEN
```

Pass the service account

```
apigeeapi -a orgadmin.json
apigeecli -a orgadmin.json
```

## Access Token Caching

`apigeeapi` caches the OAuth Access token for subsequent calls (until the token expires). The access token is stored in `$HOME/.access_token`. This path must be readable/writeable by the `apigeeapi` process.
`apigeecli` caches the OAuth Access token for subsequent calls (until the token expires). The access token is stored in `$HOME/.access_token`. This path must be readable/writeable by the `apigeecli` process.

### Example 1

First command

```
apigeeapi orgs list -a orgadmin.json
apigeecli orgs list -a orgadmin.json
```

Subsequent command (no token or service account)

```
apigeeapi orgs get -o org
apigeecli orgs get -o org
```
### Example 2

First command

```
apigeeapi orgs list -t $TOKEN
apigeecli orgs list -t $TOKEN
```

Subsequent command (no token or service account)

```
apigeeapi orgs get -o org
apigeecli orgs get -o org
```

## Supported entites
Expand All @@ -111,15 +111,15 @@ apigeeapi orgs get -o org
List all the orgs available to the identity (service account)

```
apigeeapi org list
apigeecli org list
```

### <a name="getorg"/> get

Get org details for an Apigee Org

```
apigeeapi org get -o org
apigeecli org get -o org
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand Down Expand Up @@ -147,7 +147,7 @@ The following parameters are supported. See Common Reference for a list of addit
* `--count -c` (optional) Number of app ids to return. Default is 1000

```
apigeeapi prods list -o org
apigeecli prods list -o org
```
Required parameters
The following parameters are required. See Common Reference for a list of additional parameters.
Expand All @@ -160,7 +160,7 @@ The following parameters are required. See Common Reference for a list of additi
Get details of an API product

```
apigeeapi prods list -o org -n name
apigeecli prods list -o org -n name
```
Required parameters
The following parameters are required. See Common Reference for a list of additional parameters.
Expand All @@ -173,7 +173,7 @@ The following parameters are required. See Common Reference for a list of additi
Create an API product

```
apigeeapi prods create -o org -n name -e test,prod -p proxy1,proxy2 -f auto
apigeecli prods create -o org -n name -e test,prod -p proxy1,proxy2 -f auto
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -197,7 +197,7 @@ Delete an API Product
Get details of an API product

```
apigeeapi prods delete -o org -n name
apigeecli prods delete -o org -n name
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -221,7 +221,7 @@ The following parameters are supported. See Common Reference for a list of addit
List APIs in an Apigee Org

```
apigeeapi apis list -o org
apigeecli apis list -o org
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -236,7 +236,7 @@ If the environment name is passed, lists the deployed proxies in the environment
Lists all deployments of an API proxy

```
apigeeapi org listdeploy -o org -n name
apigeecli org listdeploy -o org -n name
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -252,7 +252,7 @@ The following parameters are supported. See Common Reference for a list of addit
Import or create an API Proxy. If a bundle (zip) is supplied, it is imported else, it creates an empty proxy in the Org

```
apigeeapi apis create -o org -n proxy
apigeecli apis create -o org -n proxy
```

Parameters
Expand All @@ -267,7 +267,7 @@ The following parameters are supported. See Common Reference for a list of addit
Deploys a revision of an existing API proxy to an environment in an organization.

```
apigeeapi apis deploy -o org -e env -n proxy -v 1
apigeecli apis deploy -o org -e env -n proxy -v 1
```

Parameters
Expand All @@ -284,7 +284,7 @@ The following parameters are supported. See Common Reference for a list of addit
Returns a zip-formatted proxy bundle of code and config files.

```
apigeeapi apis fetch -o org -e env -n proxy -v 1
apigeecli apis fetch -o org -e env -n proxy -v 1
```

<<<<<<< HEAD
Expand All @@ -304,7 +304,7 @@ The downloaded file is {proxyname}.zip and in the folder where the command is ex
Deletes an API proxy and all associated endpoints, policies, resources, and revisions. The API proxy must be undeployed before you can delete it.

```
apigeeapi apis delete -o org -n proxy
apigeecli apis delete -o org -n proxy
```

Parameters
Expand All @@ -318,7 +318,7 @@ The following parameters are supported. See Common Reference for a list of addit
Undeploys a revision of an existing API proxy to an environment in an organization.

```
apigeeapi apis undeploy -o org -e env -n proxy -v 1
apigeecli apis undeploy -o org -e env -n proxy -v 1
```

Parameters
Expand All @@ -342,7 +342,7 @@ Supported alias `developers`
List all App Developers in an org

```
apigeeapi devs list -o org
apigeecli devs list -o org
```

Parameters
Expand All @@ -355,7 +355,7 @@ The following parameters are supported. See Common Reference for a list of addit
Get details of an App Developer

```
apigeeapi devs get -o org -n name
apigeecli devs get -o org -n name
```

Parameters
Expand All @@ -379,7 +379,7 @@ Supported alias `applications`
List all developer apps in an org

```
apigeeapi apps list -o org
apigeecli apps list -o org
```

Parameters
Expand All @@ -394,7 +394,7 @@ The following parameters are supported. See Common Reference for a list of addit
Get details of a developer app

```
apigeeapi apps get -o org -n name
apigeecli apps get -o org -n name
```

Parameters
Expand All @@ -408,7 +408,7 @@ The following parameters are supported. See Common Reference for a list of addit
Delete a developer app

```
apigeeapi apps delete -o org -n name
apigeecli apps delete -o org -n name
```

Parameters
Expand All @@ -422,7 +422,7 @@ The following parameters are supported. See Common Reference for a list of addit
Delete a developer app

```
apigeeapi apps create -o org -n name -e test,prod -p proxy1
apigeecli apps create -o org -n name -e test,prod -p proxy1
```

Parameters
Expand All @@ -441,7 +441,7 @@ The following parameters are supported. See Common Reference for a list of addit
Create new developer KeyPairs Generates a new consumer key and consumer secret for the named developer app

```
apigeeapi apps genkey -o org -n name -p proxy1
apigeecli apps genkey -o org -n name -p proxy1
```

Parameters
Expand All @@ -466,7 +466,7 @@ The following parameters are supported. See Common Reference for a list of addit
List all shared flows in an org

```
apigeeapi sharedflows list -o org
apigeecli sharedflows list -o org
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -481,7 +481,7 @@ When the environment name is passed, list the deployed shared flows in the envir
Get details of a shared flow

```
apigeeapi sharedflow get -o org -n name
apigeecli sharedflow get -o org -n name
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -494,7 +494,7 @@ The following parameters are supported. See Common Reference for a list of addit
Deploy a shared flow

```
apigeeapi sharedflow deploy -o org -n name -v 1
apigeecli sharedflow deploy -o org -n name -v 1
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -509,7 +509,7 @@ The following parameters are supported. See Common Reference for a list of addit
Deploy a shared flow

```
apigeeapi sharedflow undeploy -o org -n name -v 1
apigeecli sharedflow undeploy -o org -n name -v 1
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -531,7 +531,7 @@ Supported alias `environments`
List all environments in an org

```
apigeeapi envs list -o org
apigeecli envs list -o org
```
Parameters
The following parameters are supported. See Common Reference for a list of additional parameters.
Expand All @@ -543,7 +543,7 @@ The following parameters are supported. See Common Reference for a list of addit
Get details of an environment

```
apigeeapi envs get -o org -e env
apigeecli envs get -o org -e env
```

Parameters
Expand All @@ -562,7 +562,7 @@ The following parameters are supported. See Common Reference for a list of addit
Set identity with access to control plane resources

```
apigeeapi sync set -o org -i identity
apigeecli sync set -o org -i identity
```

Parameters
Expand All @@ -576,7 +576,7 @@ The following parameters are supported. See Common Reference for a list of addit
List all the orgs available to the identity (service account)

```
apigeeapi sync set -o org
apigeecli sync set -o org
```

Parameters
Expand All @@ -596,7 +596,7 @@ The following parameters are supported. See Common Reference for a list of addit
Create a new environment scoped KVM Map

```
apigeeapi kvms create -o org -e env -n name
apigeecli kvms create -o org -e env -n name
```

Parameters
Expand All @@ -612,7 +612,7 @@ The following parameters are supported. See Common Reference for a list of addit
List all the KVM Maps in an environment

```
apigeeapi kvms create -o org -e env
apigeecli kvms create -o org -e env
```

Parameters
Expand All @@ -626,7 +626,7 @@ The following parameters are supported. See Common Reference for a list of addit
Delete a KVM Map

```
apigeeapi kvms create -o org -e env
apigeecli kvms create -o org -e env
```

Parameters
Expand Down

0 comments on commit c288de4

Please sign in to comment.