Read one side of a Draft file
Returns up to 24 KiB of one side of a conflicted or history-affected file: text as UTF-8, binary content as base64. Follow next_cursor with the same path and side to read the rest, and concatenate the chunks in order. A side where the file is absent returns 404.
Authorization
apiKey Organization API key from the console (ak_...), or an OAuth access token with user:org:read, the organization selected during consent, and the capability required by the operation.
In: header
Path Parameters
Stable identifier for one configured generated product.
^tgt_[a-z0-9]{16}$Query Parameters
File path from listDraftFiles.
1 <= lengthA side listed for the file.
Value in
- "base"
- "repository"
- "incoming"
- "accepted"
- "default"
- "draft"
next_cursor from the preceding chunk of the same path and side.
^[A-Za-z0-9_-]+$1 <= length <= 2048Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/targets/tgt_5m8q2v7k1p9d4h6c/draft/files/content?path=src%2Findex.ts&side=base"{ "object": "draft_file_content", "target_id": "tgt_5m8q2v7k1p9d4h6c", "path": "src/index.ts", "side": "incoming", "encoding": "utf8", "content": "export { ParcelClient } from \"./client.js\";\nexport type { Shipment, Label } from \"./types.js\";\n", "mode": "100644", "size_bytes": 94, "offset": 0, "next_cursor": null, "request_id": "req_3k8m1v6q9p2d7h4c"}List customized and conflicted files on a Draft GET
Lists the Draft's files that differ from the last accepted package or need a conflict decision, ordered by path, without file content. Each conflict names its kind, where the incoming version comes from, the saved decision, and the sides you can read with retrieveDraftFileContent. With `filter=history`, lists the files affected by a default-branch history rewrite instead; the list is empty when none is pending. Returns `409 stale_draft` while Typeship has not integrated the Draft's latest commit (Draft status generating or branch_changed), or when the Draft changes between pages.
Resolve selected Draft conflicts POST
Saves decisions for conflicts on the Draft's head_revision: keep the repository or incoming version, or supply the final content as text or, for binary files, base64. Decisions save together or not at all, and a decision can be replaced until it is applied. Use `dry_run` to validate them first. Saving changes no files. When every conflict has a decision, `remaining_conflicts` is 0 and the Draft status becomes `needs_generation`: generate the Target to apply the decisions and run its checks. Applying them can report conflicts from the next merge stage.