bland-finland-95044
02/26/2024, 9:30 PMcurl --location '<http://zzz.com/relation-tuples/check|zzz.com/relation-tuples/check>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer xxx' \
--header 'Cookie: yyyy' \
--data '{
"namespace": "Application",
"object": "helloworld",
"relation": "use",
"subject_id": "cf9a90a2-ba99-4134-8ae3-5543864f6bd9"
{
"error": {
"code": 400,
"status": "Bad Request",
"request": "30c89935-3330-9b76-a682-f12e8e26d182",
"message": "subject is not allowed to be nil"
}
}chilly-king-10285
02/26/2024, 9:30 PMchilly-king-10285
02/26/2024, 9:30 PMPOST request. However, the error message you received indicates that the subject is not allowed to be nil. This suggests that there might be an issue with how the subject is being specified in your request. From the extracts, we have details on how to properly format a request body for checking permissions using the Ory Permissions API. Specifically, for the POST /relation-tuples/check endpoint, the request body should include namespace, object, relation, and either subject_id or subject_set. Here's an example of how the request body should be structured based on the information from the extracts: json { "namespace": "Application", "object": "helloworld", "relation": "use", "subject_id": "cf9a90a2-ba99-4134-8ae3-5543864f6bd9" } This matches the structure of the request you've attempted, assuming your curl command is correctly formatted and the endpoint URL is replaced with the actual Ory API endpoint. If you're still encountering the error, ensure that: 1. The endpoint URL in your curl command is correct and points to the Ory API. The placeholder <http://zzz.com/relation-tuples/check|zzz.com/relation-tuples/check> should be replaced with the actual Ory API endpoint URL. Unfortunately, the correct URL is not provided in the extracts, so you'll need to refer to the official Ory documentation for the exact endpoint. 2. Your curl command syntax is correct. The example you've provided seems to be malformed. Ensure that the curl command is properly formatted according to curl syntax and the API documentation. 3. The Authorization header and any other headers are correctly set as per the API's requirements. Since the exact curl command format and the correct API endpoint URL are not provided in the extracts, I recommend consulting the [Ory Permissions API documentation](https://www.ory.sh/docs/keto/concepts/api-overview) for detailed instructions on making API requests, including the correct endpoint URLs and required headers.