API operation commands

API operation mode provides the commands to create or modify an API operation.

To enter API operation mode, use the global api-operation command. To delete an API operation, use the no api-operation command.

While in this mode, use the commands in the following table to define the API operation.

  • To view the current configuration, use the show command.
  • To restore default values, use the reset command.
  • To exit this configuration mode without saving changes to the running configuration, use the cancel command.
  • To exit this configuration mode and save changes to the running configuration, use the exit command.
Table 1. API operation commands
Command Purpose
admin-state This command sets the administrative state for the configuration.
consume This command specifies the MIME type that the API operation can consume.
method This command specifies the HTTP method to access the resource.
operation-id This command specifies the ID of the operation.
parameter This command defines a parameter for an API operation.
produce This command specifies the MIME type that the API operation can produce.
remove-consume This command specifies whether to remove the root consume declaration that is defined for the API.
remove-security This command specifies whether to remove the root security declaration that is defined for the API.
request-schema This command specifies the name of the API schema that describes the valid request messages for the API operation.
response-schema This command specifies the name of an API schema and the HTTP status code that describes possible response messages that are returned for the API operation.
security This command assigns an API security requirement to the API operation.
soap-action This command specifies the value of the SOAPAction header to send to the target web service.
soap-element-name This command specifies the name of the root element in SOAP Body of a SOAP request.
summary This command specifies the brief, descriptive summary for the object instance.