---
title: "Controller Handle Commit Import"
method: POST
path: "/integrations/commit/import"
tags: ["integrations"]
---

# Controller Handle Commit Import

`POST /integrations/commit/import`

Performs an ad-hoc import and persists anything needed for dataset refreshes to trigger. We return the dataset_id, which the frontend uses to direct the user to the proper place.

## Request body

- CommitImportPayload
  - `flow_id` string, required — Flow ID that the import schedule should be tied to. Necessary in order to create a Flow -> Connection ID mapping so we can look up the set of credentials attached to a flow, which is useful for deployments.
  - `connection` union, required — An existing connection ID or the payload of the connection to create.
    - string
    - OAuthConnectionPayload
      - `_owner` string, required — ID of user that created this entry.
      - `_org` string, required — ID of user's active organization when creating this entry.
      - `validated` boolean — Whether we've tested and validated these credentials actually work. Relevant due to us persisting credentials *before* we attempt imports (rather than how we used to do it, after) to help with bug triage, particularly when errors occur during the initial `/commit/import` call and not during the followup task doing the actual import.
      - `config` object, required — JSON object specifying config on the connection. This is a value whose format WE specify; it needs to have enough information that we can map it to either a Meltano extractor or loader, but is fully distinct from either of those concepts. Avoiding coupling both this and table specifiers to whether they are pulling data in or sending data out is very useful and gives us very powerful generalization capabilities.
      - `oauth_connection_id` string, required — The pre-existing oauth connection to use
    - ConnectionPayload
      - `_owner` string, required — ID of user that created this entry.
      - `_org` string, required — ID of user's active organization when creating this entry.
      - `validated` boolean — Whether we've tested and validated these credentials actually work. Relevant due to us persisting credentials *before* we attempt imports (rather than how we used to do it, after) to help with bug triage, particularly when errors occur during the initial `/commit/import` call and not during the followup task doing the actual import.
      - `config` object, required — JSON object specifying config on the connection. This is a value whose format WE specify; it needs to have enough information that we can map it to either a Meltano extractor or loader, but is fully distinct from either of those concepts. Avoiding coupling both this and table specifiers to whether they are pulling data in or sending data out is very useful and gives us very powerful generalization capabilities.
  - `specifier` object, required — The specifier used to track down the table. We expect a specifier rather than a full table specifier because we use this in a context where we are not working with an existing connection.
  - `table_config` object, nullable — Any additional config used for the import, not on the general connection
  - `dataset_name` string, nullable — Name of the dataset to create. If not provided, we'll create a dataset with a name derived from the table specifer.

## Response `201`

Successful Response

- string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/akkio/apis/fastapi.md) · [All operations](https://skmtc.net/akkio/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akkio/fastapi/versions/6662a407c637/schema)
