Skip to main content
Version: v2

JSON Output

The odo commands that output some content generally accept a -o json flag to output this content in a JSON format, suitable for other programs to parse this output more easily.

The output structure is similar to Kubernetes resources, with kind, apiVersion, metadata ,spec and status fields.

List commands return a List resource, containing an items (or similar) field listing the items of the list, each item being also similar to Kubernetes resources.

Delete commands return a Status resource; see the Status Kubernetes resource.

Other commands return a resource associated with the command (Application, Storage', URL, etc).

The exhaustive list of commands accepting the -o json flag is currently:

commandsKind (version)Kind (version) of list itemsComplete content?
odo application describeApplication (odo.dev/v1alpha1)n/ano
odo application listList (odo.dev/v1alpha1)Application (odo.dev/v1alpha1)?
odo catalog list componentsList (odo.dev/v1alpha1)missingyes
odo catalog list servicesList (odo.dev/v1alpha1)ClusterServiceVersion (operators.coreos.com/v1alpha1)?
odo catalog describe componentmissingn/ayes
odo catalog describe serviceCRDDescription (odo.dev/v1alpha1)n/ayes
odo component createComponent (odo.dev/v1alpha1)n/ayes
odo component describeComponent (odo.dev/v1alpha1)n/ayes
odo component listList (odo.dev/v1alpha1)Component (odo.dev/v1alpha1)yes
odo config viewDevfileConfiguration (odo.dev/v1alpha1)n/ayes
odo debug infoOdoDebugInfo (odo.dev/v1alpha1)n/ayes
odo env viewEnvInfo (odo.dev/v1alpha1)n/ayes
odo preference viewPreferenceList (odo.dev/v1alpha1)n/ayes
odo project createProject (odo.dev/v1alpha1)n/ayes
odo project deleteStatus (v1)n/ayes
odo project getProject (odo.dev/v1alpha1)n/ayes
odo project listList (odo.dev/v1alpha1)Project (odo.dev/v1alpha1)yes
odo registry listList (odo.dev/v1alpha1)missingyes
odo service createServicen/ayes
odo service describeServicen/ayes
odo service listList (odo.dev/v1alpha1)Serviceyes
odo storage createStorage (odo.dev/v1alpha1)n/ayes
odo storage deleteStatus (v1)n/ayes
odo storage listList (odo.dev/v1alpha1)Storage (odo.dev/v1alpha1)yes
odo url listList (odo.dev/v1alpha1)URL (odo.dev/v1alpha1)yes