Can we see the Project Id in Octopus Web app?

Hi Team,

If a user is visiting a project in Octopus Server, will he be able to see the Project Id of the project?

Usage
Given that Octopus badges are not available out of the box, we are creating a service that would give the octopus release status in the format of a badge. (something similar to shields.io) It would use Octopus -api for that, which in turn relies on project-id (Project names are ephemeral; Project Id is fixed).

Thanks,
Nikhil

Hi @Nikhil_Agrawal,

Thanks for reaching out to Octopus Support!

When browsing to a project via the UI, you can’t straight-away see the Project ID of the project, this can be retrieved though.

When viewing the dashboard of a project, the URL will look something similar to:
https://OctopusURL/app#/Spaces-ID/projects/<PROJECT NAME>/deployments

If you trim /deployments off the end of the URL and replace the app# with api, you can make an API request to the project endpoint, which will reveal the Projects-Id in the first line of the JSON response.

https://OctopusURL/api/Spaces-ID/projects/<PROJECT NAME>
In this case, the Project-ID from my example looked like:

I hope this helps! Let me know if you have any further questions or if this isn’t what you were looking for.

Kind Regards,
Adam

Thanks for coming back.

Most of our users are Developers. So they even go to “Inspect window” and get the same info.
It’s for the layman, who is not so tech-savvy - so no option for them?

Thanks,
Nikhil

Hi Nikhil,

Just jumping in for Adam as he is off for the day. The Project ID is actually in the full raw task log. It shows all the IDs of related objects on the second line. To get there, just click into a deployment, click the TASK LOG tab, then RAW.

Do you think that method will work for them?

Please let me know.

Best,
Jeremy

Thanks, Jeremy.

Again something that is not provided out-of-the-box and needs to be dug - Let me see if for now we can use one of the two options suggested.

Still, it would be intuitive if we could include Project Id / Slug Id in the settings page of the project (albeit read-only) for Octopus-API/Octopus-Client work on those values. Please do let me know if a feature request needs to be raised for this in GitHub?

Cheers,
Nikhil

Hi @Nikhil_Agrawal,

I completely understand why you would want something like this as a feature rather than something you need to dig out with API requests or searching through task logs.

You can have a step print out the Project ID via Octopus System Variable, if you set a ‘Run a Script’ step to write-host $OctopusParameters["Octopus.Project.Id"]

That will print the ID of the project to the log, or can be stored to use during the project.

If you’d like to make a feature request, we have a user voice where other people do the same, you can find a link here: Octopus Deploy | User Voice.

Please let me know if there’s anything I can do to help you further and apologies I didn’t have a better answer for you.

Kind Regards,
Adam

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