Retention - Get

Gets the project's retention settings.

GET https://dev.azure.com/{organization}/{project}/_apis/build/retention?api-version=7.1-preview.1

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 '7.1-preview.1' to use this version of the api.

Responses

Name Type Description
200 OK

ProjectRetentionSetting

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.build Grants the ability to access build artifacts, including build results, definitions, and requests, and the ability to receive notifications about build events via service hooks.

Definitions

Name Description
ProjectRetentionSetting

Contains the settings for the retention rules.

RetentionSetting

Contains the minimum, maximum, and current value for a retention setting.

ProjectRetentionSetting

Contains the settings for the retention rules.

Name Type Description
purgeArtifacts

RetentionSetting

The rules for artifact retention. Artifacts can not live longer than a run, so will be overridden by a shorter run purge setting.

purgePullRequestRuns

RetentionSetting

The rules for pull request pipeline run retention.

purgeRuns

RetentionSetting

The rules for pipeline run retention.

retainRunsPerProtectedBranch

RetentionSetting

The rules for retaining runs per protected branch.

RetentionSetting

Contains the minimum, maximum, and current value for a retention setting.

Name Type Description
max

integer

min

integer

value

integer