Why does api/deploymentprocesses?ids= doesn't show the steps

Hello,

I’ve been trying to discover and edit my deployment process of different projects but for some reason i can’t seem to get some projects to show there deployment steps.

When i make a call to /api/deploymentprocesses?ids= i only get a result showing me an empty deployment process. When i make a call to /api/deploymentprocesses i get some projects (max 30 deployment processes) with ‘items’ in the result, but only for a select number of projects.

It almost appears that only a select project can show it steps, but not all.

When i try to make a call to /api/deploymentprocesses?ids= with a project id which results from /api/deploymentprocesses it shows individual steps in the result, but not if i try a different project number.

Is there a cap on how many projects can show it steps using the API, and how is that max number determined?

Thanks in advance!

Hi Jeffrey,

You are right. By default the “deploymentprocesses” api defaults to using the following two query strings ?skip=0&take=30.

This means “Skip the first 0 Deployment Processes, then take the next 30.”

If you have a look at the screenshots you’ve provided, there is a section called “links” within the results of the deploymentprocess api call. One of the links, “Page.All”, shows you the api call to pull the full list of items is:
?skip=0&take=2147483647

You should be able to append your deployment process api call with
?skip=0&take=2147483647&Ids=xxxxx

This will give you the items that match the Ids specified.

Please let me know if you have any other questions.

Regards,

Dane

Hi Dane,

That solved my problem, partially…but i have it fixed now.

I was indeed working on the first 30 items only, but tried to play around with &take=0&skip=200 but didn’t get the right results (or at least 1 exact result with 0 items in it).

When i took a look at the Links section in those results that returned correctly, i saw on of the result stating that the complete URL to the deploymentprocess (which i wanted to grab) was actually /api/Spaces-1/deploymentprocesses/deploymentprocess-Projects-xxx".
That last part was what i did wrong. I had

$deploymentprocess = (Invoke-RestMethod -Method Get -Uri “https://octopus.wur.nl/api/deploymentprocesses?skip=0&take=2147483647&IDs=Projects-xxx” -Headers $header) instead of $deploymentprocess = (Invoke-RestMethod -Method Get -Uri “https://octopus.wur.nl/api/deploymentprocesses?skip=0&take=2147483647&IDs=deploymentprocess-Projects-xxx” -Headers $header)

I wasn’t aware that the complete api call needed $Ids=deploymentprocess-Projects-xxx

I works like a charm now!

Thanks in advance and sorry for the late reply!

Best regards,
Jeffrey

Thanks for the update and great news, Jeffrey!
Better late, than never.

Dane

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.