I am building a JSON body based on the documentation. It looks like this (copied from the documentation):
{
"definitionId": 1,
"description": "Creating Sample release",
"artifacts": [
{
"alias": "Fabrikam.CI",
"instanceReference": {
"id": "2",
"name": null
}
}
],
"isDraft": false,
"reason": "none",
"manualEnvironments": null
}
However, there aren't any artifacts for this release. It's just stages that need to run. I have tried setting the "artifacts" value to null and false. I also tried removing the "artifacts" key altogether, like this:
{
"definitionId": 1,
"description": "Creating Sample release",
"isDraft": false,
"reason": "none",
"manualEnvironments": null
}
Unfortunately, all of these guesses just throw one of these errors:
The artifact alias cannot be empty. Specify a valid artifact alias and try again.
or
Release pipeline name cannot be empty. Specify a name and try again.
How do I create a release that doesn't include artifacts using the REST API?
How do I create a release that doesn't include artifacts using the REST API?
Just leave it blank and it will work. Use format like this:
{
"definitionId": 1,
"description": "Creating Sample release",
"artifacts": [],
"isDraft": false,
"reason": "none",
"manualEnvironments": null
}
If the response is 200 OK, it means you run the rest api successfully. (This api is used to create release instead of creating release pipeline, you should know that! )
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments