contxt¶
Contxt CLI
Usage:
contxt [OPTIONS] COMMAND [ARGS]...
Options:
--env [production|staging] Environment for all API's
--org TEXT Organization slug
-v, --verbose Increase verbosity
-V, --version Show the version and exit.
--help Show this message and exit.
auth¶
Authenticate with Contxt.
Usage:
contxt auth [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
login¶
Login to Contxt.
Usage:
contxt auth login [OPTIONS]
Options:
--help Show this message and exit.
logout¶
Logout of Contxt.
Usage:
contxt auth logout [OPTIONS]
Options:
--help Show this message and exit.
token¶
Fetch an access token for an API.
Usage:
contxt auth token [OPTIONS] AUDIENCE
Options:
--help Show this message and exit.
clusters¶
Clusters
Usage:
contxt clusters [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
get¶
Get clusters
Usage:
contxt clusters get [OPTIONS] [CLUSTER_SLUG]
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
login¶
Get cluster config
Usage:
contxt clusters login [OPTIONS] SLUG
Options:
--help Show this message and exit.
register¶
Usage:
contxt clusters register [OPTIONS]
Options:
--host TEXT
--slug TEXT The slugified name you would like to use for
this cluster. You will need to reference
this in other commands so it's ideal to make
this value easy to remember
--description TEXT Information about what this cluster is for
and what environment it belongs to
--environment-type [production|nonproduction|blended]
--certificate-authority TEXT Base64 encoded certificate authority (CA)
for the cluster
--help Show this message and exit.
update¶
Update a cluster
Usage:
contxt clusters update [OPTIONS] SLUG
Options:
--host TEXT
--description TEXT Information about what this cluster is for
and what environment it belongs to
--environment-type [production|nonproduction|blended]
--certificate-authority TEXT
--help Show this message and exit.
edge-nodes¶
Edge Nodes.
Usage:
contxt edge-nodes [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
get¶
Get edge nodes for a project
Usage:
contxt edge-nodes get [OPTIONS] ORG_ID PROJECT_ID
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
ems¶
Energy Management System.
Usage:
contxt ems [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
export¶
Export data for facilities
Usage:
contxt ems export [OPTIONS] [FACILITY_IDS]...
Options:
--include TEXT Data to export
--start [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
Start time
--end [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
End time
--output DIRECTORY Path for output
--help Show this message and exit.
main-data¶
Get main service data
Usage:
contxt ems main-data [OPTIONS] FACILITY_ID
Options:
--resource-type RESOURCETYPE Resource type
--start [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
Start time [required]
--end [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
End time [required]
--help Show this message and exit.
mains¶
Get main services
Usage:
contxt ems mains [OPTIONS] FACILITY_ID
Options:
--resource-type RESOURCETYPE Resource type
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
spend¶
Get utility spend
Usage:
contxt ems spend [OPTIONS] FACILITY_ID
Options:
--resource-type RESOURCETYPE Resource type
--start [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
Start time
--end [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
End time
--interval [daily|monthly] Time interval
--help Show this message and exit.
usage¶
Get utility usage
Usage:
contxt ems usage [OPTIONS] FACILITY_ID
Options:
--resource-type RESOURCETYPE Resource type
--start [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
Start time
--end [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
End time
--interval [daily|monthly] Time interval
--help Show this message and exit.
facilities¶
Facilities.
Usage:
contxt facilities [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
create¶
Create facilities from a CSV file, containing the columns:
- name: string
- timezone_name: IANA timezone database name (ex: America/New_York)
Usage:
contxt facilities create [OPTIONS]
Options:
--input FILENAME CSV of facilities to create [required]
--help Show this message and exit.
get¶
Get facilities
Usage:
contxt facilities get [OPTIONS]
Options:
--help Show this message and exit.
iot¶
Internet-of-Things.
Usage:
contxt iot [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
categories¶
IoT Grouping Categories
Usage:
contxt iot categories [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
get¶
Get categories for facility
Usage:
contxt iot categories get [OPTIONS] FACILITY_ID
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
data¶
IoT Field Data
Usage:
contxt iot data [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
delete¶
Delete a data point
Usage:
contxt iot data delete [OPTIONS]
Options:
--output-id INTEGER Output ID to delete from [required]
--field-human-name TEXT The field to delete from. Ex: power.demand,
power.usage [required]
--interval [0|60|900|3600] Time interval [required]
--time [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
The timestamp of the datapoint. Ex:
2020-07-21T05:31:00Z [required]
--help Show this message and exit.
get¶
Get field data
Usage:
contxt iot data get [OPTIONS] FEED_ID
Options:
--start [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
Start time
--end [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
End time
--interval [0|60|900|3600] Time interval
--output FILE Path for output
--help Show this message and exit.
feeds¶
Get feeds
Usage:
contxt iot feeds [OPTIONS]
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--facility_id INTEGER Filter on Facility ID
--help Show this message and exit.
fields¶
IoT Fields
Usage:
contxt iot fields [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
create¶
Create (provision) fields
Usage:
contxt iot fields create [OPTIONS] FEED_KEY
Options:
--input FILENAME CSV of fields to create [required]
--help Show this message and exit.
delete¶
Delete (unprovision) fields
Usage:
contxt iot fields delete [OPTIONS] [FIELD_ID]...
Options:
--help Show this message and exit.
get¶
Get fields
Usage:
contxt iot fields get [OPTIONS] FEED_KEY
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
unprovisioned¶
Get unprovisioned fields
Usage:
contxt iot fields unprovisioned [OPTIONS] FEED_KEY
Options:
--output FILENAME Path for output
--help Show this message and exit.
groupings¶
IoT Field Groupings
Usage:
contxt iot groupings [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
add-field¶
Add field to grouping
Usage:
contxt iot groupings add-field [OPTIONS] GROUPING_ID FIELD_ID
Options:
--help Show this message and exit.
create¶
Create a new grouping
Usage:
contxt iot groupings create [OPTIONS] FACILITY_ID
Options:
--label TEXT [required]
--description TEXT [required]
--is-public BOOLEAN [required]
--field-category-id TEXT [required]
--help Show this message and exit.
delete¶
Delete field groupings (does not delete fields within grouping)
Usage:
contxt iot groupings delete [OPTIONS] [GROUPING_ID]...
Options:
--help Show this message and exit.
get¶
Get field groupings
Usage:
contxt iot groupings get [OPTIONS] FACILITY_ID
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
metrics¶
Metrics.
Usage:
contxt metrics [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
data¶
Get metric data
Usage:
contxt metrics data [OPTIONS]
Options:
--facility-id TEXT Facility ID [required]
--label TEXT Facility ID [required]
--start [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
[required]
--help Show this message and exit.
labels¶
Get Metric Labels
Usage:
contxt metrics labels [OPTIONS]
Options:
--help Show this message and exit.
orgs¶
Organizations.
Usage:
contxt orgs [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
get¶
Get organizations
Usage:
contxt orgs get [OPTIONS]
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
project-envs¶
Projects Environments.
Usage:
contxt project-envs [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
create¶
Create a project environment
Usage:
contxt project-envs create [OPTIONS]
Options:
--project-slug TEXT
--name TEXT
--slug TEXT
--description TEXT
--type [production|nonproduction]
--cluster-id TEXT
--deployment-strategy [contxt-managed|self-managed]
--help Show this message and exit.
delete¶
Delete a project environment
Usage:
contxt project-envs delete [OPTIONS] PROJECT_SLUG SLUG
Options:
--help Show this message and exit.
get¶
Get project environment(s)
Usage:
contxt project-envs get [OPTIONS] PROJECT_SLUG
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
update¶
Update a project environment
Usage:
contxt project-envs update [OPTIONS] PROJECT_SLUG SLUG
Options:
--name TEXT
--slug TEXT
--type TEXT
--cluster-id TEXT
--deployment-strategy TEXT
--description TEXT
--help Show this message and exit.
projects¶
Projects.
Usage:
contxt projects [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
create¶
Create a project
Usage:
contxt projects create [OPTIONS]
Options:
--name TEXT
--slug TEXT
--type [Core|Custom]
--description TEXT
--owner-role-id TEXT
--help Show this message and exit.
delete¶
Delete a project
Usage:
contxt projects delete [OPTIONS] [SLUG]
Options:
--help Show this message and exit.
get¶
Get project(s)
Usage:
contxt projects get [OPTIONS] [SLUG]
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
update¶
Update a project
Usage:
contxt projects update [OPTIONS] SLUG
Options:
--name TEXT
--slug TEXT
--type TEXT
--description TEXT
--help Show this message and exit.
service-instances¶
Service Instances.
Usage:
contxt service-instances [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
create¶
Create service instances
Usage:
contxt service-instances create [OPTIONS]
Options:
--service-id TEXT
--project-environment-id TEXT
--name TEXT
--slug TEXT
--descriptor TEXT
--service-type [API|Application|Worker]
--help Show this message and exit.
delete¶
Delete service instance
Usage:
contxt service-instances delete [OPTIONS] ID
Options:
--help Show this message and exit.
get¶
Get service instance(s)
Usage:
contxt service-instances get [OPTIONS]
Options:
--service-id TEXT
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.
services¶
Services.
Usage:
contxt services [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
create¶
Create service
Usage:
contxt services create [OPTIONS]
Options:
--project-id TEXT
--slug TEXT
--type [API|Application|Worker]
--deployment-strategy [self-managed|contxt-managed|unmanaged]
--help Show this message and exit.
delete¶
Delete service
Usage:
contxt services delete [OPTIONS] ID
Options:
--help Show this message and exit.
get¶
Get service(s)
Usage:
contxt services get [OPTIONS] [ID]
Options:
--fields TEXT Comma-delimited list of fields to return
--sort TEXT Field to sort by
--help Show this message and exit.