I would like to repeat sas-admin CLI command ./sas-admin transfer upload
using REST API.
./sas-admin transfer upload --file </path/transfer_code_20210322.json>
When I use --verbose I don't see enough information repeat all the activities using PROC HTTP.
CLI --verbose response with uploading the file. I would like to prepare REST API query to repeat the same steps.
POST /transfer/packages HTTP/1.1
Host: XXXXXX
User-Agent: Go-http-client/1.1
Transfer-Encoding: chunked
Accept: application/vnd.sas.summary+json
Accept-Language: en-US,en
Accept-Locale: en-US,en
Authorization: <AUTHORIZATION>
Content-Type: multipart/form-data; boundary=2ff81854ebb20ed697f11dabfac707cc5247c40e08e1452802cd046e5c04
Accept-Encoding: gzip
8000
--2ff81854ebb20ed697f11dabfac707cc5247c40e08e1452802cd046e5c04
Content-Disposition: form-data; name="file"; filename="transfer_code_20210322.json"
Content-Type: application/octet-stream
{"id":"82294fdd-d98f-4598-a923-2dd82d396ca9","version":1,"name":"transfer_code_20210322","description":"","creationTimeStamp":"2021-03-22T13:20:28.992Z","cBy":"dki","modifiedTimeStamp":"2021-03-22T13:20:30.336Z","mo...........
For example I see this POST Query. But I don't see the dependency between the CLI file path: </path/transfer_code_20210322.json>
and options( application/octet-stream, boundary=
) we can see in the --verbose
such as:
--2ff81854ebb20ed697f11dabfac707cc5247c40e08e1452802cd046e5c04
Content-Disposition: form-data; name="file"; filename="transfer_code_20210322.json"
Content-Type: application/octet-stream
The boundary described here LINK but I still can't understand how to use it in that case.
To summarize:
My goal to have a REST API code that allow me to upload package to Viya server. In the further steps I'm going to use the package for promotes between the environments.
Kind regards,
Ivan