Approvals - List

Get a list of approvals

GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals?api-version=6.0
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals?assignedToFilter={assignedToFilter}&statusFilter={statusFilter}&releaseIdsFilter={releaseIdsFilter}&typeFilter={typeFilter}&top={top}&continuationToken={continuationToken}&queryOrder={queryOrder}&includeMyGroupApprovals={includeMyGroupApprovals}&api-version=6.0

URI Parameters

Name In Required Type Description
organization
path True
  • string

The name of the Azure DevOps organization.

project
path True
  • string

Project ID or project name

api-version
query True
  • string

Version of the API to use. This should be set to '6.0' to use this version of the api.

assignedToFilter
query
  • string

Approvals assigned to this user.

continuationToken
query
  • integer
int32

Gets the approvals after the continuation token provided.

includeMyGroupApprovals
query
  • boolean

'true' to include my group approvals. Default is 'false'.

queryOrder
query

Gets the results in the defined order of created approvals. Default is 'descending'.

releaseIdsFilter
query
  • string
array (int32)

Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4.

statusFilter
query

Approvals with this status. Default is 'pending'.

top
query
  • integer
int32

Number of approvals to get. Default is 50.

typeFilter
query

Approval with this type.

Responses

Name Type Description
200 OK

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.release Grants the ability to read release artifacts, including folders, releases, release definitions and release environment.

Examples

Pending for a specific release
Pending for a specific user
Pending for all users

Pending for a specific release

Sample Request

GET https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/release/approvals?releaseIdsFilter=14&continuationToken=0&api-version=6.0

Sample Response

