VPN based endpoints for managing rigs and rig actions
Rigs can upload small files (sqlite and logs) as soon as possible. This endpoint tells the pm system to expect an upload and allows rigs to get a put url for B2 without needing B2 credentials. The url returned is a signed url valid for 900 seconds (15 minutes). The pm system will monitor the key on B2 and the captures interface can be used to track progress. A signed url will still be returned when the file already exists (size is compared) so it can be overwritten if desired. Exists will be true if there is already a file with the same key and size. If there is a file with the same key the size attribute in the body will be the size of the existing file in bytes (or null if the file does not exist). To check there is geninuely no file with the same key check that size === null.
| Name | Description |
|---|---|
| key | Object key (destination path) of the file to be uploaded |
| size | Exact size of the file to be uploaded in bytes |
| project | Project slug to force the project this capture is associated with - with override previous capture settings |
Host: vpn.manager.geocam.xyz Cookie:
GET /api/v1/rigs/upload?key=geocampm%2Ftesting%2Fupload_tester.txt&size=117
key: geocampm/testing/upload_tester.txt size: 117
X-Frame-Options: SAMEORIGIN X-XSS-Protection: 0 X-Content-Type-Options: nosniff X-Download-Options: noopen X-Permitted-Cross-Domain-Policies: none Referrer-Policy: strict-origin-when-cross-origin Content-Type: application/json; charset=utf-8 ETag: W/"fbf7f06ed5dc43670a8a5f725a9ff8bc" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: b6073683-e5b8-4a10-b792-e31c372f4178 X-Runtime: 0.317832 Vary: Origin Content-Length: 428
200 OK
{
"success": true,
"url": "https://files.dn.geocam.io/gc-surveys/unassigned/unassigned/other/upload_tester/upload_tester.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=manager%2F20231027%2Fdn%2Fs3%2Faws4_request&X-Amz-Date=20231027T025314Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=fcd1303a8a8c7850863823845fc6e81587d5aa3504159510451c6c1de0696594",
"exists": true,
"size": 117,
"id": 1
}