ops API
The ops services documented below are hosted at https://ops.minusonedb.com/ and allow you to manage your account(s) and environments. You can interact with all of the service endpoints described below via conventional HTTP clients (curl, postman) or programmatically in your desired language or framework. We offer the m1 client which simplifies credential management and environment configuration.
Services use typical HTTP response codes.
2xx: The request operation worked as as expected.
401: The token used for the request was invalid.
403: The user associated with the token used for the request does not have sufficient rights to perform the requested operation.
500: The request could not be completed.
Authentication and Access
/signup
curl https://ops.minusonedb.com/signup \
-d "[email protected]&password=passphrase"m1 signup| Parameter | Type | Required |
|---|---|---|
| username | String | Yes |
| password | String | Yes |
- Rights: none
- Verb: POST
Creates a user for you on ops. If successful, you can immediately authenticate using the username and password you supplied.
/auth
curl https://ops.minusonedb.com/auth \
-d "[email protected]&password=passphrase"m1 auth| Parameter | Type | Required |
|---|---|---|
| username | String | Yes |
| password | String | Yes |
- Rights: none
- Verb: POST
Log in and retrieve a token for service access.
/user/password
curl https://ops.minusonedb.com/user/password \
-d "password=newPassphrase" \
-H "m1-auth-token: $myToken"m1 ops user/password -password newPassphrase| Parameter | Type | Required |
|---|---|---|
| password | String | Yes |
- Rights: none
- Verb: POST
Change user password. A correct auth token must be included in the request.
Accounts
/account/list
curl https://ops.minusonedb.com/account/list \
-H "m1-auth-token: $myToken"m1 ops account/list- Rights: none
- Verb: GET
List all accounts the current user has access to.
/account/user/list
curl https://ops.minusonedb.com/account/user/list?account=31e1192e-5415-4d85-a45e-b88897c96c1bd \
-H "m1-auth-token: $myToken"m1 ops account/user/list -account 31e1192e-5415-4d85-a45e-b88897c96c1bd| Parameter | Type | Required |
|---|---|---|
| account | String | Yes |
- Rights: none
- Verb: GET
List all users associated with this account.
/account/user/add
curl https://ops.minusonedb.com/account/user/add \
-d 'account=31e1192e-5415-4d85-a45e-b88897c96c1b&[email protected]&rights=["view"]' \
-H "m1-auth-token: $myToken"m1 ops account/user/add -account 31e1192e-5415-4d85-a45e-b88897c96c1b -username [email protected] -rights '["view"]'| Parameter | Type | Required |
|---|---|---|
| account | String | Yes |
| username | String | Yes |
| rights | Array | No |
- Rights: admin
- Verb: POST
Add access to an account for the specified user. Rights defaults to no rights if unspecified.
/account/user/update
curl https://ops.minusonedb.com/account/user/update \
-d 'account=31e1192e-5415-4d85-a45e-b88897c96c1b&[email protected]&rights=["manage","view"]' \
-H "m1-auth-token: $myToken"m1 ops account/user/update -account 31e1192e-5415-4d85-a45e-b88897c96c1b -username [email protected] \
-rights '["manage", "view"]'| Parameter | Type | Required |
|---|---|---|
| account | String | Yes |
| username | String | Yes |
| rights | Array | Yes |
- Rights: admin
- Verb: POST
Update account rights for the specified user.
/account/user/remove
curl https://ops.minusonedb.com/account/user/remove \
-d "account=31e1192e-5415-4d85-a45e-b88897c96c1b&[email protected]" \
-H "m1-auth-token: $myToken"m1 ops account/user/remove -account 31e1192e-5415-4d85-a45e-b88897c96c1b -username [email protected]| Parameter | Type | Required |
|---|---|---|
| account | String | Yes |
| username | String | Yes |
- Rights: admin
- Verb: POST
Remove all access to account for the specified user.
Environments
/env/get
curl https://ops.minusonedb.com/env/get?env=24e27632d234452ba37e60936c0e88eb \
-H "m1-auth-token: $myToken"m1 ops env/get -env 24e27632d234452ba37e60936c0e88eb| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
- Rights: view
- Verb: GET
Retrieve metadata associated with the specified environment. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/list
curl https://ops.minusonedb.com/env/list?account=31e1192e-5415-4d85-a45e-b88897c96c1b \
-H "m1-auth-token: $myToken"m1 ops env/list -account 31e1192e-5415-4d85-a45e-b88897c96c1b| Parameter | Type | Required |
|---|---|---|
| account | String | Yes |
- Rights: view
- Verb: GET
List all environments associated with the specified account.
/env/create
curl https://ops.minusonedb.com/env/create \
-d "env=newenvironment-m1&servers=2" \
-H "m1-auth-token: $myToken"m1 ops env/create -env newenvironment-m1 -servers 2| Parameter | Type | Required |
|---|---|---|
| account | String | Yes |
| name | String | Yes |
| servers | int | No |
- Rights: manage
- Verb: POST
Create a new environment. The name must be unique within the account. Servers defaults to 2 if unspecified. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/rename
curl https://ops.minusonedb.com/env/rename \
-d "env=myenv-m1&name=mynewenv-m1" \
-H "m1-auth-token: $myToken"m1 ops env/rename -env myenv-m1 -name mynewenv-m1| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| name | String | Yes |
- Rights: manage
- Verb: POST
Renames an existing environment. Can be used to move an environment from one account to another but the user must have manage permissions for both the source and destination accounts.
/env/destroy
curl https://ops.minusonedb.com/env/destroy \
-d "env=24e27632d234452ba37e60936c0e88eb" \
-H "m1-auth-token: $myToken"m1 ops env/destroy -env 24e27632d234452ba37e60936c0e88eb| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
- Rights: manage
- Verb: POST
Destroy an environment and all associated resources. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/rescale
curl https://ops.minusonedb.com/env/rescale \
-d "env=24e27632d234452ba37e60936c0e88eb&servers=2&threshold=2" \
-H "m1-auth-token: $myToken"m1 ops env/rescale -env 24e27632d234452ba37e60936c0e88eb -servers 2 -threshold 2| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| servers | int | No |
| threshold | int | No |
- Rights: manage
- Verb: POST
Change the number of data processing servers for the specified environment. If servers is unspecified, the existing number is used. Threshold defaults to the existing number of servers. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/reboot
curl https://ops.minusonedb.com/env/reboot \
-d "env=24e27632d234452ba37e60936c0e88eb&group=index" \
-H "m1-auth-token: $myToken"m1 ops env/reboot -env 24e27632d234452ba37e60936c0e88eb -group index| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| group | String | Yes |
- Rights: manage
- Verb: POST
Reboots all servers in a server group; a server group encompasses the servers associated for a particular data store or session store. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/store/create
curl https://ops.minusonedb.com/env/store/create \
-d "env=24e27632d234452ba37e60936c0e88eb&store=index&type=standard&shards=1&replicas=2" \
-H "m1-auth-token: $myToken"m1 ops env/store/create -env 24e27632d234452ba37e60936c0e88eb -store index -type standard -shards 1 -replicas 2| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| store | String | Yes |
| type | String | No |
| shards | int | No |
| replicas | int | No |
- Rights: manage
- Verb: POST
Create a new data store for the specified environment. Store name must be unique within the environment. Type is standard or boost (default: standard). Shards default to 1; a single shard can store 450 GB (standard) or 375 GB (boost). Replicas default to 2. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/store/rename
curl https://ops.minusonedb.com/env/store/rename \
-d "env=24e27632d234452ba37e60936c0e88eb&store=index&name=newStoreName" \
-H "m1-auth-token: $myToken"m1 ops env/store/rename -env 24e27632d234452ba37e60936c0e88eb -store index -name newStoreName| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| store | String | Yes |
| name | String | Yes |
- Rights: manage
- Verb: POST
Change the name of a data store for the specified environment. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/store/destroy
curl https://ops.minusonedb.com/env/store/destroy \
-d "env=24e27632d234452ba37e60936c0e88eb&store=index" \
-H "m1-auth-token: $myToken"m1 ops env/store/destroy -env 24e27632d234452ba37e60936c0e88eb -store index| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| store | String | Yes |
- Rights: manage
- Verb: POST
Destroy a data store from the specified environment. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/session/create
curl https://ops.minusonedb.com/env/session/create \
-d "env=24e27632d234452ba37e60936c0e88eb&store=stash&shards=1&replicas=2" \
-H "m1-auth-token: $myToken"m1 ops env/session/create -env 24e27632d234452ba37e60936c0e88eb -store stash -shards 1 -replicas 2| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| store | String | Yes |
| shards | int | No |
| replicas | int | No |
- Rights: manage
- Verb: POST
Create a new session store for the specified environment. Store name must be unique within the environment. Shards default to 1; a single shard can store approximately 450,000 session objects and support approximately 45,000 updates/second. Replicas default to 2. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/session/rename
curl https://ops.minusonedb.com/env/session/rename \
-d "env=24e27632d234452ba37e60936c0e88eb&store=stash&name=newSessionStoreName" \
-H "m1-auth-token: $myToken"m1 ops env/session/rename -env 24e27632d234452ba37e60936c0e88eb -store stash -name newSessionStoreName| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| store | String | Yes |
| name | String | Yes |
- Rights: manage
- Verb: POST
Change the name for a session store for the specified environment. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/session/destroy
curl https://ops.minusonedb.com/env/session/destroy \
-d "env=24e27632d234452ba37e60936c0e88eb&store=stash" \
-H "m1-auth-token: $myToken"m1 ops env/session/destroy -env 24e27632d234452ba37e60936c0e88eb -store stash| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| store | String | Yes |
- Rights: manage
- Verb: POST
Destroy a session store from the specified environment. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/bucket/register
curl https://ops.minusonedb.com/env/bucket/register \
-d "env=24e27632d234452ba37e60936c0e88eb&bucket=myBucket" \
-H "m1-auth-token: $myToken"m1 ops env/bucket/register -env 24e27632d234452ba37e60936c0e88eb -bucket myBucket| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| bucket | String | Yes |
- Rights: manage
- Verb: POST
Register a new bucket for the specified environment. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/bucket/deregister
curl https://ops.minusonedb.com/env/bucket/deregister \
-d "env=24e27632d234452ba37e60936c0e88eb&bucket=myBucket" \
-H "m1-auth-token: $myToken"m1 ops env/bucket/deregister -env 24e27632d234452ba37e60936c0e88eb -bucket myBucket| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| bucket | String | Yes |
- Rights: manage
- Verb: POST
Deregister an existing bucket from the specified environment. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/bucket/grant
curl https://ops.minusonedb.com/env/bucket/grant \
-d "env=24e27632d234452ba37e60936c0e88eb&arn=arn:aws:iam::123456789123456789:role/read-role" \
-H "m1-auth-token: $myToken"m1 ops env/bucket/grant -env 24e27632d234452ba37e60936c0e88eb -arn arn:aws:iam::123456789123456789:role/read-role| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| arn | String | Yes |
- Rights: manage
- Verb: POST
Grant read access to the environment bucket to a user's role external to the m1 AWS account. Try env/get to see what read roles have been granted. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/bucket/revoke
curl https://ops.minusonedb.com/env/bucket/revoke \
-d "env=24e27632d234452ba37e60936c0e88eb&arn=arn:aws:iam::123456789123456789:role/read-role" \
-H "m1-auth-token: $myToken"m1 ops env/bucket/revoke -env 24e27632d234452ba37e60936c0e88eb -arn arn:aws:iam::123456789123456789:role/read-role| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| arn | String | Yes |
- Rights: manage
- Verb: POST
Revoke read access to the environment bucket to a user's role external to the m1 AWS account. Try env/get to see what read roles have been granted. Note: Anywhere the environment id is passed into, the environment name could be used as well.
/env/outbound
curl https://ops.minusonedb.com/env/outbound \
-d "env=test-m1&enable=true" \
-H "m1-auth-token: $myToken"m1 ops env/outbound -env test-m1 -enable true| Parameter | Type | Required |
|---|---|---|
| env | String | Yes |
| enable | Boolean | Yes |
- Rights: manage
- Verb: POST
Enables or disables outbound internet connectivity for an environment's data processing servers. This is disabled by default but must be enabled to access data in GCS buckets.
Rights
Rights are case-sensitive strings associated with a specific account; a user may have access to many (or no) accounts with varying levels of access. The collection of rights is extensible for application-specific uses. The list below details all ops.minusonedb.com rights.
owner: user can delete the account or change payment information.
admin: user can manage users and assign rights.
view: user can view all account assets including environment names and metadata.
manage: user can manage environment assets including deploying or undeploying infrastructure as well as creating and destroying environments.
