Targets

List customized and conflicted files on a Draft

GET
/targets/{target_id}/draft/files

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.

AuthorizationBearer <token>

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

target_id*string

Stable identifier for one configured generated product.

Match^tgt_[a-z0-9]{16}$

Query Parameters

filter?string

conflicted: conflicts only. customized: files that differ from the last accepted package. history: files affected by a default-branch history rewrite. Omit for conflicted and customized files.

Value in

  • "conflicted"
  • "customized"
  • "history"
limit?integer

Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400 invalid_request. List query parameters must appear only once; unrecognized parameters also return 400.

Range1 <= value <= 100
Default20
cursor?string

Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. Omit to start at the first page. Empty, malformed, or repeated cursors return 400 invalid_request. The page limit may change between requests.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 2048

Response 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"
{  "object": "list",  "data": [    {      "object": "draft_file",      "path": "src/helper.ts",      "customization": "added",      "conflict": null,      "history": null,      "sides": []    },    {      "object": "draft_file",      "path": "src/index.ts",      "customization": "edited",      "conflict": {        "kind": "overlapping_text",        "source": "generation",        "decision": null      },      "history": null,      "sides": [        {          "side": "base",          "mode": "100644",          "size_bytes": 1840,          "encoding": "utf8"        },        {          "side": "repository",          "mode": "100644",          "size_bytes": 2112,          "encoding": "utf8"        },        {          "side": "incoming",          "mode": "100644",          "size_bytes": 1906,          "encoding": "utf8"        }      ]    }  ],  "has_more": false,  "next_cursor": null,  "request_id": "req_3k8m1v6q9p2d7h4c"}