Interceptor Creation (ssd api-management create interceptor)

The ssd api-management create interceptor command allows you to create an interceptor on Sensedia CLI.

Note You can use the ssd api-management create interceptor command or its shortened version ssd apim create interceptor.
Tip

For more specific information, refer to the documentation about interceptors on Sensedia API Platform.

Usage

The ssd api-management create interceptor command can be followed by flags with their respective arguments:

ssd api-management create interceptor [flags]

If no flag is specified, the interactive mode will be activated.

# Creates a JAVA interceptor
  $ ssd (api-management | apim) create interceptor -n “Interceptor Name” -t “JAVA” -f /home/User/Documents/file.jar

# Creates a JAVASCRIPT interceptor
  $ ssd (api-management | apim) create interceptor -n “Interceptor Name” -t “JAVASCRIPT” -f /home/User/Documents/file.js

# Creates an interceptor with "ME" visibility type
  $ ssd (api-management | apim) create interceptor --name “Interceptor Name” --type “JAVA” --file  /home/User/Documents/file.jar  --visibility-type “ME”

# Creates an interceptor with "TEAM" visibility type while also passing users
  $ ssd (api-management | apim) create interceptor --name “Interceptor Name” --type “JAVA” --file  /home/User/Documents/file.jar  --visibility-type “TEAM ” --visibility-team “TEAM NAME“ --visibility-users "USER NAME 1, USER NAME 2"

# Creates an interceptor while also passing tags
  $ ssd (api-management | apim) create interceptor --name “Interceptor Name” --type “JAVASCRIPT” --file  /home/User/Documents/file.js  --tags “Security,Traffic Management” --abort-request-fail

Available flags

Flag

Type

Description

-a, --abort-request-fail

When this option is checked, the gateway does not forward the request to the backend in case of an error, but immediately returns an error response to the client.

-f, --file

string

It requires the base path for the file to be uploaded.

-h, --help

Displays help for the command.

-n, --name

string

Interceptor’s name.

--tags

string

Interceptor’s tags.

-t, --type

string

Interceptor’s type. The available ones are 'JAVA' and 'JAVASCRIPT'.

--visibility-team

string

The team name for an interceptor with a team visibility.

--visibility-type

string

Visibility type of the interceptor to be created. The available ones are 'ORGANIZATION', 'ME' and 'TEAM' (default: "ORGANIZATION").

--visibility-users

string

User names for an interceptor with a user visibility.

Global Flags

Flag Type Description

-c, --config

string

Configuration file (default: $HOME/.sensedia/config.json)

--profile

string

The configuration profile you want to use (default: "default")

--verbose

Lists all requests made by the command. It is possible to store this information in a TXT file instead of displaying it on the terminal. E.g.: $ ssd (api-management | apim) list apis --verbose 2> log.txt

Note It is possible to create an interceptor using a .yaml file with the Declarative Mode.
Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]