Create deployment
POST
/deployments
const url = 'https://example.com/api/deployments';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"projectId":"example","serverId":"example","destinationId":"example","environmentId":"example","resourceId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/deployments \ --header 'Content-Type: application/json' \ --data '{ "projectId": "example", "serverId": "example", "destinationId": "example", "environmentId": "example", "resourceId": "example" }'Creates a deployment from an explicit project, server, environment, and resource context. Public docs: /docs/deploy/sources/#deployment-source
Request Body required
Section titled “Request Body required ” Media type application/json
object
projectId
required
string
serverId
required
string
destinationId
string
environmentId
required
string
resourceId
required
string
Example generated
{ "projectId": "example", "serverId": "example", "destinationId": "example", "environmentId": "example", "resourceId": "example"}Responses
Section titled “ Responses ”OK
Media type application/json
object
id
required
string
Example generated
{ "id": "example"}