Feature Configuration REST API - v2

NEW IN RELEASE 149

The Feature Configuration REST API - v2 allows users with the System Administrator role,  or the Edit System Configuration and Users permission to enable/disable certain Nexus IQ Server features.

Methods supported:

  1. POST
  2. DELETE

Features supported:

The table below shows the features that can be enabled/disabled via this REST API. "Supported From" column indicates the Nexus IQ server release that supports the enabling/disabling of each feature using this REST API.

FeatureDefault ValueDescriptionSupported From

scan-pom-files-in-meta-inf-directory

Disabled

If enabled, pom.xml files within META-INF directories will be scanned.

149

scan-npm-dev-and-opt-dependencies

Disabled

If enabled, optional and devDependencies will be scanned for manifest and lock files.153

POST to Enable a Feature

To enable a feature, you can make a POST request to the following path:

For release 154 and later:

POST /api/v2/config/features/{feature}

Example:

curl -u admin:admin123 -X POST 'http://localhost:8070/api/v2/config/features/scan-pom-files-in-meta-inf-directory'

For release 153 and earlier:

POST /api/experimental/config/features/{feature}

Example:

curl -u admin:admin123 -X POST 'http://localhost:8070/api/experimental/config/features/scan-pom-files-in-meta-inf-directory'

The feature must match (case-sensitive) one of those from the table.

Response:

A successful request yields HTTP status code 204.

If an invalid feature is supplied, or the feature is already enabled, then the request yields a bad request response with HTTP status code 400.

DELETE to Disable a Feature

To disable a feature, you can make a DELETE request to the following path:

For release 154 and later:

DELETE /api/v2/config/features/{feature}

Example:

curl -u admin:admin123 -X DELETE 'http://localhost:8070/api/v2/config/features/scan-pom-files-in-meta-inf-directory'

For release 153 and earlier:

DELETE /api/experimental/config/features/{feature}

Example:

curl -u admin:admin123 -X DELETE 'http://localhost:8070/api/experimental/config/features/scan-pom-files-in-meta-inf-directory'

The feature must match (case-sensitive) one of those from the table.

Response:

A successful request yields HTTP status code 204.

If an invalid feature is supplied, or the feature is already disabled, then the request yields a bad request response with HTTP status code 400.