Configuring migration options for DataPower API Gateway
If you are converting APIs to DataPower API Gateway, you can accept the default migration configuration or specify configuration parameters.
config.yml
file must be located in the same
directory as the migration utility. You can specify to use this file when the migration utility is
invoked using the apicm
command with the port-to-apigw
option, as
in the following
example. ./apicm archive:port-to-apigw <path> --use-config-file=true
If use
of the configuration file is not specified, the migration utility uses parameters specified on the
command line. If no parameters are specified, then the default parameters are used.Some of these port-to-apigw
configuration parameters depend
upon a specific DataPower implementation to function. See the information in the following table to
ensure that you have the correct version of DataPower for the parameters you want to use.
Parameter | Valid values | DataPower version required | Description |
---|---|---|---|
activity-log-policy |
activity-log_1.5.0, set-variable_2.0.0 |
DP 10.0.4.0+ | Defines how to process the v5 activity-log policy when the migration utility
rewrites the API assembly. The default value is activity-log_1.5.0 , which changes
the activity-log version to 1.5.0. When set to set-variable_2.0.0 , the migration
utility sets context variables based upon the value of the activity-log content and error-content
configuration values. |
chunked-uploads |
true / false The default value is |
For For |
If an If an |
client-id-header-override |
String. The string cannot contain spaces. Follow the guidelines for apiKey
name: .No default value. |
10.0.0.0+ |
Override the existing Example:
In this example, the
securityDefinitions property is changed from: to the following: Calls to this API must supply acme-foo:
<client-id> in the request header instead of the original X-IBM-Client-Id:
<client-id> . |
client-id-query-override |
String. The string cannot contain spaces. Follow the guidelines for apiKey
name: .No default value. |
10.0.0.0+ |
Override the existing Example:
In this example, the
securityDefinitions property is changed from: to the following: Calls to this API must supply
?acme-foo=<client-id> in the query parameter instead of the original
?client_id=<client-id> . |
client-secret-header-override |
String. The string cannot contain spaces. Follow the guidelines for apiKey
name: .No default value. |
10.0.0.0+ |
Override the existing Example:
In this example, the
securityDefinitions property is changed from: to the following: Calls to this API must supply acme-foo:
<client-secret> in the request header instead of the original
X-IBM-Client-Secret: <client-secret> . |
client-secret-query-override |
String. The string cannot contain spaces. Follow the guidelines for apiKey
name: .No default value. |
10.0.0.0+ |
Override the existing Example:
In this example, the
securityDefinitions property is changed from: to the following: Calls to this API must supply
?acme-foo=<client-secret> in the query parameter instead of the original
?client_secret=<client-secret> . |
copy-id-headers-to-message |
true / false The default value is |
10.0.1.1+, 10.0.2.0+ |
When set to |
custom-policies-scope |
catalog / global The default value is
|
10.0.0.0+ |
When set to When set to
Note: Potential conflicts between custom policies of the same name and version are resolved
according to the following rules:
|
deploy-policies |
Any combination of the following values: gatewayscript_1.0.0,if_1.5.0, invoke_1.5.0,
proxy_1.5.0,redact_1.5.0, switch_1.5.0, validate-usernametoken_1.0.0, xslt_1.0.0 The
default values are: |
For For For For |
Defines which backwards-compatible policies should be advertised by DataPower to API Manager. Note: Any legacy policies that are specified in the
config.yml file or by using the
apicm command must also be specified by using deploy-policies . If
these policies are not specified by using deploy-policies , an error is
returned. |
emulate-v4-plan-rate-limit |
true / false The default value is |
10.0.1.2+, 10.0.2.0+ |
Determines whether all APIs emulate the v4 plan rate limit. If set to |
enable-api-logging |
true / false The default value is |
10.0.0.0+ |
Log all changes that the migration utility makes when rewriting APIs. These changes are logged as comments in the API YAML file. |
enforce-required-params |
true / false The default value is |
10.0.1.1+, 10.0.2.0+ |
When set to |
gatewayscript-policy |
One of the following values: gatewayscript_1.0.0 ,
gatewayscript_2.0.0 The default value is
|
10.0.0.0+ |
Defines which gatewayscript policy the migration utility uses when rewriting the API assembly.
Specifying |
if-policy |
One of the following values: if_1.5.0 , switch_2.0.0 The
default value is |
For For |
Defines which
|
invoke-policy |
One of the following values: invoke_1.5.0 ,
invoke_2.0.0 The default value is |
10.0.0.0+ |
Defines which invoke policy the migration utility uses when rewriting the API assembly.
|
no-rename |
true / false The default value is |
10.0.0.0+ |
Defines whether to append the porting suffix to artifact file versions or names or within
artifacts. When set to A |
no-retitle |
true / false The default value is |
10.0.0.0+ |
Defines whether to append the porting suffix to the |
optimize-gws |
true / false The default value is |
10.0.0.0+ |
When set to Setting Note: Setting
optimize-gws to true can result in performance
enhancements. However, the modifications to gatewayscript policies by the migration utility can
cause problems. When using this setting, review all gatewayscript policy modifications after
migration. |
porting-suffix |
A string containing alphanumeric, dash, underscore and dot characters. The default value is
|
10.0.0.0+ | Defines the suffix to be used when renaming APIs, Products, OAuth Providers, and other ported
artifacts. The suffix is appended to the version on APIs, Products and other ported artifacts that
have versions, and onto the name for OAuth Providers and other ported artifacts that do not have
versions. If porting-suffix is not specified then a value of
-apigw will be used. The porting suffix can contain alphanumeric, dash, underscore
and dot characters. Prior to AMU 10.0.5.4 the porting suffix could not be overridden and
-apigw was appended to the name for all ported artifacts. |
proxy-policy |
One of the following values: proxy_1.5.0 ,
invoke_2.0.0 The default value is |
10.0.0.0+ |
Defines which proxy policy the migration utility uses when rewriting the API assembly.
|
redact-policy |
One of the following values: redact_1.5.0 ,
redact_2.0.0 The default value is |
10.0.3.0+ |
Defines which redact policy the migration utility uses when rewriting the API assembly.
Note: Starting in v10.0.5.8 we will no longer allow
redact_2.0.0 and the only allowable value will be redact
1.5.0 . |
repair-wsdl-apis |
true / false The default value is |
10.0.1.1+, 10.0.2.0+ |
If an API ported from V5 is created from WSDL, the WSDL is read and checked for accuracy. If
|
return-v5-responses |
true / false The default value is |
10.0.1.1+, 10.0.2.0+ |
When set to |
switch-policy |
switch_1.5.0 , switch_2.0.0 The default value is
|
For For |
Defines which switch policy the migration utility uses when rewriting the API assembly.
|
use-config-file |
true / false The default value is |
10.0.0.0+ |
Use the |
v5-request-headers |
true / false The default value is |
10.0.1.2+, 10.0.2.0+ |
When set to |
validate-usernametoken-policy |
validate-usernametoken_1.0.0 The default value is empty. |
10.0.1.3+, 10.0.2.0+ |
Defines whether or not to use the |
xslt-policy |
One of the following values: xslt_1.0.0 , xslt_2.0.0 The
default value is |
10.0.0.0+ |
Defines which gatewayscript policy the migration utility uses when rewriting the API assembly.
|
Example migration configurations
The following examples show configuration options using the config.yml
file or
the apicm
command.
- The following example uses the
config.yml
file to specify the migration configuration.custom-policies-scope: global emulate-v4-plan-rate-limit: false deploy-policies: - proxy_1.5.0 - redact_1.5.0 - invoke_1.5.0 - gatewayscript_1.0.0 rewrite-apis: enable-api-logging: false proxy-policy: proxy_1.5.0 redact-policy: redact_1.5.0 invoke-policy: invoke_1.5.0 xslt-policy: xslt_2.0.0 gatewayscript-policy: gatewayscript_1.0.0 if-policy: switch_2.0.0 switch-policy: switch_2.0.0 optimize-gws: false no-retitle: true
Use the
use-config-file
parameter when running theapicm
command to specify that theconfig.yml
file is used for migration configuration values../apicm archive:port-to-apigw <path> --use-config-file=true
- The following example uses the apicm command to specify the same settings as
in the previous
example.
./apicm archive:port-to-apigw <path> --custom-policies-scope: global --emulate-v4-plan-rate-limit: false --deploy-policies="proxy_1.5.0,redact_1.5.0,invoke_1.5.0,xslt_2.0.0,gatewayscript_1.0.0,switch_2.0.0" --enable-api-logging=false --proxy-policy="proxy_1.5.0" --redact-policy="redact_1.5.0" --invoke-policy="invoke_1.5.0" --xslt-policy="xslt_2.0.0" --gatewayscript-policy="gatewayscript_1.0.0" --if-policy="switch_2.0.0" --switch-policy="switch_2.0.0" --optimize-gws=true --no-retitle=true
- The following example uses the
apicm
command to specify that the default migration configuration values are used../apicm archive:port-to-apigw <path>