v1

latestOpenAPI 3.1.0Serval License2026-07-26202952779.1 KB
Access Relationship API

Create Access Relationship

Create an access relationship on a subject (app instance, resource, role, or team). Use relationship_type=OWNER to add an owner.

post/v2/access-relationships

Request body

subjectType'ACCESS_RELATIONSHIP_SUBJECT_TYPE_UNSPECIFIED' | 'ACCESS_RELATIONSHIP_SUBJECT_TYPE_APP_INSTANCE' | 'ACCESS_RELATIONSHIP_SUBJECT_TYPE_RESOURCE' | 'ACCESS_RELATIONSHIP_SUBJECT_TYPE_ENTITLEMENT' | 'ACCESS_RELATIONSHIP_SUBJECT_TYPE_TEAM' required

The kind of entity a relationship is on. Generalizes the former app_relationships model (app_instance subjects only) so resources, roles (entitlements), and teams can have owners too.

subjectIdstring required

The ID of the subject (app_instance_id | resource_id | entitlement_id | team_id), disambiguated by subject_type.

relationshipType'ACCESS_RELATIONSHIP_TYPE_UNSPECIFIED' | 'ACCESS_RELATIONSHIP_TYPE_OWNER' required
targetIdstring required

The ID of the target (user or group).

targetType'ACCESS_RELATIONSHIP_TARGET_TYPE_UNSPECIFIED' | 'ACCESS_RELATIONSHIP_TARGET_TYPE_USER' | 'ACCESS_RELATIONSHIP_TARGET_TYPE_GROUP' required

Response

Success