cr, err := client.Permission.Expand(context.Background(), &v1.PermissionExpandRequest{
TenantId: "t1",
Metadata: &v1.PermissionExpandRequestMetadata{
SnapToken: "",
SchemaVersion: "",
},
Entity: &v1.Entity{
Type: "repository",
Id: "1",
},
Permission: "push",
})client.permission.expand({
tenantId: "t1",
metadata: {
snapToken: "",
schemaVersion: ""
},
entity: {
type: "repository",
id: "1"
},
permission: "push",
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/expand' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata": {
"schema_version": "",
"snap_token": ""
},
"entity": {
"type": "repository",
"id": "1"
},
"permission": "push"
}'{
"tree": {
"entity": {
"type": "<string>",
"id": "<string>"
},
"permission": "<string>",
"arguments": [
{
"computedAttribute": {
"name": "<string>"
}
}
],
"expand": {
"operation": "OPERATION_UNSPECIFIED",
"children": "<array>"
},
"leaf": {
"subjects": {
"subjects": [
{
"type": "<string>",
"id": "<string>",
"relation": "<string>"
}
]
},
"values": {
"values": {}
},
"value": {
"@type": "<string>"
}
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Expand API
cr, err := client.Permission.Expand(context.Background(), &v1.PermissionExpandRequest{
TenantId: "t1",
Metadata: &v1.PermissionExpandRequestMetadata{
SnapToken: "",
SchemaVersion: "",
},
Entity: &v1.Entity{
Type: "repository",
Id: "1",
},
Permission: "push",
})client.permission.expand({
tenantId: "t1",
metadata: {
snapToken: "",
schemaVersion: ""
},
entity: {
type: "repository",
id: "1"
},
permission: "push",
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/expand' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata": {
"schema_version": "",
"snap_token": ""
},
"entity": {
"type": "repository",
"id": "1"
},
"permission": "push"
}'{
"tree": {
"entity": {
"type": "<string>",
"id": "<string>"
},
"permission": "<string>",
"arguments": [
{
"computedAttribute": {
"name": "<string>"
}
}
],
"expand": {
"operation": "OPERATION_UNSPECIFIED",
"children": "<array>"
},
"leaf": {
"subjects": {
"subjects": [
{
"type": "<string>",
"id": "<string>",
"relation": "<string>"
}
]
},
"values": {
"values": {}
},
"value": {
"@type": "<string>"
}
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Path Parameters
Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant t1 for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.
Body
PermissionExpandRequest is the request message for the Expand method in the Permission service.
PermissionExpandRequestMetadata metadata for the PermissionExpandRequest.
Show child attributes
Show child attributes
Entity represents an entity with a type and an identifier.
Show child attributes
Show child attributes
Name of the permission to be expanded, not required, must start with a letter and can include alphanumeric and underscore, max 64 bytes.
Context encapsulates the information related to a single operation, including the tuples involved and the associated attributes.
Show child attributes
Show child attributes
Additional arguments associated with this request.
Show child attributes
Show child attributes
Response
A successful response.
PermissionExpandResponse is the response message for the Expand method in the Permission service.
Expand is used to define a hierarchical structure for permissions. It has an entity, permission, and arguments. The node can be either another hierarchical structure or a set of subjects.
Show child attributes
Show child attributes