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

LOCATION ERROR: Exception: Bad request while running the testGetLocationIDByName function #6

Open
aeliaazevedo opened this issue Nov 17, 2022 · 0 comments

Comments

@aeliaazevedo
Copy link

Hello there!

First I would like to thank you for your contribution to the Snipe IT community. Bulkedit is something that has the potential to really help my team, and I'm sure many other teams and companies, in our day by day operational tasks.

Now for the issue, I've been trying to make Bulkedit work for a week, but I can't figure out why it is getting refused by my snipe-it endpoint.

I followed all the steps in the instructions, created the "Errors" tab, added the serverURL and API key from my snipe-it instance to the setup.gs and ran one of the test functions in inventory.gs (function testGetLocationIDByName) first, to authorize the script's permissions, however I keep getting a Bad request error, as if there is an issue with the syntax, but since I copied everything from the repo, I am quite sure the syntax is not the issue here.

I thought it could have something to do with the fact that my snipe-it instance is not exposed if you don't use the company's VPN, but I executed a GET query in Postman with the exact same API key used in Bulkedit setup.gs script, used the same endpoint from testGetLocationIDByName -> https://my-company-url.com/api/v1/locations?search=HQ3 (for security reasonsI replaced the actual URL with my-company-url.com) and it returns status 200 with the response body showing the location searched.

Do you have any idea about what may be interfering here?

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

1 participant