Validate a new assignment without saving
Validates the same candidate shape used to create an assignment
against its saved definition and assignments without persisting it.
Duplicate logical targets return 200 with status: INVALID and an
ASSIGNMENT_TARGET_EXISTS diagnostic. An ALL_TENANTS baseline
change also returns server-computed impact summaries.
Authorization
UnifiedSecurityBearerAuth A project-scoped access token generated for an organization Admin.
Generate one with the Token API using
the Admin's orgUserId. The token project must match the request path,
and the user must currently be active and belong to the project
organization. Dashboard tokens and tenant-user project tokens are not
accepted.
In: header
Path Parameters
Your Semaphor project ID.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X post "https://semaphor.cloud/api/management/v1/projects/string/unified-security/assignments/validate" \ -H "Content-Type: application/json" \ -d '{ "definitionId": "string", "scopeType": "ALL_TENANTS", "orgUserId": "string", "tenantId": "string", "tenantUserId": "string" }'{
"ok": true,
"data": {
"validation": {
"status": "VALID",
"diagnostics": [
{
"code": "RLS_CONFIG_SHAPE_INVALID",
"severity": "ERROR",
"title": "string",
"message": "string",
"location": {
"resourceType": "DEFINITION",
"resourceId": "string",
"resourceName": "string",
"subjectType": "RULE",
"fieldPath": "string",
"parameterName": "string"
},
"remediations": [
{
"code": "REAUTHOR_LEGACY_RLS",
"label": "string",
"target": {
"resourceType": "DEFINITION",
"resourceId": "string"
}
}
],
"requiresUserDecision": true,
"retryable": true
}
],
"impact": {
"type": "ALL_TENANTS_BASELINE_CHANGE",
"allOtherTenantActorsRemainActive": true,
"parameters": [
{
"parameterName": "string",
"oldValue": {
"state": "OMITTED"
},
"newValue": {
"state": "OMITTED"
},
"tenantOverrideAssignmentCount": 0,
"tenantUserOverrideAssignmentCount": 0
}
]
},
"recovery": {
"action": "SAVE_DEFINITION_AND_REVIEW_ASSIGNMENTS",
"assignmentIds": [
"string"
]
}
},
"authoringContext": {
"definitionId": "string",
"scopeType": "ALL_TENANTS",
"parameters": [
{
"parameterName": "string",
"currentValue": {
"state": "OMITTED"
},
"inherited": {
"state": "OMITTED"
}
}
]
}
}
}{
"ok": false,
"error": {
"code": "INVALID_REQUEST",
"message": "string",
"requestId": "string",
"issues": [
{
"code": "INVALID_JSON",
"fieldPath": "string",
"message": "string"
}
],
"retryable": true
}
}{
"ok": false,
"error": {
"code": "INVALID_REQUEST",
"message": "string",
"details": {}
}
}{
"ok": false,
"error": {
"code": "INVALID_REQUEST",
"message": "string",
"details": {}
}
}{
"ok": false,
"error": {
"code": "INVALID_REQUEST",
"message": "string",
"requestId": "string",
"issues": [
{
"code": "INVALID_JSON",
"fieldPath": "string",
"message": "string"
}
],
"retryable": true
}
}{
"ok": false,
"error": {
"code": "INVALID_REQUEST",
"message": "string",
"requestId": "string",
"issues": [
{
"code": "INVALID_JSON",
"fieldPath": "string",
"message": "string"
}
],
"retryable": true
}
}