auth0-cli icon indicating copy to clipboard operation
auth0-cli copied to clipboard

Provide way to make arbitrary api calls

Open jsoref opened this issue 3 years ago • 0 comments

Describe the problem you'd like to have solved

I have a broken app (caused entirely by the Auth0 apis, either directly by manage.auth0.com, or possibly by terraform-auth0, or possibly by auth0-cli).

https://github.com/auth0/terraform-provider-auth0/issues/266#issuecomment-1211763324 suggested that I could use https://auth0.com/docs/api/management/v2#!/Clients/patch_clients_by_id to fix my app.

I'd like to be able to perform that api call using the auth0 cli.

Describe the ideal solution

The auth0 cli appears to be modeled after gh which provides gh api which enables one to make authenticated api calls.

I'd like to be able to use auth0 api in the same manner (and be told by the documentation that currently suggests the web page w/ a form that doesn't work how to perform the api calls using that feature...)

Alternatives and current work-arounds

I could probably create a new token and manually use curl, but since I have already set up auth0 and it's supposed to be a shiny frontend to the auth0 management api, it should really just do what I need.

Additional context

https://github.com/cli/cli/blob/6a8deb1f5a9f2aa0ace2eb154523f3b9f23a05ae/pkg/cmd/api/api.go#L65-L68 https://github.com/cli/cli/blob/6a8deb1f5a9f2aa0ace2eb154523f3b9f23a05ae/pkg/cmd/api/api.go#L83-L96

jsoref avatar Aug 18 '22 21:08 jsoref