security login role show-rest
Display the mapping between ONTAP REST APIs and CLI commands
Availability: This command is available to cluster administrators at the admin privilege level.
Description
The security login role show-rest
command displays ONTAP REST APIs and the CLI commands that they are mapped to.
Parameters
- {
[-fields <fieldname>,…]
-
If you specify the
-fields <fieldname>, …
parameter, the command output also includes the specified field or fields. You can use '-fields ?' to display the fields to specify. - |
[-instance ]
} -
If you specify the
-instance
parameter, the command displays detailed information about all fields. [-endpoint <text>]
- URI of the REST endpoint-
This parameter will filter the output to show CLI commands that match the provided REST endpoint.
[-commands <text>,…]
- CLI Command-
This parameter will filter the output to show the REST API or APIs that match the provided CLI command.
[-supported-operations <text>,…]
- Supported REST operations <GET,POST,PATCH,DELETE>-
This parameter filters the output to show REST APIs or CLI commands that match the provided REST operations <GET,POST,PATCH,DELETE>
Examples
The following command displays all the ONTAP REST APIs and their mapped CLI commands:
cluster1::> security login role show-rest REST Endpoint CLI Commands Supported Operations --------------------------- ------------------------------ -------------------- /application/applications application GET, PATCH, POST, DELETE /application/applications/$id/components/$id/metadata - GET, PATCH, POST, DELETE /application/applications/$id/metadata application metadata GET, PATCH, POST, DELETE /application/applications/{application.uuid}/components - GET /application/applications/{application.uuid}/components/{component.uuid}/snapshots - GET, POST, DELETE /application/applications/{application.uuid}/components/{component.uuid}/snapshots/{uuid}/restore - POST, DELETE /application/applications/{application.uuid}/snapshots - GET, POST, DELETE /application/applications/{application.uuid}/snapshots/{uuid}/restore - POST, DELETE /application/consistency-groups Press <space> to page down, <return> for next line, or 'q' to quit...
The following examples display all ONTAP REST APIs that are mapped to a specified CLI command:
cluster1::> security login role show-rest -commands statistics REST Endpoint CLI Commands Supported Operations --------------------------- ------------------------------ -------------------- /cluster/counter/tables statistics GET /cluster/counter/tables/{counter_table.name}/rows statistics GET 2 entries were displayed.
cluster1::> security login role show-rest -commands "network interface"* REST Endpoint CLI Commands Supported Operations --------------------------- ------------------------------ -------------------- /cluster/nodes cluster add-node, network interface create, storage aggregate auto-provision, system node, system node modify, system node show, system service-processor network modify GET, PATCH, POST, DELETE /network/fc/interfaces network interface create, network interface show, vserver fcp interface show GET, PATCH, POST, DELETE /network/fc/interfaces/{uuid}/metrics network interface show GET /network/ip/interfaces network interface, network interface create GET, PATCH, POST, DELETE /network/ip/interfaces/{uuid}/metrics network interface show GET /network/ip/service-policies network interface service-policy, network interface service-policy show GET, PATCH, POST, DELETE /svm/svms network interface create, network route create, vserver, vserver add-aggregates, vserver add-protocols, vserver cifs create, vserver create, vserver fcp create, vserver iscsi create, vserver nfs create, vserver nvme create, vserver object-store-server create, vserver remove-protocols, vserver services name-service dns create, vserver services name-service ldap client create, vserver services name-service nis-domain create, vserver services name-service ns-switch create, vserver show GET, PATCH, POST, DELETE 7 entries were displayed.
cluster1::> security login role show-rest -commands *"fcp"*"create" REST Endpoint CLI Commands Supported Operations --------------------------- ------------------------------ -------------------- /protocols/san/fcp/services vserver fcp create, vserver fcp show GET, PATCH, POST, DELETE /svm/svms network interface create, network route create, vserver, vserver add-aggregates, vserver add-protocols, vserver cifs create, vserver create, vserver fcp create, vserver iscsi create, vserver nfs create, vserver nvme create, vserver object-store-server create, vserver remove-protocols, vserver services name-service dns create, vserver services name-service ldap client create, vserver services name-service nis-domain create, vserver services name-service ns-switch create, vserver show GET, PATCH, POST, DELETE 2 entries were displayed.
The following examples display the CLI command that is mapped to a specified ONTAP REST API:
cluster1::> security login role show-rest -endpoint /cluster/metrocluster* REST Endpoint CLI Commands Supported Operations --------------------------- ------------------------------ -------------------- /cluster/metrocluster metrocluster configuration-settings connection connect, metrocluster configuration-settings dr-group create, metrocluster configuration-settings interface create, metrocluster configuration-settings mediator add, metrocluster configure, metrocluster show, storage aggregate create, storage aggregate mirror GET, PATCH, POST, DELETE /cluster/metrocluster/diagnostics metrocluster check show GET, POST, DELETE /cluster/metrocluster/dr-groups metrocluster configuration-settings dr-group create, metrocluster configuration-settings dr-group show GET, PATCH, POST, DELETE /cluster/metrocluster/interconnects metrocluster interconnect mirror show GET, PATCH /cluster/metrocluster/nodes metrocluster node show GET /cluster/metrocluster/operations metrocluster operation show GET /cluster/metrocluster/svms metrocluster vserver show GET 7 entries were displayed.
cluster1::> security login role show-rest -endpoint *cifs/session* REST Endpoint CLI Commands Supported Operations --------------------------- ------------------------------ -------------------- /protocols/cifs/session/files vserver cifs session file GET /protocols/cifs/session/files/$id/$id vserver cifs session file GET, DELETE /protocols/cifs/sessions vserver cifs session GET, POST, DELETE /protocols/cifs/sessions/$id/$id vserver cifs session GET, POST, DELETE 4 entries were displayed.