{
  "count": 1,
  "value": [
    {
      "id": 134,
      "revision": 1,
      "approver": {
        "id": "4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabfiber@outlook.com",
        "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=4adb1680-0eac-6149-b5ee-fc8b4f6ca227"
      },
      "approvalType": "preDeploy",
      "createdOn": "2017-06-01T09:42:16.053Z",
      "modifiedOn": "2017-06-01T09:42:16.053Z",
      "status": "pending",
      "comments": "",
      "isAutomated": false,
      "isNotificationOn": true,
      "trialNumber": 1,
      "attempt": 1,
      "rank": 1,
      "release": {
        "id": 14,
        "name": "Release-14",
        "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/releases/14",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://vsrm.dev.azure.com/fabrikam/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 53,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/approvals/134"
    }
  ]
}

Pending for a specific user

Sample Request

GET https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/release/approvals?assignedToFilter=Chuck Reinhart&continuationToken=0&api-version=6.0

Sample Response

{
  "count": 2,
  "value": [
    {
      "id": 2,
      "revision": 1,
      "approver": {
        "id": "4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabfiber@outlook.com",
        "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=4adb1680-0eac-6149-b5ee-fc8b4f6ca227"
      },
      "approvalType": "preDeploy",
      "createdOn": "2017-05-31T16:40:14.47Z",
      "modifiedOn": "2017-05-31T16:40:14.47Z",
      "status": "pending",
      "comments": "",
      "isAutomated": false,
      "isNotificationOn": true,
      "trialNumber": 1,
      "attempt": 1,
      "rank": 1,
      "release": {
        "id": 2,
        "name": "Release-2",
        "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/releases/2",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://vsrm.dev.azure.com/fabrikam/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 5,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/approvals/2"
    },
    {
      "id": 1,
      "revision": 1,
      "approver": {
        "id": "4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabfiber@outlook.com",
        "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=4adb1680-0eac-6149-b5ee-fc8b4f6ca227"
      },
      "approvalType": "preDeploy",
      "createdOn": "2017-05-31T16:40:04.577Z",
      "modifiedOn": "2017-05-31T16:40:04.577Z",
      "status": "pending",
      "comments": "",
      "isAutomated": false,
      "isNotificationOn": true,
      "trialNumber": 1,
      "attempt": 1,
      "rank": 1,
      "release": {
        "id": 1,
        "name": "Release-1",
        "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/releases/1",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://vsrm.dev.azure.com/fabrikam/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 1,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/approvals/1"
    }
  ]
}

Pending for all users

Sample Request

GET https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/release/approvals?continuationToken=0&api-version=6.0

Sample Response

{
  "count": 2,
  "value": [
    {
      "id": 2,
      "revision": 1,
      "approver": {
        "id": "4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabfiber@outlook.com",
        "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=4adb1680-0eac-6149-b5ee-fc8b4f6ca227"
      },
      "approvalType": "preDeploy",
      "createdOn": "2017-05-31T16:40:14.47Z",
      "modifiedOn": "2017-05-31T16:40:14.47Z",
      "status": "pending",
      "comments": "",
      "isAutomated": false,
      "isNotificationOn": true,
      "trialNumber": 1,
      "attempt": 1,
      "rank": 1,
      "release": {
        "id": 2,
        "name": "Release-2",
        "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/releases/2",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://vsrm.dev.azure.com/fabrikam/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 5,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/approvals/2"
    },
    {
      "id": 1,
      "revision": 1,
      "approver": {
        "id": "4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabfiber@outlook.com",
        "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=4adb1680-0eac-6149-b5ee-fc8b4f6ca227"
      },
      "approvalType": "preDeploy",
      "createdOn": "2017-05-31T16:40:04.577Z",
      "modifiedOn": "2017-05-31T16:40:04.577Z",
      "status": "pending",
      "comments": "",
      "isAutomated": false,
      "isNotificationOn": true,
      "trialNumber": 1,
      "attempt": 1,
      "rank": 1,
      "release": {
        "id": 1,
        "name": "Release-1",
        "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/releases/1",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://vsrm.dev.azure.com/fabrikam/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 1,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://vsrm.dev.azure.com/fabrikam/MyFirstProject/_apis/Release/approvals/1"
    }
  ]
}

Definitions

ApprovalStatus

Gets or sets the status of the approval.

ApprovalType

Gets or sets the type of approval.

IdentityRef
ProjectReference
ReferenceLinks

The class to represent a collection of REST reference links.

ReleaseApproval
ReleaseApprovalHistory
ReleaseDefinitionShallowReference
ReleaseEnvironmentShallowReference
ReleaseQueryOrder

Gets the results in the defined order of created approvals. Default is 'descending'.

ReleaseShallowReference

ApprovalStatus

Gets or sets the status of the approval.

Name Type Description
approved
  • string

Indicates the approval is approved.

canceled
  • string

Indicates the approval is canceled.

pending
  • string

Indicates the approval is pending.

reassigned
  • string

Indicates the approval is reassigned.

rejected
  • string

Indicates the approval is rejected.

skipped
  • string

Indicates the approval is skipped.

undefined
  • string

Indicates the approval does not have the status set.

ApprovalType

Gets or sets the type of approval.

Name Type Description
all
  • string

Indicates all approvals.

postDeploy
  • string

Indicates the approvals which executed after deployment.

preDeploy
  • string

Indicates the approvals which executed before deployment.

undefined
  • string

Indicates the approval type does not set.

IdentityRef

Name Type Description
_links

This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.

descriptor
  • string

The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.

directoryAlias
  • string

Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary

displayName
  • string

This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.

id
  • string
imageUrl
  • string

Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary

inactive
  • boolean

Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary

isAadIdentity
  • boolean

Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)

isContainer
  • boolean

Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)

isDeletedInOrigin
  • boolean
profileUrl
  • string

Deprecated - not in use in most preexisting implementations of ToIdentityRef

uniqueName
  • string

Deprecated - use Domain+PrincipalName instead

url
  • string

This url is the full route to the source resource of this graph subject.

ProjectReference

Name Type Description
id
  • string

Gets the unique identifier of this field.

name
  • string

Gets name of project.

The class to represent a collection of REST reference links.

Name Type Description
links
  • object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

ReleaseApproval

Name Type Description
approvalType

Gets or sets the type of approval.

approvedBy

Gets the identity who approved.

approver

Gets or sets the identity who should approve.

attempt
  • integer

Gets or sets attempt which specifies as which deployment attempt it belongs.

comments
  • string

Gets or sets comments for approval.

createdOn
  • string

Gets date on which it got created.

history

Gets history which specifies all approvals associated with this approval.

id
  • integer

Gets the unique identifier of this field.

isAutomated
  • boolean

Gets or sets as approval is automated or not.

modifiedOn
  • string

Gets date on which it got modified.

rank
  • integer

Gets or sets rank which specifies the order of the approval. e.g. Same rank denotes parallel approval.

release

Gets releaseReference which specifies the reference of the release to which this approval is associated.

releaseDefinition

Gets releaseDefinitionReference which specifies the reference of the release definition to which this approval is associated.

releaseEnvironment

Gets releaseEnvironmentReference which specifies the reference of the release environment to which this approval is associated.

revision
  • integer

Gets the revision number.

status

Gets or sets the status of the approval.

url
  • string

Gets url to access the approval.

ReleaseApprovalHistory

Name Type Description
approver

Identity of the approver.

changedBy

Identity of the object who changed approval.

comments
  • string

Approval history comments.

createdOn
  • string

Time when this approval created.

modifiedOn
  • string

Time when this approval modified.

revision
  • integer

Approval history revision.

ReleaseDefinitionShallowReference

Name Type Description
_links

Gets the links to related resources, APIs, and views for the release definition.

id
  • integer

Gets the unique identifier of release definition.

name
  • string

Gets or sets the name of the release definition.

path
  • string

Gets or sets the path of the release definition.

projectReference

Gets or sets project reference.

url
  • string

Gets the REST API url to access the release definition.

ReleaseEnvironmentShallowReference

Name Type Description
_links

Gets the links to related resources, APIs, and views for the release environment.

id
  • integer

Gets the unique identifier of release environment.

name
  • string

Gets or sets the name of the release environment.

url
  • string

Gets the REST API url to access the release environment.

ReleaseQueryOrder

Gets the results in the defined order of created approvals. Default is 'descending'.

Name Type Description
ascending
  • string

Return results in ascending order.

descending
  • string

Return results in descending order.

ReleaseShallowReference

Name Type Description
_links

Gets the links to related resources, APIs, and views for the release.

id
  • integer

Gets the unique identifier of release.

name
  • string

Gets or sets the name of the release.

url
  • string

Gets the REST API url to access the release.