Developer Portal for YouTrack and Hub Help

Backup Files

This resource lets you access the database backup files. The user account that performs the operation must have Low-level Read Administration permissions.

Resource

/api/admin/databaseBackup/backups

Returned entity

BackupFile. For the description of the entity attributes, see Supported Fields section.

Supported methods

BackupFile attributes

Represents the backup file.

Related Resources

Below you can find the list of resources that let you work with this entity.

Attributes

This table describes attributes of the BackupFile entity.

  • To receive an attribute in the response from the server, specify it explicitly in the fields request parameter.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

id

String

The ID of the backup file. Read-only.

name

String

Name of the backup file. Read-only.

size

Long

Size of the file. Read-only.

creationDate

Long

The timestamp in milliseconds indicating the moment when the backup file was created. Stored as a unix timestamp at UTC. Read-only.

link

String

The link to the backup file. Read-only.

Read a List of BackupFiles

Get the list of all available backup files.

Required permissions

Requires permissions: Low-level Admin Read

Request syntax

GET /api/admin/databaseBackup/backups?{fields}&{$top}&{$skip}

Request parameters

Parameter

Type

Description

fields

String

A list of BackupFile attributes that should be returned in the response. If no field is specified, only the entityID is returned.

$skip

Int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

Int

Optional. Lets you specify the maximum number of entries that are returned in the response. If you don't set the $top value, the server limits the maximum number of returned entries.

The server returns a maximum of 42 entries for most resources that return collections. For more information, see Pagination.

Sample

Sample request

https://example.com/youtrack/api/admin/databaseBackup/backups?fields=creationDate,file,error,link,name,size,id&$top=3

Sample response body

[ { "name": "2019-05-22-13-14-07.tar.gz", "size": 8056029, "creationDate": 1558523648000, "link": "backupFile/2019-05-22-13-14-07.tar.gz", "error": null, "id": "2019-05-22-13-14-07.tar.gz", "$type": "BackupFile" }, { "name": "2019-05-21-09-00-00.tar.gz", "size": 8055995, "creationDate": 1558422000000, "link": "backupFile/2019-05-21-09-00-00.tar.gz", "error": null, "id": "2019-05-21-09-00-00.tar.gz", "$type": "BackupFile" }, { "name": "2019-05-20-09-00-00.tar.gz", "size": 8055809, "creationDate": 1558335600000, "link": "backupFile/2019-05-20-09-00-00.tar.gz", "error": null, "id": "2019-05-20-09-00-00.tar.gz", "$type": "BackupFile" } ]
Last modified: 15 March 2024