Skip to content

POST /wpcom/v2/sites/$wpcom_site/hosting/code-deployments/$deployment_id/runs

Initiate a manual deployment run of a code using its deployment_id.

Resource Information

   
Method POST
URL https://public-api.wordpress.com/wpcom/v2/sites/$wpcom_site/hosting/code-deployments/$deployment_id/runs
Requires authentication? Yes

Method Parameters

Parameter Type Required Description
wpcom_site string | integer Yes A domain or blog ID.
deployment_id integer Yes A deployment ID.

Response Example

					
						{
    "id": 1,
    "code_deployment_id": 1,
    "created_on": "2024-06-03T16:48:47+00:00",
    "started_on": "2024-06-03T16:48:47+00:00",
    "completed_on": null,
    "status": "queued",
    "failure_code": null,
    "triggered_by_user_id": 123,
    "metadata": {
        "commit_message": "Commit message",
        "commit_sha": "cad111ff68f14fc06bd69ab42b3b9b8044190a9c",
        "author": {
            "id": 1,
            "name": "owner",
            "avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/1?v=4",
            "profile_url": "https:\/\/github.com\/owner"
        },
        "workflow_run_id": 111
    },
    "code_deployment": {
        "id": 1,
        "blog_id": 1,
        "created_by_user_id": 123,
        "created_on": "2024-06-03T14:33:42+00:00",
        "updated_on": "2024-06-03T14:35:28+00:00",
        "external_repository_id": 1,
        "repository_name": "owner\/repository-name",
        "branch_name": "master",
        "target_dir": "\/wp-content\/plugins\/repository-name",
        "is_automated": false,
        "installation_id": 1,
        "created_by": null,
        "current_deployed_run": null,
        "current_deployment_run": null,
        "workflow_path": ".github\/workflows\/wpcom.yml"
    }
}					
				

Resource Errors

This endpoint does not return any errors.