---
title: "Retrieves the state of a Source site's latest configuration import"
method: GET
path: "/source-sites/{sourceSiteId}/config/import"
tags: ["Source Sites"]
---

# Retrieves the state of a Source site's latest configuration import

`GET /source-sites/{sourceSiteId}/config/import`

## Request

- Base URL: `https://api.acquia.com/v3`
- URL: `https://api.acquia.com/v3/source-sites/{sourceSiteId}/config/import`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/docs/source-sites/:sourceSiteId/config/import/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the site's latest configuration import — the last one started — with its
status, when it started and finished, and, for a refused import, every violation
and the reason for it.

This path is read-only, and writing to it is not how an import is started. An
import is started by `PUT /source-sites/{sourceSiteId}/config`, whose `source`
property names where the configuration is read from: `request` sends the document
the site should end up with, and `github` has the site read it from its own connected
GitHub repository. The `source` property below reports the one this import
used. Keeping both on that one path keeps the configuration's read and write
together, so a caller can send back what the GET there returned. What that write
creates is read here, and its 202 response links here for exactly that reason.

This read does not touch the site, so a pipeline can poll it while an import runs.
Reading the configuration itself does run a task against the site; that is the GET
on `/source-sites/{sourceSiteId}/config`.

Only one import runs per site at a time, so a caller that has just started one is
reading its own. A caller that waits a long time before reading may not be: a later
import becomes the site's latest, and nothing here distinguishes the two. Read it
while the import you started is still running.

A site that has never had an import responds 404, as does a site that does not
exist.

Only imports are read here. Reading a site's configuration is synchronous — its
caller holds the request open and leaves with the document or an error — so there
is nothing to poll for.

**Permissions:** The authenticated user must have the `site admin` role on the site.

## Path parameters

- `sourceSiteId` string, required

## Response `200`

The site's latest configuration import

- object: A configuration import of a Source CMS site. At most one import runs per site at a time, so the one worth reading is the site's latest: the last one started.
  - `id` string, required: The unique identifier of this import, for logs and for support to trace it by. A caller cannot use it to confirm that the import it is reading is the one it started, because nothing hands the identifier back when an import is started.
  - `source` 'request' | 'github', required: Where the import read its configuration from — the same value the write that started it asked for. - `request` — the document sent in that write. - `github` — the site's connected GitHub repository, read by the site itself.
  - `status` 'running' | 'succeeded' | 'refused' | 'failed', required: Where the import got to. - `running` — accepted and not finished. It says nothing about the outcome: an import that has only just started can still end as any of the three below. - `succeeded` — the configuration was applied. - `refused` — nothing was applied, because the configuration was rejected. `violations` says what was wrong. - `failed` — the import began and could not finish; the site was returned to the state it held beforehand.
  - `started_at` string, date-time, required: ISO 8601 datetime when the import was accepted
  - `finished_at` string, date-time, nullable: ISO 8601 datetime when the import reached its final status, or null while it is running
  - `violations` object[]: Why a refused import was refused. Every violation the site found is listed, not only the first, and one configuration object may appear more than once when it broke more than one rule. Absent unless the status is `refused`.
    - `collection` string: Which configuration the rejected object belongs to: `language.<langcode>` for a translation override, absent for the site's own configuration. An object and its translations are separate objects, and each can be rejected on its own.
    - `config` string, nullable, required: The configuration object that was rejected. Null for the one violation that is about the document as a whole rather than one object: a site UUID that does not match the target.
    - `path` string: Which property within the rejected object failed, as a dotted path. The empty string when the violation is about the whole object rather than one property within it. Absent only when `config` is null, which has no object to point into.
    - `code` string, required: Names the rule that rejected it, so a caller can recognise a kind of failure without reading the message. Each code is stable once it appears, but the set is not closed: the site adds one whenever it adds a validation rule, and it is not enumerated here for that reason. Treat an unrecognised code as opaque and fall back to the message.
    - `message` string, required: Plain-language reason, naming what would have gone wrong had the import been applied.
  - `_links` object, required: HAL links for the resource
    - `self` SourcePlatformAPIHalLink, required: HAL link object
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` boolean: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
  - `_embedded` object: Embedded resources (optional)

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api.md) - [All operations](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/revisions/508f8f94456d?raw)
