Approvals - List
Get a list of approvals
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals?api-version=5.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=5.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 '5.0' to use this version of the api. |
assigned
|
query |
string |
Approvals assigned to this user. |
|
continuation
|
query |
integer int32 |
Gets the approvals after the continuation token provided. |
|
include
|
query |
boolean |
'true' to include my group approvals. Default is 'false'. |
|
query
|
query |
Gets the results in the defined order of created approvals. Default is 'descending'. |
||
release
|
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. |
|
status
|
query |
Approvals with this status. Default is 'pending'. |
||
top
|
query |
integer int32 |
Number of approvals to get. Default is 50. |
|
type
|
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 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=5.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://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_apis/Release/releases/14",
"_links": {}
},
"releaseDefinition": {
"id": 1,
"name": "MyShuttle.CD",
"url": "https://https://vsrm.dev.azure.com/fabrikamd07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
"_links": {}
},
"releaseEnvironment": {
"id": 53,
"name": "Dev",
"_links": {}
},
"url": "https://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_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=5.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://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_apis/Release/releases/2",
"_links": {}
},
"releaseDefinition": {
"id": 1,
"name": "MyShuttle.CD",
"url": "https://https://vsrm.dev.azure.com/fabrikamd07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
"_links": {}
},
"releaseEnvironment": {
"id": 5,
"name": "Dev",
"_links": {}
},
"url": "https://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_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://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_apis/Release/releases/1",
"_links": {}
},
"releaseDefinition": {
"id": 1,
"name": "MyShuttle.CD",
"url": "https://https://vsrm.dev.azure.com/fabrikamd07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
"_links": {}
},
"releaseEnvironment": {
"id": 1,
"name": "Dev",
"_links": {}
},
"url": "https://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_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=5.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://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_apis/Release/releases/2",
"_links": {}
},
"releaseDefinition": {
"id": 1,
"name": "MyShuttle.CD",
"url": "https://https://vsrm.dev.azure.com/fabrikamd07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
"_links": {}
},
"releaseEnvironment": {
"id": 5,
"name": "Dev",
"_links": {}
},
"url": "https://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_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://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_apis/Release/releases/1",
"_links": {}
},
"releaseDefinition": {
"id": 1,
"name": "MyShuttle.CD",
"url": "https://https://vsrm.dev.azure.com/fabrikamd07908bc-118f-47d2-8a13-ff75601a6b1a/_apis/Release/definitions/1",
"_links": {}
},
"releaseEnvironment": {
"id": 1,
"name": "Dev",
"_links": {}
},
"url": "https://https://vsrm.dev.azure.com/fabrikamMyFirstProject/_apis/Release/approvals/1"
}
]
}
Definitions
Name | Description |
---|---|
Approval |
Gets or sets the status of the approval. |
Approval |
Gets or sets the type of approval. |
Identity |
|
Project |
|
Reference |
The class to represent a collection of REST reference links. |
Release |
|
Release |
|
Release |
|
Release |
|
Release |
Gets the results in the defined order of created approvals. Default is 'descending'. |
Release |
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 |
|
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
|
uniqueName |
string |
|
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. |
ReferenceLinks
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. |
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. |
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 |
|
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. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for