Semaphor

Get a definition

Returns a single definition with its connection details and the number of assignments that reference it. The response also includes saved RLS health, deterministic diagnostics, and bounded authorized legacy recovery data when manual re-authoring is required.

GET
/api/management/v1/projects/{projectId}/unified-security/definitions/{definitionId}

Authorization

UnifiedSecurityBearerAuth
AuthorizationBearer <token>

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

projectId*string

Your Semaphor project ID.

definitionId*string

The ID of the definition to operate on.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X get "https://semaphor.cloud/api/management/v1/projects/string/unified-security/definitions/string"
{
  "ok": true,
  "data": {
    "definition": {
      "definition": {
        "id": "string",
        "projectId": "string",
        "connectionId": "string",
        "name": "string",
        "clsConfig": {
          "connectionTemplate": "string",
          "filePathTemplates": {
            "property1": "string",
            "property2": "string"
          },
          "params": {
            "property1": "string",
            "property2": "string"
          }
        },
        "slsConfig": {
          "schemaTemplate": "string",
          "allowedSchemas": [
            "string"
          ],
          "defaultSchema": "string",
          "schema": "string"
        },
        "rlsConfig": null,
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      },
      "connection": {
        "id": "string",
        "name": "string",
        "type": "string"
      },
      "assignmentCount": 0,
      "dependentOverrideCounts": {
        "tenantAssignmentCount": 0,
        "tenantUserAssignmentCount": 0
      },
      "rlsHealth": {
        "status": "NOT_APPLICABLE",
        "errorCount": 0,
        "warningCount": 0,
        "infoCount": 0
      },
      "rlsDiagnostics": [
        {
          "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
        }
      ],
      "rlsRecovery": {
        "rules": [
          {
            "matcher": {
              "type": "ALL_TABLES_WITH_COLUMN",
              "column": "string"
            },
            "expression": "string",
            "name": "string",
            "description": "string",
            "params": {
              "property1": "string",
              "property2": "string"
            },
            "enabled": 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",
    "details": {}
  }
}
{
  "ok": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "string",
    "requestId": "string",
    "issues": [
      {
        "code": "INVALID_JSON",
        "fieldPath": "string",
        "message": "string"
      }
    ],
    "retryable": true
  }
}