Replaces a Source site's configuration
Replaces the active configuration of a Source CMS site. Every request says in its source property where the replacement configuration is to be read from:
- request — the configuration is the YAML document in the configuration property. Send back what this path's GET returned, edited or unchanged; a document larger than 1 MiB is refused with a 400.
- github — the site reads the configuration from its own connected GitHub repository. Nothing is sent, so the body is just {"source": "github"}; sending a configuration alongside it is refused with a 400 rather than ignored.
Both do the same work from there on. Each starts one import, returns the same 202, and is read at /source-sites/{sourceSiteId}/config/import, whose own source property reports the value the request asked for.
This write is what starts an import. There is nothing to POST or PUT to /source-sites/{sourceSiteId}/config/import, which is read-only: naming the configuration the site should end up with keeps this resource's read and write on one path, and the import that write creates is read at that other one.
This is an asynchronous operation. The endpoint returns immediately with a 202 Accepted response, which means the import was accepted, not that it has been applied.
The response's self link points at /source-sites/{sourceSiteId}/config/import, which is where the import reports what it did — including a refusal, whether for a document whose site UUID does not match or for configuration the site rejects. Neither this response nor re-reading this path says anything about the outcome. That read is cheap and safe to poll.
A site may have only one configuration sync in progress at a time. A request for a site that already has one is refused with a 409 straight away — the rule is checked before the document is read or applied and without touching the site, so a second request is rejected rather than queued, and nothing about the running import changes. That running import can be read at /source-sites/{sourceSiteId}/config/import.
A github request against a site with no connected GitHub repository is refused with a 409 the same way, and for the same reason: there is nothing to read the configuration from, and that is known before the site is touched.
Permissions: The authenticated user must have the site admin role on the site.
Request
- Base URLhttps://api.acquia.com/v3
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Unique identifier for the Source site.
Request body
Response
Site configuration import accepted
Example response
{
"_links": {
"self": {
"href": "https://api.acquia.com/v3/resources/1"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.