List the latest Linear fetches of the workspace
Administrators only. The ten most recent, newest first, so a screen that was closed can find a fetch that is still running.
View as MarkdownAuthorization
bearer In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/imports/linear/fetches"{ "fetches": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "running", "batchId": "5579c111-9c50-47e2-af92-f16d52e63189", "namespace": "string", "options": { "includeArchived": true, "includeComments": true, "linearWorkspace": "string" }, "teams": [ { "linearTeamId": "string", "key": "string", "name": "string", "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec", "state": "pending", "issues": 0, "comments": 0, "importId": "84402506-7f34-4409-8ec1-a4e0ffb6b608", "code": "string", "message": "string", "notes": [ "string" ] } ], "error": "string", "cancelRequested": true, "createdAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z" } ]}Say what a Linear API key can see
Administrators only (`org.settings.manage`). Reads the Linear workspace the key belongs to, its teams, and its people, and stores nothing. Each Linear team comes with `match`, the team of this workspace it looks like by name and then by key (null when none, or when two would fit, because guessing between them would put issues in a team nobody chose). `people` says how many active people Linear has and which of them are not members of this workspace yet, matched by email. Their issues are imported unassigned and handed over when they join, so this only tells the admin who will wait. The key is a Linear personal API key. It is held in memory for the call and never stored, logged, audited or returned, and an error never carries it. A key that is not a key (a space, a line break, too long) is a 400 `bad_key`. One Linear does not accept is a 422 `linear_key_rejected`. A Linear rate limit is a 429 `linear_rate_limited`, and Linear failing is a 502 `linear_unavailable`.
Start reading Linear teams into import jobs
Step 1 of 3 for a Linear import (fetch, preview, start). Administrators only. Names the Linear teams to read, each with the team of this workspace its issues go to, and answers 202 at once. The key, the Linear teams and the Easerix teams are all checked first, so a mistake is answered now and not found in a progress bar. Nothing is created in a team: a fetch only makes import jobs. The fetch runs in the background, one Linear team after another, and each team that is read becomes an ordinary import job in the team chosen: status `uploaded`, source `linear`, the same batch as the others, and the column mapping already saved (the suggested one, with the comment layout that keeps an author and a date). From there it is an upload: `previewImport` with the saved mapping, `commitImport`, `undoImport`, and the same reconciliation. Issues carry Linear's own identifier (ENG-123) under the source name `linear`, the name a Linear CSV export is given too, so reading a team twice, or after a CSV export of it, never imports an issue twice. The key is held in memory by the fetch and dropped when it ends. It is not stored, logged, audited or returned. A fetch cut short by a restart cannot be resumed: it is found by its heartbeat and marked failed, the admin pastes the key again, and the teams it had finished stay as jobs. Refusals: 400 `bad_key`, `bad_request` (no teams, more than 50, a team twice) or `unknown_linear_team`; 404 for a team of this workspace the caller cannot reach; 409 `fetch_in_progress` (one fetch runs per workspace) or `too_many_unfinished`; 422 `linear_key_rejected`; 429 and 502 as for `inspectLinear`. A team with more than 5,000 issues, the most one import takes, is not refused up front: it fails on its own, with the reason, and the others carry on.