Skip to main content

diagrid apikey create

Create a new API Key

diagrid apikey create [flags]

Examples


# Create a new API Key with no expiration and Conductor editor role
diagrid apikeys create --name my-key --role diagrid:editor

# Create a new API Key with no expiration and Catalyst editor role
diagrid apikeys create --name my-key --role cra.diagrid:editor

# Create a new API Key with 24h expiration
diagrid apikeys create --name my-key --role diagrid:editor --duration 86400

Options

  -n, --name string    [Required] API Key name
-r, --role string [Required] API Key role (Conductor roles: diagrid:admin, diagrid:editor, diagrid:viewer) (Catalyst roles: cra.diagrid:admin, cra.diagrid:editor, cra.diagrid:viewer)
-d, --duration int API Key duration in seconds, it will expire and become invalid after the provided time. No expiration if not provided.
-h, --help help for create

SEE ALSO