uploadFile
POSThttps://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
- application/json
Bodyrequired
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.
Responses
- 200
- 409
Signed Url
- application/json
- Schema
- Example (auto)
Schema
"string"
File Already Exists
- application/json
- Schema
- Example (auto)
Schema
"string"
Authorization: Authorization
name: Authorizationtype: httpscheme: bearerbearerFormat: JWTdescription: Enter JWT tokenin: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
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());