Approvals - List

Get a list of approvals

GET https://{accountName}.vsrm.visualstudio.com/{project}/_apis/release/approvals?api-version=4.1-preview.3
GET https://{accountName}.vsrm.visualstudio.com/{project}/_apis/release/approvals?assignedToFilter={assignedToFilter}&statusFilter={statusFilter}&releaseIdsFilter={releaseIdsFilter}&typeFilter={typeFilter}&top={top}&continuationToken={continuationToken}&queryOrder={queryOrder}&includeMyGroupApprovals={includeMyGroupApprovals}&api-version=4.1-preview.3

URI Parameters

Name In Required Type Description
accountName
path True
  • string

The name of the Visual Studio Team Services account.

project
path True
  • string

Project ID or project name

assignedToFilter
query
  • string

Approvals assigned to this user.

statusFilter
query

Approvals with this status. Default is 'pending'.

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.

typeFilter
query

Approval with this type.

top
query
  • integer
int32

Number of approvals to get. Default is 50.

continuationToken
query
  • integer
int32

Gets the approvals after the continuation token provided.

queryOrder
query

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

includeMyGroupApprovals
query
  • boolean

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

api-version
query True
  • string

Version of the API to use. This should be set to '4.1-preview.3' to use this version of the api.

Responses

Name Type Description
200 OK

successful operation

Examples

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

Pending for a specific release

Sample Request

GET https://fabrikam.vsrm.visualstudio.com/MyFirstProject/_apis/release/approvals?releaseIdsFilter=14&continuationToken=0&api-version=4.1-preview.3

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://app.vssps.visualstudio.com/A168224e4-29ff-4081-9954-c8780ce81117/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://fabfiber-inc.visualstudio.com/_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://fabfiber-inc.vsrm.visualstudio.com/MyFirstProject/_apis/Release/releases/14",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://fabfiber-inc.vsrm.visualstudio.com/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 53,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://fabfiber-inc.vsrm.visualstudio.com/MyFirstProject/_apis/Release/approvals/134"
    }
  ]
}

Pending for a specific user

Sample Request

GET https://fabrikam.vsrm.visualstudio.com/MyFirstProject/_apis/release/approvals?assignedToFilter=Chuck Reinhart&continuationToken=0&api-version=4.1-preview.3

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://app.vssps.visualstudio.com/A168224e4-29ff-4081-9954-c8780ce81117/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://fabfiber-inc.visualstudio.com/_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://fabfiber-inc.vsrm.visualstudio.com/MyFirstProject/_apis/Release/releases/2",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://fabfiber-inc.vsrm.visualstudio.com/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 5,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://fabfiber-inc.vsrm.visualstudio.com/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://app.vssps.visualstudio.com/A168224e4-29ff-4081-9954-c8780ce81117/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://fabfiber-inc.visualstudio.com/_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://fabfiber-inc.vsrm.visualstudio.com/MyFirstProject/_apis/Release/releases/1",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://fabfiber-inc.vsrm.visualstudio.com/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 1,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://fabfiber-inc.vsrm.visualstudio.com/MyFirstProject/_apis/Release/approvals/1"
    }
  ]
}

Pending for all users

Sample Request

GET https://fabrikam.vsrm.visualstudio.com/MyFirstProject/_apis/release/approvals?continuationToken=0&api-version=4.1-preview.3

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://app.vssps.visualstudio.com/A168224e4-29ff-4081-9954-c8780ce81117/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://fabfiber-inc.visualstudio.com/_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://fabfiber-inc.vsrm.visualstudio.com/MyFirstProject/_apis/Release/releases/2",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://fabfiber-inc.vsrm.visualstudio.com/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 5,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://fabfiber-inc.vsrm.visualstudio.com/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://app.vssps.visualstudio.com/A168224e4-29ff-4081-9954-c8780ce81117/_apis/Identities/4adb1680-0eac-6149-b5ee-fc8b4f6ca227",
        "imageUrl": "https://fabfiber-inc.visualstudio.com/_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://fabfiber-inc.vsrm.visualstudio.com/MyFirstProject/_apis/Release/releases/1",
        "_links": {}
      },
      "releaseDefinition": {
        "id": 1,
        "name": "MyShuttle.CD",
        "url": "https://fabfiber-inc.vsrm.visualstudio.com/d07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
        "_links": {}
      },
      "releaseEnvironment": {
        "id": 1,
        "name": "Dev",
        "_links": {}
      },
      "url": "https://fabfiber-inc.vsrm.visualstudio.com/MyFirstProject/_apis/Release/approvals/1"
    }
  ]
}

Definitions

ApprovalStatus

Gets or sets the status of the approval.

ApprovalType

Gets or sets the type of approval.

IdentityRef
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
canceled
  • string
pending
  • string
reassigned
  • string
rejected
  • string
skipped
  • string
undefined
  • string

ApprovalType

Gets or sets the type of approval.

Name Type Description
all
  • string
postDeploy
  • string
preDeploy
  • string
undefined
  • string

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
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
inactive
  • boolean
isAadIdentity
  • boolean
isContainer
  • boolean
profileUrl
  • string
uniqueName
  • string
url
  • string

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

ReferenceLinks

The class to represent a collection of REST reference links.

Name Type Description
links
  • <string, 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.

isNotificationOn
  • boolean
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.

trialNumber
  • integer
url
  • string

Gets url to access the approval.

ReleaseApprovalHistory

Name Type Description
approver
changedBy
comments
  • string
createdOn
  • string
modifiedOn
  • string
revision
  • integer

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.

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
descending
  • string

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.