Mend's enhanced SCA API enables automation of workflows in a REST compliant format. The API features:
If you have a dedicated instance of Mend, contact your Mend representative to access this API on your instance.
https://api-saas.mend.io/api/v2.0/projects/{projectToken}/policies/{policyUuid}
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 } }
project UUID (by running Entities - Product > Get Product Projects) or Project Token (from the Mend SCA App: Integrate tab > Project Token).
type: GAV_REGEX
https://api-saas.mend.io/api/v2.0/projects/{projectToken}/policies/{policyUuid}
{ "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 } }
https://api-saas.mend.io/api/v2.0/projects/{projectToken}/policies/{policyUuid}
No request payload
{ "supportToken": "1171c60d", "retVal": { "message": "Success!" } }
https://api-saas.mend.io/api/v2.0/projects/{projectToken}/policies/apply
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" } }
Filter your search to return items whose property has a specific value. Use the syntax: property:operation:value where a colon (:) separates between property, operation and value.
This endpoint supports filtering on the following properties and its supported operators:
https://api-saas.mend.io/api/v2.0/projects/{projectToken}/policies
No request payload
{ "supportToken": "1171c60d", "retVal": [ { … } ] }
type: GAV_REGEX
https://api-saas.mend.io/api/v2.0/projects/{projectToken}/policies
{ "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 } }