Skip to main content

uploadFile

POST 

https://host/v1/environment/:environment/files/upload

Get a signed url to upload a File in an Environment. The url will valid for 15 minutes. Uploads to a Ganymede bucket will require a PUT request with the header "x-goog-content-length-range" set with value "0,10000000", the header "x-goog-meta-initiatortype" set with value "API", and the header "x-goog-meta-initiatorid" set with the initiator value that was passed in the request body. Uploads to a customer S3 Bucket managed by Ganymede will require a "POST" request with formData including all "formData" returned with the upload response from Ganymede as well as the field "file" with the file string contents.

Request

Path Parameters

    environment stringrequired

Bodyrequired

    hostPathstring

    hostPath is the full file path of the file on the host, used to store additional metadata and check for file upload completeness within an environment.

    namestringrequired
    initiatorstringrequired
    bucketstring

Responses

Signed Url

Schema
    stringstring

Authorization: Authorization

name: Authorizationtype: httpscheme: bearerbearerFormat: JWTdescription: Enter JWT tokenin: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://host/v1/environment/:environment/files/upload");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <Authorization>");
var content = new StringContent("{\n \"hostPath\": \"string\",\n \"name\": \"string\",\n \"initiator\": \"string\",\n \"bucket\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://host
Auth
Parameters
— pathrequired
Body required
{
  "hostPath": "string",
  "name": "string",
  "initiator": "string",
  "bucket": "string"
}
ResponseClear

Click the Send API Request button above and see the response here!