Attach artifact to a deployment (via API)

I am deploying using Octopus deploy to a Linux machine using raw scripting (bash).
I understand that by using the raw scripting method, I won’t have access to the bootstrap functions which will allow me to attach a file to a deployment.

I wanted to know if was possible to do this via the API. I have access to the API key, and I think I should be able to determine the release/environment/project and deployment using octopus variables and the rest API.

My deployment produces one or more test result files, and I was hoping that you could either provide or point me to an example of using a curl command to upload a file and attach it to a deployment as a deployment artifact.

I have had a go using postman, but can’t figure out how to do it via REST using the post method to /api/artifacts. I have also tried to do it via C# using the latest NuGET package, but was not successful either.


Hi Jason,

Thanks for reaching out. I’m afraid that’s not possible in the current state of Artifacts. Its not a bad idea though. Would you mind submitting it in Uservoice? If enough users back the idea, I can see it being implemented in some way.
It is possible to create an artifact associated to a release, just not a deployment. most of the documentation around the API can be found by going to /swaggerui

I hope that helps, let me know if you have any further questions.

Kind Regards,

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