Returns the given policy for a particular organization
Mend API (2.0)
Mend's enhanced SCA API enables automation of workflows in a REST compliant format. The API features:
- Access for any user with Mend credentials, via a user key available in the user's profile page in the Mend App.
- Improved security with a JWT token per organization, which expires every 10 minutes.
- Added scalability with support for pagination, filtering and sorting search results.
- Broader functionality available programmatically.
- New standard API documentation for easy navigation and search.
Note: To help you get started with the Mend SCA API 2.0, we recommend reviewing our onboarding guide -> Getting Started with Mend SCA API 2.0. This resource covers initial setup, authentication instructions, and helpful tips to help you successfully begin working with the Mend SCA API 2.0. If you have a dedicated instance of Mend, contact your Mend representative to access this API on your instance.
- Generated server urlhttps://api-saas.mend.io/api/v2.0/orgs/{orgToken}/policies/{policyUuid}
- Payload
- cURL
- JS
- Go
- Ruby
- Java 8
No request payload{ "supportToken": "1171c60d", "retVal": { "uuid": "123e4567-e89b-12d3-a456-426655440000", "name": "A Policy", "owner": { … }, "createdAt": "2019-08-24T14:15:22Z", "priority": 1, "filter": { … }, "action": { … }, "context": { … }, "enabled": true, "modifiedAt": "2019-08-24T14:15:22Z", "modifiedBy": "jon.smith@mail.com", "aggregatedPriority": 0 } }
org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: Integrate tab > API Key).
- GAV_REGEX
- LIBRARY_REQUEST_HISTORY
- LIBRARY_STALENESS
- LICENSE
- PRIMARY_ATTRIBUTE_VALUE
- PRODUCT
- ReferenceNameRequiredException
- EFFECTIVENESS
- VULNERABILITY_SCORE
type: GAV_REGEX
- Generated server urlhttps://api-saas.mend.io/api/v2.0/orgs/{orgToken}/policies/{policyUuid}
- Payload
- cURL
- JS
- Go
- Ruby
- Java 8
{ "name": "License Policy", "filter": { "type": "string", "groupIdRegex": "/**", "artifactIdRegex": "/**", "versionRegex": "/**" }, "action": { "type": "string" }, "enabled": true }
{ "supportToken": "1171c60d", "retVal": { "uuid": "123e4567-e89b-12d3-a456-426655440000", "name": "A Policy", "owner": { … }, "createdAt": "2019-08-24T14:15:22Z", "priority": 1, "filter": { … }, "action": { … }, "context": { … }, "enabled": true, "modifiedAt": "2019-08-24T14:15:22Z", "modifiedBy": "jon.smith@mail.com", "aggregatedPriority": 0 } }
- Generated server urlhttps://api-saas.mend.io/api/v2.0/orgs/{orgToken}/policies/{policyUuid}
- Payload
- cURL
- JS
- Go
- Ruby
- Java 8
No request payload{ "supportToken": "1171c60d", "retVal": { "message": "Success!" } }
Request
Updates the priority of policies in a given organization. Policies are numbered and then evaluated sequentially. The request body should contain a list of policy UUIDs in the desired order, starting from highest priority. The service returns a list or ordered policies.
- Generated server urlhttps://api-saas.mend.io/api/v2.0/orgs/{orgToken}/policies/priority
- Payload
- cURL
- JS
- Go
- Ruby
- Java 8
{ "uuids": [ "123e4567-e89b-12d3-a456-426655440000" ] }
{ "supportToken": "1171c60d", "retVal": [ { … } ] }
- Generated server urlhttps://api-saas.mend.io/api/v2.0/orgs/{orgToken}/policies/apply
- Payload
- cURL
- JS
- Go
- Ruby
- Java 8
No request payload{ "supportToken": "1171c60d", "retVal": { "contextUuid": "caf69794-9882-4b55-82db-6b6da4fe2a26", "uuid": "caf69794-9882-4b55-82db-6b6da4fe2a92", "status": "PENDING", "contextType": "DOMAIN", "created": "2019-08-24T14:15:22Z", "modified": "2019-08-24T14:15:22Z", "processType": "APPLY_POLICIES", "messageContentSha1": "fb4016165697cc32d0b90ccc82e3c2c846eb01b7", "requestToken": "2cd6a43b", "userEmail": "sample@mail.com" } }
- Generated server urlhttps://api-saas.mend.io/api/v2.0/orgs/{orgToken}/policies
- Payload
- cURL
- JS
- Go
- Ruby
- Java 8
No request payload{ "supportToken": "1171c60d", "retVal": [ { … } ] }
- GAV_REGEX
- LIBRARY_REQUEST_HISTORY
- LIBRARY_STALENESS
- LICENSE
- PRIMARY_ATTRIBUTE_VALUE
- PRODUCT
- ReferenceNameRequiredException
- EFFECTIVENESS
- VULNERABILITY_SCORE
type: GAV_REGEX
- Generated server urlhttps://api-saas.mend.io/api/v2.0/orgs/{orgToken}/policies
- Payload
- cURL
- JS
- Go
- Ruby
- Java 8
{ "name": "License Policy", "filter": { "type": "string", "groupIdRegex": "/**", "artifactIdRegex": "/**", "versionRegex": "/**" }, "action": { "type": "string" }, "enabled": true }
{ "supportToken": "1171c60d", "retVal": { "uuid": "123e4567-e89b-12d3-a456-426655440000", "name": "A Policy", "owner": { … }, "createdAt": "2019-08-24T14:15:22Z", "priority": 1, "filter": { … }, "action": { … }, "context": { … }, "enabled": true, "modifiedAt": "2019-08-24T14:15:22Z", "modifiedBy": "jon.smith@mail.com", "aggregatedPriority": 0 } }