Read the text content of one artifact.
API version mission-status unreleased
Returns the decoded and redacted text of one artifact selected by the required query parameter path. The path is decoded once at the HTTP layer and judged as decoded. The order of decision is fixed: 400 for a missing, repeated or malformed path, 404 for an unknown Mission or a path that names no eligible artifact (eligibility denies by default, as listArtifacts describes, so a .env, a key or a credential file name is 404 and is never opened), 413 for a file larger than 262,144 bytes (it is not read), 500 when the file or the Mission directory cannot be read, 415 for a file that holds a NUL byte or is not valid UTF-8, and 422 for a file that holds a credential. A symlink is never followed, neither as the file nor as a directory on the way to it, and the two root status records of the Mission, status.events.jsonl and status.json (matched without regard to case), are not artifacts. The body of a 200 carries host paths and e-mail addresses as [path] and [email]; the size cap is measured on the raw bytes before redaction.
Parameters
Path Parameters
The canonical machine identity of a Mission: a 26-character Crockford ULID minted when the Mission is created and never changed. Never confuse it with displayNumber, which is display-only and repeats.
The identity of the Mission, a 26-character ULID. It is the only identifier accepted to select a Mission; the display number is never accepted.
Query Parameters
The path of one artifact, relative to the Mission directory and written with forward slashes. It is never an absolute location: it does not start with a slash, a tilde and a slash, or a drive letter and a colon, it holds no backslash, no NUL character and no line break (a line feed, carriage return, vertical tab, form feed, one of the three information separators, the next-line character, or a line or paragraph separator), it has no empty segment and no trailing slash, and no segment is a single or double dot. A name with a space, an accented letter, an at sign, a leading dot or a directory segment named home is a valid path. The pattern restates the artifact-path rule of the service, which decides the same way on every string; a request path the rule refuses is answered 400.
The path of the artifact to read, relative to the Mission directory and written with forward slashes (for example tasks/WP01-example.md). It is sent once, percent-encoded as any query value, and decoded once at the HTTP layer: the service judges the decoded value, never a value that was decoded twice. A missing, repeated or malformed path is answered 400.
Responses
200
The text content of the artifact.
The text content of one artifact. The content is decoded as strict UTF-8 (a leading byte order mark stays, replacement characters are never used) and then redacted: every host path becomes [path] and every e-mail address becomes [email]. A file that holds a NUL byte or invalid UTF-8 is refused 415, one larger than 262,144 bytes 413, one that holds a credential 422; a refusal never carries content.
object
The decoded text of the file with host paths and e-mail addresses replaced. It is the empty string for an empty file.
The text encoding of content. It is always utf-8.
The class of the file, decided from its path.
The media type, decided from the extension of the file and never from its content: md text/markdown, json application/json, yaml and yml application/yaml, jsonl application/x-ndjson, csv text/csv, any other extension text/plain.
The path of the file, relative to the Mission directory, as it was requested.
True when at least one host path or e-mail address in the decoded text was replaced, so content differs from the file.
The size of the file in bytes as measured on the open file, before redaction. It is 0 for an empty file and is never derived from the length of content.
400
The path of the artifact request was refused with 400: it is missing, repeated or malformed (empty, longer than 512 characters, absolute, with a backslash, a NUL character or a line break, with an empty, single-dot or double-dot segment). The body is a problem details object whose code is invalid_artifact_path.
The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. Consumers branch on code, never on title.
object
A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies this occurrence of the problem.
The HTTP status code of this occurrence.
A short, human-readable summary of the kind of problem. It does not change between occurrences.
A URI reference that identifies the kind of problem. Absent means about:blank.
The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.
404
The Mission or the artifact does not exist, or the path names no eligible artifact (a directory, a symlink, a path through a symlink, or a root status record, whose name is matched without regard to case), refused with 404. The body is a problem details object whose code is not_found.
The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. Consumers branch on code, never on title.
object
A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies this occurrence of the problem.
The HTTP status code of this occurrence.
A short, human-readable summary of the kind of problem. It does not change between occurrences.
A URI reference that identifies the kind of problem. Absent means about:blank.
The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.
413
The artifact is larger than 262,144 bytes, refused with 413 without reading it. The body is a problem details object whose code is artifact_too_large.
The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. Consumers branch on code, never on title.
object
A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies this occurrence of the problem.
The HTTP status code of this occurrence.
A short, human-readable summary of the kind of problem. It does not change between occurrences.
A URI reference that identifies the kind of problem. Absent means about:blank.
The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.
415
The artifact is not text, refused with 415: it holds a NUL byte or is not valid UTF-8. The body is a problem details object whose code is artifact_not_text.
The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. Consumers branch on code, never on title.
object
A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies this occurrence of the problem.
The HTTP status code of this occurrence.
A short, human-readable summary of the kind of problem. It does not change between occurrences.
A URI reference that identifies the kind of problem. Absent means about:blank.
The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.
422
The artifact holds a credential, refused with 422 and no content. The credentials are a GitHub token (the prefixes ghp, gho, ghu, ghs and ghr, and the fine-grained prefix github_pat), an AWS access key id (the prefixes AKIA and ASIA) and the header line of a PEM private key. The body is a problem details object whose code is artifact_secret.
The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. Consumers branch on code, never on title.
object
A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies this occurrence of the problem.
The HTTP status code of this occurrence.
A short, human-readable summary of the kind of problem. It does not change between occurrences.
A URI reference that identifies the kind of problem. Absent means about:blank.
The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.
500
The artifact or the Mission directory could not be read, refused with 500. The body is a problem details object whose code is artifact_unreadable.
The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. Consumers branch on code, never on title.
object
A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies this occurrence of the problem.
The HTTP status code of this occurrence.
A short, human-readable summary of the kind of problem. It does not change between occurrences.
A URI reference that identifies the kind of problem. Absent means about:blank.
The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.
default
The request failed. The body is a problem details object.
The only non-2xx body of any module. A problem details object in the sense of RFC 9457, served as application/problem+json.
object
A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies this occurrence of the problem.
The HTTP status code of this occurrence.
A short, human-readable summary of the kind of problem. It does not change between occurrences.
A URI reference that identifies the kind of problem. Absent means about:blank.