Watch file changes
Upgrade to WebSocket and receive SandboxFilesWatchFrame JSON text frames.
- Wait for
ready. Then list or read what you need. Then apply thechangesframes that arrived meanwhile, and the ones after. seqcounts the frames of this subscriber. A skippedseq, a frame that is not valid, or a close withoutendmeans lost changes: open a new watch and list again.- On
resync, list again.endis the last frame. - Close code 4001 means the watch expired after 15 minutes. 1001 means the server shut down.
- Needs read access.
userneeds write access. - Served at the access endpoint of the sandbox (
access_endpointofGET /v1/sandboxes/{sandboxId}). A browser offers the credential as the WebSocket protocolBearer-<token>.
See Watch for changes in the guide.
Authorization
apiKey API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.
In: header
Path Parameters
Query Parameters
Absolute, or relative to the sandbox working directory. A path that starts with ~ or ~/ names the home directory of the user that the operation runs as. ~name returns 422.
"."Attach the entry, as the list returns it, to every change but removed
Skip entries that match, and everything under them; a name without / matches at any depth, a name with / matches a path relative to path
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/v1/sandboxes/string/files/watch"{ "changes": [ { "entry": { "gid": 0, "group": "string", "mode": 0, "modified_at": "2019-08-24T14:15:22Z", "name": "string", "owner": "string", "path": "string", "size": 0, "symlink_target": "string", "type": "file", "uid": 0 }, "old_path": "string", "op": "created", "path": "string", "type": "file" } ], "message": "string", "path": "string", "reason": "string", "seq": 0, "type": "ready"}{ "detail": "Property foo is required but is missing.", "errors": [ { "location": "string", "message": "string", "value": null } ], "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"}{ "detail": "Property foo is required but is missing.", "errors": [ { "location": "string", "message": "string", "value": null } ], "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"}{ "detail": "Property foo is required but is missing.", "errors": [ { "location": "string", "message": "string", "value": null } ], "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"}{ "detail": "Property foo is required but is missing.", "errors": [ { "location": "string", "message": "string", "value": null } ], "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"}{ "detail": "Property foo is required but is missing.", "errors": [ { "location": "string", "message": "string", "value": null } ], "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"}{ "detail": "Property foo is required but is missing.", "errors": [ { "location": "string", "message": "string", "value": null } ], "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"}Upload through a signed URL PUT
Replace the file of a PUT signed URL once, like `PUT files/content`. - An upload that starts uses the URL up, also when it fails. A refusal before it starts (403, 409, 429) keeps the URL. - Needs no other credential. - Served at the access endpoint. The mint returns the full URL. See [Share a file with a signed URL](https://docs.tektona.ai/files#share-a-file-with-a-signed-url) in the guide.
Write file content PUT
Stream bytes to a temporary file, then replace the target. - An interrupted transfer keeps the old file. - With `mode`, the file gets those permission bits before it replaces the target, so it never appears without them. Without `mode`, a replaced file keeps its mode. See [Write files](https://docs.tektona.ai/files#write-files) in the guide.