Get a deployment
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/hosting/deployments/example';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/stores/example/hosting/deployments/example \ --header 'x-api-key: <x-api-key>'Returns one deployment with its build status, the error when the build failed, and the preview address while a preview runs.
Required scopes: deploy:storefront
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The deployment ID.
The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
Where the deployment is in its life. uploading: waiting for the source to be uploaded.
queued and building: the build is waiting or running. built: built and ready to
run. running: a preview or production runs it. stopped: built but not running.
failed: the build failed; see error.
Why the build failed, or null.
When the deployment was created, as an ISO 8601 timestamp.
When the build started, as an ISO 8601 timestamp, or null.
When the build ended, as an ISO 8601 timestamp, or null while it has not ended.
When the deployment’s preview stops running, as an ISO 8601 timestamp, or null.
The address of the running preview, or null when none is running.
ID of the theme the build is for, or null.
Whether the store’s storefront serves this deployment. Only in the list.
The theme the build is for. Only in the list; null when the theme no longer exists.
object
Theme ID.
Theme name.
Deployment ID, such as d_.... Use it in the other deployment routes.
The kind of deployment. Deployments created through the API are preview; promoting one makes the store serve it.
Example
{ "status": "uploading"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}