insomniacc / PSSnow

A powershell module for interacting with the ServiceNow REST API
GNU General Public License v3.0
40 stars 9 forks source link

Invoke-SNOWBatch v2 API #17

Closed insomniacc closed 1 year ago

insomniacc commented 1 year ago

Strangely if I leave the default URI for the batch API, or specify v2 in the URL my calls always seem to fail with a 400 bad request response. There's nothing standing out in the documentation to indicate why this may be, or that I'm doing anything wrong: https://docs.servicenow.com/bundle/tokyo-application-development/page/integrate/inbound-rest/concept/batch-api.html

For now it works on v1 and doesn't seem to pose any limitations or issues.

insomniacc commented 1 year ago

I had assumed that the API was v2 across the entire platform, but it seems that each API has it's own independent versioning. The Batch API version is not stated in the doc linked, but I've observed that both the stats API and the Attachment API are both only v1. That still doesn't answer why leaving it as default fails but I'm not quite as concerned about this one.