1

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?

0

1 Answer 1

3

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! )

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.