api-spec
The following operations can be performed on "api-spec":
add api spec
Adds a specfile to memory. After it is bound to a profile it can be used for validations. In a high-availability configuration, the path to spec file must be the same on the primary and the secondary appliance.
Arguments
name Name for the spec. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the spec is created.
The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my spec" or 'my spec').
file Name of and, optionally, path to the api spec file. The spec file should be present on the appliance's hard-disk drive or solid-state drive. Storing a spec file in any location other than the default might cause inconsistency in a high availability setup. /nsconfig/apispec/ is the default path.
type Input format of the spec file. The three formats supported by the appliance are: PROTO OAS/Swagger GRAPHQL
Possible values: PROTO, OAS, GRAPHQL Default value: PROTO
Example
1)add api spec example_spec01 -file /nsconfig/apispec/example_spec01.proto -type PROTO The above command loads a spec file of type PROTO.
rm api spec
Removes all the spec, or the specified spec, from the appliance. The spec is removed only if it is not referenced by an app firewall profile.
Synopsis
rm api spec <name> ...
Arguments
name Name of the spec to remove.
Example
1)rm api spec example_spec01 The above command removes the spec example_spec01 from the system.
show api spec
Displays information about all the spec configured on the appliance, or displays detailed information about the specified spec.
Arguments
name Name of the spec for which to show detailed information.
Output
file Name of and, optionally, path to the api spec file. The spec file should be present on the appliance's hard-disk drive or solid-state drive. Storing a spec file in any location other than the default might cause inconsistency in a high availability setup. /nsconfig/apispec/ is the default path.
type Input format of the spec file. The three formats supported by the appliance are: PROTO OAS/Swagger GRAPHQL
specMethod API method used for display purposes
specEndpoint API endpoint (could be GRPC service, REST path) used for display purposes
specOptionMethod GRPC API option method: REST way to reach GRPC Service. One per service/method combination
specOptionEndpoint GRPC API option endpoint: REST way to reach GRPC Service. One per service/method combination
devno count stateflag
Example
-
An example of the output of the show api spec command is shown below: 2 configured specs: 1)Name: example_spec01 File: example_spec01.proto Type: PROTO 2)Name: example_spec02 File: example_spec02.oas Type: OAS
-
An example of the output of the show api spec example_spec01 command is shown below: Name: example_spec01 File: example_spec01.proto Type: PROTO
-
GRPS Method: SayHello GRPC Service: Greeter
update api spec
Updates the api spec with latest specfile. In a high availability configuration, the path to the specfile must be the same on the primary and secondary nodes.
Arguments
name Name for the spec. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the spec is created.
The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my spec" or 'my spec').
file Name of and, optionally, path to the api spec file. The spec file should be present on the appliance's hard-disk drive or solid-state drive. Storing a spec file in any location other than the default might cause inconsistency in a high availability setup. /nsconfig/apispec/ is the default path.
type Input format of the spec file. The three formats supported by the appliance are: PROTO OAS/Swagger GRAPHQL
Possible values: PROTO, OAS, GRAPHQL Default value: PROTO
Example
1)update api spec example_spec01 -file /nsconfig/apispec/example_spec01.proto -type PROTO The above command loads a spec file of type PROTO.