help.sonatype.com
Open in
urlscan Pro
54.198.255.127
Public Scan
Submitted URL: http://gshlink.sonatype.com/ls/click?upn=ayISGDY8ZbxDpIDguGGHQ2UzCR-2F7coOrLvs-2Bjzga3xpbUUJXguPJpqgPi9Y3Fr3Ai9e99IbRIjY7MhV...
Effective URL: https://help.sonatype.com/iqserver/automating/rest-apis/firewall-rest-api---v2
Submission: On November 13 via api from ES — Scanned from ES
Effective URL: https://help.sonatype.com/iqserver/automating/rest-apis/firewall-rest-api---v2
Submission: On November 13 via api from ES — Scanned from ES
Form analysis
0 forms found in the DOMText Content
My Sonatype Community Forum Exchange Ideas Office Hours Learn Courses Guides Learning Paths Videos Support Knowledge Base Documentation Resources SSC Maturity Survey STEPP Assessment Hosted Workshops Labs Nexus IQ Server * Getting Started * Quickstart Guides * Lifecycle Best Practices * Product Information * Installing * Configuring * Managing * Reporting * Automating * REST APIs * Accessing REST APIs via Reverse Proxy Authentication * Advanced Search REST API - v2 * Application Categories REST API - v2 * Application REST API - v2 * Atlassian Crowd REST API - v2 * Authorization Configuration (aka Role Membership) REST API - v2 * Component Claim REST API - v2 * Component Details REST API - v2 * Component Evaluation REST APIs - v2 * Component Labels REST API - v2 * Component Remediation REST API - v2 * Component Search REST APIs - v2 * Components in Quarantine REST API - v2 * Component Versions REST API - v2 * Configuration REST API - v2 * Cross-Stage Policy Violation REST API - v2 * CycloneDx REST API - v2 * Data Retention Policy REST API - v2 * Experimental - Repository Results View REST API * Experimental - Vulnerability Analysis Details (VEX) REST API * Feature Configuration REST API - v2 * Firewall REST API - v2 * HTTP Proxy Server Configuration REST API - v2 * JIRA Configuration REST API - v2 * License Legal REST API - v2 * Mail REST API - v2 * Manifest Evaluation REST API - v2 * Organizations REST API - v2 * Policy Violation REST API - v2 * Policy Waiver REST API - v2 * Product License REST API - v2 * Promote Scan REST API - v2 * Release Component from Quarantine REST API - v2 * Report-related REST APIs - v2 * Reverse Proxy Authentication Configuration REST API - v2 * Role REST API - v2 * SAML REST API - v2 * Security Vulnerability Override API - v2 * Source Control Configuration REST API - v2 * Source Control Evaluation REST API - v2 * Source Control REST API - v2 * SPDX REST API - v2 * Success Metrics Data REST API - v2 * Third-Party Scan REST API - v2 * User REST API - v2 * User Token REST API - v2 * Vulnerability Custom Attributes REST API - experimental * Vulnerability Details REST API - v2 * Vulnerability Group REST API - experimental * IQ Server Webhooks * Experimental APIs * Analysis * Integrations -------------------------------------------------------------------------------- Products * Sonatype Lifecycle * Sonatype Repository Firewall * Sonatype Nexus Repository 3 * Sonatype Nexus Repository 2 * Sonatype Container * Sonatype Lifecycle Cloud -------------------------------------------------------------------------------- My Sonatype Forum Exchange Ideas Office Hours Courses Guides Learning Paths Videos Knowledge Base Documentation SSC Maturity Survey STEPP Assessment Hosted Workshops -------------------------------------------------------------------------------- Who is Sonatype? [enter] for full results Switch to another product Sonatype Lifecycle Sonatype Repository Firewall Sonatype Nexus Repository 3 Sonatype Nexus Repository 2 Sonatype Container Sonatype Lifecycle Cloud Nexus IQ Server * Getting Started * Quickstart Guides * Lifecycle Best Practices * Product Information * Installing * Configuring * Managing * Reporting * Automating * REST APIs * Accessing REST APIs via Reverse Proxy Authentication * Advanced Search REST API - v2 * Application Categories REST API - v2 * Application REST API - v2 * Atlassian Crowd REST API - v2 * Authorization Configuration (aka Role Membership) REST API - v2 * Component Claim REST API - v2 * Component Details REST API - v2 * Component Evaluation REST APIs - v2 * Component Labels REST API - v2 * Component Remediation REST API - v2 * Component Search REST APIs - v2 * Components in Quarantine REST API - v2 * Component Versions REST API - v2 * Configuration REST API - v2 * Cross-Stage Policy Violation REST API - v2 * CycloneDx REST API - v2 * Data Retention Policy REST API - v2 * Experimental - Repository Results View REST API * Experimental - Vulnerability Analysis Details (VEX) REST API * Feature Configuration REST API - v2 * Firewall REST API - v2 * HTTP Proxy Server Configuration REST API - v2 * JIRA Configuration REST API - v2 * License Legal REST API - v2 * Mail REST API - v2 * Manifest Evaluation REST API - v2 * Organizations REST API - v2 * Policy Violation REST API - v2 * Policy Waiver REST API - v2 * Product License REST API - v2 * Promote Scan REST API - v2 * Release Component from Quarantine REST API - v2 * Report-related REST APIs - v2 * Reverse Proxy Authentication Configuration REST API - v2 * Role REST API - v2 * SAML REST API - v2 * Security Vulnerability Override API - v2 * Source Control Configuration REST API - v2 * Source Control Evaluation REST API - v2 * Source Control REST API - v2 * SPDX REST API - v2 * Success Metrics Data REST API - v2 * Third-Party Scan REST API - v2 * User REST API - v2 * User Token REST API - v2 * Vulnerability Custom Attributes REST API - experimental * Vulnerability Details REST API - v2 * Vulnerability Group REST API - experimental * IQ Server Webhooks * Experimental APIs * Analysis * Integrations We're Updating Our Product Names and Logos As we roll out our updated Sonatype brand, you will see product names and logos begin to change across My Sonatype. You may notice slight product name and logo variations—some new, some old—across resources as we complete these updates. Learn More -------------------------------------------------------------------------------- * Nexus IQ Server * Automating * REST APIs * Firewall REST API - v2 FIREWALL REST API - V2 REQUIREMENTS * Only applicable with the Firewall license GET AUTO-RELEASED FROM QUARANTINE SUMMARY NEXT-GEN FIREWALL Issue a GET request for a summary of auto-released from quarantine components. GET /api/v2/firewall/releaseQuarantine/summary Example command curl -u admin:admin123 http://localhost:8070/api/v2/firewall/releaseQuarantine/summary Example JSON response { "autoReleaseQuarantineCountMTD": 3, "autoReleaseQuarantineCountYTD": 120 } ItemDescriptionautoReleaseQuarantineCountMTDThe number of auto-released from quarantine components from the start of the current month to the current dateautoReleaseQuarantineCountYTDThe number of auto-released from quarantine components from the start of the current year to the current date GET QUARANTINED COMPONENTS SUMMARY Issue a GET request for a summary of quarantined components. GET /api/v2/firewall/quarantine/summary Example command curl -u admin:admin123 http://localhost:8070/api/v2/firewall/quarantine/summary Example JSON response { "repositoryCount": 2, "quarantineEnabledRepositoryCount": 2, "quarantineEnabled": true, "totalComponentCount": 25, "quarantinedComponentCount": 0 } Item Description repositoryCountThe total number of repositoriesquarantineEnabledRepositoryCountThe total number of repositories with the quarantine capability enabledquarantineEnabledThe true if any repository has the quarantine capability enabled, false otherwisetotalComponentCountThe total number of components across all repositoriesquarantinedComponentCountThe total number of quarantined components GET AUTO-RELEASED FROM QUARANTINE CONFIG NEXT-GEN FIREWALL Issue a GET request for a list of policy condition types that are configurable for auto-release from quarantine and whether they have auto-release from quarantine capability turned on or not. GET /api/v2/firewall/releaseQuarantine/configuration Example command curl -u admin:admin123 http://localhost:8070/api/v2/firewall/releaseQuarantine/configuration Example JSON response [ { "id": "IntegrityRating", "name": "Integrity Rating", "autoReleaseQuarantineEnabled": true }, { "id": "License", "name": "License", "autoReleaseQuarantineEnabled": true }, { "id": "License Threat Group", "name": "License Threat Group", "autoReleaseQuarantineEnabled": true }, { "id": "SecurityVulnerabilitySeverity", "name": "Security Vulnerability Severity", "autoReleaseQuarantineEnabled": true }, { "id": "SecurityVulnerabilityCategory", "name": "Security Vulnerability Category", "autoReleaseQuarantineEnabled": true } ] PUT TO UPDATE AUTO-RELEASED FROM QUARANTINE CONFIG NEXT-GEN FIREWALL You can enable or disable the auto-release from quarantine capability on some or all of the policy condition types that are configurable for auto-release from quarantine by issuing the PUT request: PUT /api/v2/firewall/releaseQuarantine/configuration You will also need to include JSON data specifying the policy condition types that need to be updated. For example: [ { "id": "IntegrityRating", "autoReleaseQuarantineEnabled": true }, { "id": "License", "autoReleaseQuarantineEnabled": false } ] The above request only enables auto-release from quarantine capability on the Integrity Rating policy condition type and disables it for the License policy condition type. Other policy condition types not part of the JSON body are not updated. Example command curl -u admin:admin123 -X PUT -H "Content-Type: application/json" -d '[{"id":"IntegrityRating","name":"Integrity Rating","autoReleaseQuarantineEnabled":true},{"id":"License","name":"License","autoReleaseQuarantineEnabled":false}]' http://localhost:8070/api/v2/firewall/releaseQuarantine/configuration Example JSON response [ { "id": "IntegrityRating", "name": "Integrity Rating", "autoReleaseQuarantineEnabled": true }, { "id": "License", "name": "License", "autoReleaseQuarantineEnabled": false }, { "id": "License Threat Group", "name": "License Threat Group", "autoReleaseQuarantineEnabled": true }, { "id": "SecurityVulnerabilitySeverity", "name": "Security Vulnerability Severity", "autoReleaseQuarantineEnabled": true }, { "id": "SecurityVulnerabilityCategory", "name": "Security Vulnerability Category", "autoReleaseQuarantineEnabled": true } ] GET LIST OF AUTO-RELEASED FROM QUARANTINE COMPONENTS NEXT-GEN FIREWALL Issue a GET request to get a summary of auto-released from quarantine components. GET /api/v2/firewall/components/autoReleasedFromQuarantine?page=1&pageSize=10&policyId=384b7857d9b5424d91e00a0b945e3ec8&componentName=t&sortBy=releaseQuarantineTime&asc=true Query ParameterDescriptionOptionalDefault ValuepageThe pagination page number. The minimum allowed page number is 1.Yes1pageSizeThe maximum number of records to return per page. The value should be between 1 and 10000.Yes10policyIdWhen provided, the API returns only the components that have a policy violation that causes quarantine (fail action) against the policy with this ID.Yes componentName RELEASE 160 When provided, the API returns only the components with display names that contain (case-insensitively) the value of this parameter. Yes sortBy The field the records to be sorted by. For now, the API only supports sorting by releaseQuarantineTime and quarantineTime. Quarantined components can only be sorted by quarantineTime. Yes Auto-Released from Quarantine Components: releaseQuarantineTime Quarantined Components: quarantineTime asc A boolean value indicates the order of sorting. true indicates that the records will be sorted in ascending order, false indicates they will be sorted in descending order. Yestrue Example command curl -u admin:admin123 http://localhost:8070/api/v2/firewall/components/autoReleasedFromQuarantine?page=1&pageSize=10&policyId=384b7857d9b5424d91e00a0b945e3ec8&componentName=t&sortBy=releaseQuarantineTime&asc=true Example JSON response { "total": 2, "page": 1, "pageSize": 10, "pageCount": 1, "results": [ { "displayName": "1_test : 0.0.0", "repository": "npm_proxy", "quarantineDate": "2021-03-24T17:36:34.612+0000", "dateCleared": "2021-03-24T18:53:45.588+0000", "quarantinePolicyViolations": [], "componentIdentifier": { "format": "npm", "coordinates": { "packageId": "1_test", "version": "0.0.0" } }, "pathname": "1_test/-/1_test-0.0.0.tgz", "hash": "2cfd634fae225311e3b6", "matchState": "exact", "repositoryId": "298bf707fd4f4323b7a0200b8dddd201", "quarantined": false }, { "displayName": "rc-util : 5.9.5", "repository": "npm_proxy", "quarantineDate": "2021-03-24T14:45:02.567+0000", "dateCleared": "2021-03-24T18:53:46.115+0000", "quarantinePolicyViolations": [], "componentIdentifier": { "format": "npm", "coordinates": { "packageId": "rc-util", "version": "1.2.0" } }, "pathname": "rc-util/-/rc-util-5.9.5.tgz", "hash": "b3e3c46f8a404334a2b3a5633d4f0be7", "matchState": "exact", "repositoryId": "298bf707fd4f4323b7a0200b8dddd201", "quarantined": false } ] } ItemDescriptiontotalTotal number of records this query can return across all pagespagePage number specified on the querypageSizePage size specified on the querypageCountTotal number of pages this query can returndisplayNameName of the component and versionrepositoryRepository where the component is installedquarantineDateThe date and time when the component was quarantineddateClearedThe date and time when the component was released from quarantine.quarantinePolicyViolations Policy violations that caused this component to be quarantined. This will be empty for components automatically released from quarantine. Refer to Policy Violation REST API - v2 for more details on the JSON structure. componentIdentifierThe format and coordinates for the claimed component.pathnameThe component path in the repository.hashThe component hash.matchStateVerify if the comparison of a component to known components is or is not a match in one of the following ways: Exact, Similar, or Unknown.repositoryIdThe repository ID where the component is installed.quarantinedWhether the component is quarantined or not. GET LIST OF QUARANTINED COMPONENTS Issue a GET request to get a summary of auto-released from quarantine components GET /api/v2/firewall/components/quarantined?page=1&pageSize=10&policyId=384b7857d9b5424d91e00a0b945e3ec8&componentName=add&sortBy=releaseQuarantineTime&asc=true Example command curl -u admin:admin123 http://localhost:8070/api/v2/firewall/components/quarantined?page=1&pageSize=10&policyId=384b7857d9b5424d91e00a0b945e3ec8&componentName=add&sortBy=quarantineTime&asc=true Example JSON response { "total": 1, "page": 1, "pageSize": 10, "pageCount": 1, "results": [ { "displayName": "add-fedops : 0.0.0", "repository": "npm_proxy", "quarantineDate": "2021-03-29T14:43:51.477+0000", "dateCleared": null, "quarantinePolicyViolations": [ { "policyId": "384b7857d9b5424d91e00a0b945e3ec8", "policyName": "Integrity-Rating", "policyViolationId": "974d9e6cd7924ecdb622f9f7cef47510", "threatLevel": 9, "constraintViolations": [ { "constraintId": "f03a3a2abdf94703a019e37b8c5cdc16", "constraintName": "Suspicious integrity rating", "reasons": [ { "reason": "Integrity Rating was Suspicious", "reference": null } ] } ] } ], "componentIdentifier": { "format": "npm", "coordinates": { "packageId": "add-fedops", "version": "0.0.0" } }, "pathname": "add-fedops/-/add-fedops-0.0.0.tgz", "hash": "b1b6ea3b7e4aa4f49250", "matchState": "exact", "repositoryId": "298bf707fd4f4323b7a0200b8dddd201", "quarantined": true } ] } PUT CONFIGURE ANONYMOUS ACCESS FOR THE QUARANTINED COMPONENT VIEW Issue a PUT request to enable or disable anonymous access for the Quarantined Component View * Anonymous access to the Quarantined Component View is enabled by default PUT /api/v2/firewall/quarantinedComponentView/configuration/anonymousAccess/false Example command curl -u admin:admin123 -X PUT http://localhost:8070/api/v2/firewall/quarantinedComponentView/configuration/anonymousAccess/false GET REPOSITORY MANAGER CONFIGURATIONS RELEASE 168 Issue a GET request to get the configuration for all configured repository managers. * A 200 response is returned when successful GET /api/v2/firewall/repositoryManagers Example command curl -u admin:admin123 -X GET "http://localhost:8070/api/v2/firewall/repositoryManagers" Example JSON response { "repositoryManagers": [ { "id": "02bafbc10b3545eeb949db5b248df2a8", "name": null, "instanceId": "060BCE87-FF88120D-15BE693B-15B5880C-C5B80470", "productName": "Nexus", "productVersion": "3.60.0" } ] } ADD REPOSITORY MANAGER CONFIGURATION RELEASE 169 Issue a POST request to add a repository manager: POST /api/v2/firewall/repositoryManagers and include the json data specifiying the repository manager to be added: { "name": "My Repository Manager", "instanceId": "060BCE87-FF88120D-15BE693B-15B5880C-C5B80477", "productName": "Nexus", "productVersion": "3.60.0" } The command returns the configuration of the newly created repository manager, including its ID. A 200 response is returned when successful. Example command: curl -u admin:admin123 -X POST -H "Content-Type: application/json" -d '{"name": "My Repository Manager", "instanceId": "060BCE87-FF88120D-15BE693B-15B5880C-C5B80477", "productName": "Nexus", "productVersion": "3.60.0"}' "http://localhost:8070/api/v2/firewall/repositoryManagers" Example JSON response: { "id":"0160d7c72c9946c3bece12bc8441dc7e", "name": "My Repository Manager", "instanceId": "060BCE87-FF88120D-15BE693B-15B5880C-C5B80477", "productName": "Nexus", "productVersion": "3.60.0" } GET REPOSITORY CONFIGURATIONS FOR A REPOSITORY MANAGER RELEASE 168 Issue a GET request to get the configuration for a specific repository manager. The <repositoryManagerId> can be found using the 'Get repository managers configurations' endpoint. * A 200 response is returned when successful GET /api/v2/firewall/repositories/configuration/<repositoryManagerId> Example command curl -u admin:admin123 -X GET "http://localhost:8070/api/v2/firewall/repositories/configuration/2d093cc49e0b4146ba67d529eb57e663" Example JSON response { "repositories": [ { "repositoryId": "e24c0dc8e24a4b53b949c49faa14da0b", "publicId": "maven-remote", "format": "maven2", "type": "proxy", "auditEnabled": true, "quarantineEnabled": true, "policyCompliantComponentSelectionEnabled": false, "namespaceConfusionProtectionEnabled": false } ] } ADD/UPDATE REPOSITORY CONFIGURATIONS FOR A REPOSITORY MANAGER RELEASE 168 Issue a POST request to add/update repository configurations for a repository manager. The <repositoryManagerId> is found using the 'Get repository managers configurations' endpoint. * A 204 response is returned when successful POST /api/v2/firewall/repositories/configuration/<repositoryManagerId> Example command curl -u admin:admin123 -X POST -H "Content-Type: application/json" "http://localhost:8070/api/v2/firewall/repositories/configuration/2d093cc49e0b4146ba67d529eb57e663" -d '{"repositories":[{"publicId":"my-repo-1", "format":"maven2", "type":"proxy", "auditEnabled":true, "quarantineEnabled":true, "policyCompliantComponentSelectionEnabled":false, "namespaceConfusionProtectionEnabled":false}]}' Terms of Service - Privacy Policy - Cookie Preferences By clicking "Accept All", you agree to the storing of cookies to provide you with a better website experience and assist our marketing and analytics efforts. To change your preferences, click "Manage Cookies". For more detailed information, please read our Cookies Policy. Manage CookiesAccept All Cookie Settings Cookie usage This site uses cookies to ensure the basic functionalities and provide a more personalized experience, including analyzing your use of the website, saving your preferences, and providing relevant advertisements. You can choose to enable or disable some or all of these cookies, but blocking some types of cookies may impact your experience of the site and the services we can offer. Strictly NecessaryStrictly Necessary Provides basic website functionalities, such as accessing secure areas of one of our Services or sites. FunctionalFunctional Enables us to remember choices you have made in the past, such as your preferred language, your previous cookie preferences, or saved log-in credentials. PerformancePerformance Collects data used to enhance functions, performance, and service by collecting information about your navigation of and interaction with us, our sites, and our Services. Marketing & AdvertisingMarketing & Advertising Tracks online activity for direct marketing purposes, such as to help us deliver more relevant advertising or limit how many times you see an ad, by collecting information such as which device or browser you used when visiting our sites. More information For more detailed information, please read our Cookie Policy. Accept allReject allSave settings