Hello all,
I am trying to write a Gateway service that helps our ServiceNow automation be able to upload a swagger document for an API.
The issue I seem to be running into, is this PAPI endpoint only accepts 3 parameters, and the only way I can interact with this path in PAPI, is to use Postman UI to choose form-data content type and use the File "dropdown" feature to upload the file itself using the key of "files" and the value being the file itself.
My question is, is there a way to handle this similar call within the Gateway? Either by submitting the file contents in Body, extract and generate a file of some sort, and then use that file as a formdata header in the routing assertion that is hitting PAPI? Or, is there a way to interact with this path in PAPI using multipart form data headers/boundaries instead of submitting a file?
Thanks.
Ex:
Parameters
Parameter |
Value |
Description |
Parameter Type |
Data Type |
|
apiUuid |
|
apiUuid |
path |
string |
|
files |
|
The Asset to upload. A REST API can have an optionally specified WADL, or Swagger JSON file. A SOAP API must have a WSDL specified for it as well as any optional XSDs. |
formData |
file |
|
filesToDelete |
|
The UUID of file to delete. Multiple UUIDs can be provided in separate parts. |
formData |
string |