{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-devops/json-schema/microsoft-azure-devops-release-definition-schema.json",
  "title": "ReleaseDefinition",
  "description": "A release pipeline definition",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-devops-release-definitions-api-openapi.yml#/components/schemas/ReleaseDefinition",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique numeric identifier of the definition"
    },
    "name": {
      "type": "string",
      "description": "Display name of the release definition"
    },
    "path": {
      "type": "string",
      "description": "Folder path for the definition"
    },
    "description": {
      "type": "string",
      "description": "Description of the release definition"
    },
    "revision": {
      "type": "integer",
      "description": "Current revision number"
    },
    "createdOn": {
      "type": "string",
      "format": "date-time"
    },
    "modifiedOn": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "$ref": "#/$defs/IdentityRef"
    },
    "modifiedBy": {
      "$ref": "#/$defs/IdentityRef"
    },
    "isDeleted": {
      "type": "boolean",
      "description": "Whether this definition has been deleted"
    },
    "environments": {
      "type": "array",
      "description": "Environments (deployment stages) in the release pipeline",
      "items": {
        "$ref": "#/$defs/ReleaseDefinitionEnvironment"
      }
    },
    "artifacts": {
      "type": "array",
      "description": "Artifact sources used by this release definition",
      "items": {
        "$ref": "#/$defs/Artifact"
      }
    },
    "triggers": {
      "type": "array",
      "description": "Triggers that automatically create releases",
      "items": {
        "type": "object"
      }
    },
    "variables": {
      "type": "object",
      "description": "Release-level variables",
      "additionalProperties": {
        "$ref": "#/$defs/ConfigurationVariableValue"
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source": {
      "type": "string",
      "enum": [
        "undefined",
        "restApi",
        "userInterface",
        "ibiza",
        "portalExtensionApi"
      ]
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  },
  "$defs": {
    "Artifact": {
      "type": "object",
      "description": "An artifact used in a release",
      "properties": {
        "alias": {
          "type": "string",
          "description": "Alias for the artifact within the release definition"
        },
        "type": {
          "type": "string",
          "description": "Artifact type",
          "enum": [
            "build",
            "jenkins",
            "github",
            "nuget",
            "team",
            "externaltfsbuild",
            "git",
            "tfvc"
          ]
        },
        "definitionReference": {
          "type": "object",
          "description": "Reference to the artifact source definition",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        },
        "isPrimary": {
          "type": "boolean",
          "description": "Whether this is the primary artifact"
        },
        "isRetained": {
          "type": "boolean",
          "description": "Whether this artifact is retained"
        },
        "sourceId": {
          "type": "string",
          "description": "Source identifier for the artifact"
        }
      }
    },
    "ConfigurationVariableValue": {
      "type": "object",
      "description": "A variable value in a release definition or release",
      "properties": {
        "value": {
          "type": "string",
          "description": "The variable value"
        },
        "isSecret": {
          "type": "boolean",
          "description": "Whether the value is treated as a secret"
        },
        "allowOverride": {
          "type": "boolean",
          "description": "Whether the value can be overridden when creating a release"
        }
      }
    },
    "IdentityRef": {
      "type": "object",
      "description": "Reference to an Azure DevOps user identity",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "displayName": {
          "type": "string"
        },
        "uniqueName": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "imageUrl": {
          "type": "string",
          "format": "uri"
        },
        "descriptor": {
          "type": "string"
        }
      }
    },
    "ReleaseDefinitionEnvironment": {
      "type": "object",
      "description": "An environment definition within a release pipeline",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string",
          "description": "Name of the environment"
        },
        "rank": {
          "type": "integer",
          "description": "Sequence order of the environment in the pipeline"
        },
        "deployPhases": {
          "type": "array",
          "description": "Deployment phases in this environment",
          "items": {
            "type": "object"
          }
        },
        "conditions": {
          "type": "array",
          "description": "Conditions that must be met before deploying to this environment",
          "items": {
            "type": "object"
          }
        },
        "preDeployApprovals": {
          "type": "object",
          "description": "Pre-deployment approval configuration"
        },
        "postDeployApprovals": {
          "type": "object",
          "description": "Post-deployment approval configuration"
        },
        "environmentOptions": {
          "type": "object",
          "description": "Environment-level options"
        },
        "variables": {
          "type": "object",
          "description": "Environment-level variables",
          "additionalProperties": {
            "$ref": "#/$defs/ConfigurationVariableValue"
          }
        },
        "demands": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    }
  }
}