I am not able to hit the /projects api. is that ...
# ory-network
p
I am not able to hit the /projects api. is that expected? e.g. https://www.ory.sh/docs/reference/api#tag/project/operation/listProjects I am able to take the cookie from my web session and use that to hit apis at https://api.console.ory.sh/projects/$ORY_PROJECT_ID but, the generated api keys don't seem to work.
s
Yes, the keys are scoped to the specific project. We're already working on "infra" API keys to allow managing projects on a high level, but that will take a bit more time.
p
is there any stop gap possible by at least adding some sort of --non-interactive flag to the ory cli so we don't need to assign a pty?
s
Ah so you are running some automated tasks with the cli?
p
yeah we need to be able to modify the different tokenization templates
this is what i ended up with, fwiw; but i can't run it as a custom resource in AWS without a bigger lift because you can't run the ory cli in a lambda due to not being able to get a pty to authenticate with
the idea was to have that executed as part of the deployment; but i went all the way down that lambda path and then realized it wouldn't work because of the pty thing. it can still be done, but requires a dedicated machine to capature the api request from the lambda to get the pty to execute the expect script... 🙄
s
a community member got this to work in github actions: https://github.com/lomsa-dev/ory-cli-action/blob/main/action.yaml do you think that approach could work for you?
also, here is a workaround script and issue to track https://github.com/ory/cli/issues/187
p
Hey Patrik wanted to follow up that it would not in fact work in lambdas still because of the dependency on a PTY by
expect
• https://github.com/pexpect/pexpect/issues/654 • https://stackoverflow.com/questions/71559968/aws-lambda-out-of-pty-devices at least, that is the understanding I came to. i was able to work around it using expect but i had to abandon using lambdas
s
I see, that is annoying... as I said, we'll introduce new API keys to manage project configs, but it will take a couple more weeks as we have some blockers on that topic.