Update a quality policy
PUT
/v1/tenants/current/quality-policycurl -X PUT 'https://api.embodiflow.io/v1/tenants/current/quality-policy' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"status": "string",
"specJson": {},
"scopeLevel": "tenant"
}'Authorization
Send a personal access token with every request.
- Authorization: Bearer PAT
Header parameters
- If-Matchstring
Optional precondition. A matching tag proceeds and returns the new ETag. A stale tag returns 412 PRECONDITION_FAILED with no write. Absent proceeds (opt-in this release). If-Match: * succeeds when the resource exists. Malformed values return 400 IF_MATCH_INVALID.
Request body
Content-Typeapplication/json
- namestring
- statusstring
- specJsonobjectrequired
embodiflow-quality-policy/v1 document (validated in the service).
- scopeLevelstring
Optional; must agree with the tenant scope or 400 QUALITY_POLICY_SCOPE_CONFLICT.
Allowed valuestenantproject
Responses
Success
- dataobjectrequired
- idstringrequired
- tenantIdstringrequired
- projectIdstringrequired
- namestringrequired
- statusstringrequired
- specJsonobjectrequired
- publishedAtstring | nullrequired
- createdAtstringrequired
- updatedAtstringrequired
- scopeLevelstringAllowed valuestenantproject
- revisionnumber
- resolvedobject
Response example
{
"data": {
"id": "string",
"tenantId": "string",
"projectId": "string",
"name": "string",
"status": "string",
"specJson": {},
"publishedAt": "string",
"createdAt": "string",
"updatedAt": "string",
"scopeLevel": "tenant",
"revision": 0,
"resolved": {
"maxCostTier": "string",
"maxCostTierSource": "tenant",
"bindings": [
{
"checkId": "string",
"bindingIdentity": "string",
"ruleVersion": 0,
"enabled": false,
"severity": "string",
"blocking": false,
"params": {},
"sources": {
"enabled": "tenant",
"severity": "tenant",
"blocking": "tenant",
"params": {}
}
}
],
"snapshotHash": "string"
}
}
}Servershttps://api.embodiflow.io/v1https://api.embodiflow.dev/v1