Shut down the Vercel server.

At the moment, it is not possible to shut down the Vercel servers.
However, it is possible to pause the project, which can be done.

Vercel offers two different pause methods.

  1. Activate the spend amount in the Spend Management section and pause the project when the spend amount is reached
  2. Pause the project using the REST API.

The official documentation is available here.

Here you can try the method of pausing with the API.

目次

Suspend Vercel with API.

The REST API Endpoint to be paused is here.

https://vercel.com/docs/rest-api/endpoints#tag/projects/pause-a-project

Get access token.

Access https://vercel.com/account/settings/tokens and Create Token to obtain an access token.

Get project id

It is listed「Settings」→「General」→「Project ID」

Execute the API

Command prompt, so run it with curl.

curl -X POST "https://api.vercel.com/v1/projects/{project_id}/pause" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json"

After executing the command, accessing the project site will display ‘This Deployment is paused by owner’ and a 503 will be returned.

Resume from pause with Vercel’s API.

Click here for the API to be reopened.

https://vercel.com/docs/rest-api/endpoints#tag/projects/unpause-a-project

curl -X POST "https://api.vercel.com/v1/projects/{project_id}/unpause" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json"
シェア!

この記事を書いた人

kenichiのアバター kenichi エンジニア・写真家 | Engineer and photographer

Nomadic worker who travels all over Japan and abroad; worked as a technical sales person for five years before going independent.
Works as a freelance engineer on website production and application development. Currently working to bring interesting things by interesting people to the world, while seeking to move abroad.

目次