Skip to content

Update Project Policy

Request

Updates a policy for a given project

Security
bearer-key
Path
projectTokenstringrequired

project UUID (by running Entities - Product > Get Product Projects) or Project Token (from the Mend SCA App: Integrate tab > Project Token).

policyUuidstringrequired

Policy UUID (by running Policies - Organization and run Get Organization Policies, or the equivalent for Product or Project.)

Bodyapplication/jsonrequired
namestring(Policy Name)required
Example:"License Policy"
filterGAV_REGEX (object) or LIBRARY_REQUEST_HISTORY (object) or LIBRARY_STALENESS (object) or LICENSE (object) or PRIMARY_ATTRIBUTE_VALUE (object) or PRODUCT (object) or ReferenceNameRequiredException (object) or EFFECTIVENESS (object) or VULNERABILITY_SCORE (object)required
One of:

type: GAV_REGEX

actionAPPROVE (object) or CONDITIONS (object) or CREATE_ISSUE (object) or REASSIGN (object) or REJECT (object)required
One of:

type: APPROVE

enabledboolean(Enabled)
Default:true
PUT
/api/v2.0/projects/{projectToken}/policies/{policyUuid}
{ "name": "License Policy", "filter": { "type": "string", "groupIdRegex": "/**", "artifactIdRegex": "/**", "versionRegex": "/**" }, "action": { "type": "string" }, "enabled": true }

Responses

OK

Bodyapplication/json
supportTokenstring(Support Token)
Example:"1171c60d"
retValobject(PolicyDTO)

Policies are checked by order of priority; note that 1 is the lowest priority

Response
{ "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 } }