<@U04UQ68083H> while check for the permission, can...
# ory-copilot
l
@chilly-king-10285 while check for the permission, can I send two subjects in the subject set?
c
A message from kapa.ai
Based on the provided extracts, the Ory API's
postCheckPermission
and
postCheckPermissionOrError
methods accept a single
subject_id
or a
subject_set
in the request body. The
subject_set
is an object that includes a
namespace
,
object
, and
relation
. There is no mention of the ability to include multiple subjects within a single
subject_set
in these methods. Here is an example of the request body structure:
Copy code
json {   "namespace": "Namespace to query",   "object": "Object to query",   "relation": "Relation to query",   "subject_id": "SubjectID to query",   "subject_set": {     "namespace": "Namespace of the Subject Set",     "object": "Object of the Subject Set",     "relation": "Relation of the Subject Set"   } }
In this structure,
subject_id
and
subject_set
are alternatives - you can provide either a
subject_id
or a
subject_set
, but not both. And within the
subject_set
, there is no provision for multiple subjects. For more details, you can refer to the [Ory API Reference](https://www.ory.sh/docs/reference/api).
l
@chilly-king-10285 I am talking about two subjects in single subjectset
c
A message from kapa.ai
Based on the provided extracts, a
SubjectSet
in Ory Keto refers to all subjects who have the same
relation
on an
object
. However, it does not explicitly mention the ability to include multiple subjects within a single
SubjectSet
. Here is the structure of a `SubjectSet`:
Copy code
json {   "namespace": "Namespace of the object and relation referenced in this subject set",   "object": "The object related by this subject set",   "relation": "The relation between the object and the subjects" }
In this structure, there is no provision for multiple subjects. The
SubjectSet
is designed to refer to a set of subjects that share the same relation to an object, but it does not specify that multiple individual subjects can be included in a single
SubjectSet
. For more details, you can refer to the [Ory Keto Protocol Documentation](https://www.ory.sh/docs/keto/reference/proto-api#subjectset).