<@U011D3UQKNY> Hi, Where I can see a working examp...
# ory-selfhosting
g
@magnificent-energy-493 Hi, Where I can see a working example of
keto relation-tuple create
with json-string from STD_IN? I'm trying
keto relation-tuple create - <the json string>
and it does not work.
m
Hmm, what version are you using? I have not used the command like this before so I am not sure, but this is what our bot had to say. Let me know if it helps:
Here is an example of how to use the
keto relation-tuple create
command with input from STD_IN, but it uses a file as input, not a JSON string:
```keto relation-tuple parse alice_policies --format json | \
keto relation-tuple create - >/dev/null \
&& echo "Successfully created tuple" \
|| echo "Encountered error"```
In this example, the
keto relation-tuple parse
command is used to parse the
alice_policies
file and output JSON. The output is then piped into the
keto relation-tuple create
command.
If you want to use a JSON string instead of a file, you might try echoing the JSON string and piping it into the
keto relation-tuple create
command, like this:
Copy code
echo '<your JSON string>' | keto relation-tuple create -
Please replace
<your JSON string>
with your actual JSON string.
s
it would help to get the errors, as "does not work" is pretty generic
g
@magnificent-energy-493 Thanks! It works perfectly 🙂