Skip to main content
POST
/
environments
/
{environment}
/
commands
Run command
curl --request POST \
  --url https://app.laravel.cloud/api/environments/{environment}/commands \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "command": "<string>"
}'
{
  "data": {
    "id": "<string>",
    "type": "commands",
    "attributes": {
      "command": "<string>",
      "output": "<string>",
      "status": "pending",
      "exit_code": 0,
      "failure_reason": "<string>",
      "started_at": "2023-11-07T05:31:56Z",
      "finished_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z"
    },
    "relationships": {
      "environment": {
        "data": {
          "type": "environments",
          "id": "<string>"
        }
      },
      "deployment": {
        "data": {
          "type": "deployments",
          "id": "<string>"
        }
      },
      "initiator": {
        "data": {
          "type": "users",
          "id": "<string>"
        }
      }
    },
    "links": {
      "self": {
        "href": "<string>",
        "rel": "<string>",
        "describedby": "<string>",
        "title": "<string>",
        "type": "<string>",
        "hreflang": "<string>",
        "meta": {}
      }
    }
  }
}

Authorizations

Authorization
string
header
required

The Bearer Token generated on the Cloud UI.

Path Parameters

environment
string
required

The environment identifier

Body

application/json
command
string
required
Required string length: 1 - 255

Response

CommandResource

data
object
required