Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling in data from endpoint with no query parameters? #245

Open
tobiasbp opened this issue Oct 12, 2023 · 1 comment
Open

Pulling in data from endpoint with no query parameters? #245

tobiasbp opened this issue Oct 12, 2023 · 1 comment

Comments

@tobiasbp
Copy link

I have and endpoint, /orgs, returning a list or organizations. I'm unsure if this provider supports importing the organization data into Terraform? I want to import data from the API, but never update data via the API.

I would like to do something like this:

data "restapi_object" "orgs" {
  path = "/orgs"
}

However, search_key & search_value (I think those are sent in the request body?) are required fields, but I have no search values to provide. Also, I think each data object is expected to hold a single org (in this scenario), so what I'm trying do is probably different than what the intended use of this provider is?

I'm also wondering if it is possible to query and endpoint which only accepts query strings (no support for arguments sent as a JSON in the request body)?

I am currently using the Hashicorp HTP provider to get data from my endpoint, but I'm getting throttled, and the HTTP provider does not support setting a rate_limit. That is why I am looking for alternatives. I'd rather not write my own provider for getting the data.

Any suggestions much appreciated.

@maxexcloo
Copy link

Would use this also - did you find any other solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants