Pages /deployments API doesn't return a list

The doc says it returns a list, but it doesn’t - and the response in the API doc seems to confirm that.

I believe this used to return a list. Did it change? It has the same response signature as getting a single deployment’s info.

Looking at the code, it does look like we return an array. Can you paste the entire request and response?

I think I can just use the doc to model this:

GET accounts/:account_id/pages/projects/:project_name/deployments

returns a single deployment as a result, not an array

{
“success”: true,
“errors”: ,
“messages”: ,
“result”: {
“id”: “f64788e9-fccd-4d4a-a28a-cb84f88f6”,
“short_id”: “f64788e9”,
“project_id”: “7b162ea7-7367-4d67-bcde-1160995d5”,
“project_name”: “ninjakittens”,
“environment”: “preview”,

Still looking for guidance here. The API appears to perform just like the doc says it will, and the doc says that it will return a single deployment.

apiCloudflarecom/#pages-deployment-get-deployments

I’m not able to replicate this one personally.

GET https://api.cloudflare.com/client/v4/accounts/:acccountid/pages/projects/:project/deployments returns an array of deployments.

image

I also cannot repro, even with a single deployment it’s an array

$ curl_prod pages/projects/test-no-git/deployments
{
  "result": [
    {
      "id": "71dbbf1b-918e-480e-9be2-2138646827c3",
      "short_id": "71dbbf1b",
      "project_id": "93e76333-ec35-44f5-a384-8daf2db054d6",
      "project_name": "test-no-git",
      "environment": "production",
      "url": "https://71dbbf1b.test-no-git.pages.dev",
      "created_on": "2022-06-09T17:14:42.064939Z",
      "modified_on": "2022-06-09T17:14:43.532342Z",
      "latest_stage": {
        "name": "deploy",
        "started_on": null,
        "ended_on": "2022-06-09T17:14:43.532342Z",
        "status": "success"
      },
      "deployment_trigger": {
        "type": "ad_hoc",
        "metadata": {
          "branch": "production",
          "commit_hash": "",
          "commit_message": "",
          "commit_dirty": false
        }
      },
      "stages": [
        {
          "name": "queued",
          "started_on": "2022-06-09T17:14:42.064939Z",
          "ended_on": null,
          "status": "active"
        },
        {
          "name": "initialize",
          "started_on": null,
          "ended_on": null,
          "status": "idle"
        },
        {
          "name": "clone_repo",
          "started_on": null,
          "ended_on": null,
          "status": "idle"
        },
        {
          "name": "build",
          "started_on": null,
          "ended_on": null,
          "status": "idle"
        },
        {
          "name": "deploy",
          "started_on": null,
          "ended_on": "2022-06-09T17:14:43.532342Z",
          "status": "success"
        }
      ],
      "build_config": {
        "build_command": null,
        "destination_dir": null,
        "root_dir": null,
        "web_analytics_tag": null,
        "web_analytics_token": null,
        "fast_builds": true
      },
      "env_vars": {},
      "aliases": null,
      "is_skipped": false,
      "production_branch": "production"
    }
  ],
  "success": true,
  "errors": [],
  "messages": [],
  "result_info": {
    "page": 1,
    "per_page": 25,
    "count": 1,
    "total_count": 1
  }
}

If you can send your full request and response that would help us know what’s going on.