<< Back to GForge REST API

Entity: Snapshot

GET

getDownload

Download the specified snapshot file. Only project admins are allowed to do this.

Parameters (1)

Name Type Description
id string Name of the file to be downloaded

Return: void

getRequest

List snapshot requests, optionally filtering by project

Parameters (1)

Name Type Description
id mixed The project unixName or ID to check. Provided as part of the route.

Return: \StdClass

Object with succeeded (boolean), data (boolean for this method), and message (not used for this method).

getSnapshot

Gets a list of available snapshots. IF a project ID or unixName is provided, only snapshots for that project will be returned.

Parameters (1)

Name Type Description
int|string id (optional) ID or unixName of the project for which to list snapshots. This is taken from the route.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: array

Assoc array of unixName => snapshot file name

POST

postCreate

Create a snapshot file from chunked upload

Parameters (2)

Name Type Description
hash string The unique hash code for the chunked upload. Should be part of the route /snapshot/0/import/:hash
file string The file name to be used for the file in VARDIR/exportProjects destination.

Return: void

postImport

Create a new project from the specified snapshot file

Parameters (2)

Name Type Description
id string The unique identifier for the snapshot to be used. Should be in the route /snapshot/:id/import
unixName string The unix name for the project to be created. This unix name cannot already exist.

Return: \ProjectBasic

postRequest

Create a project snapshot request, iff it does not already exist

Parameters (1)

Name Type Description
id int The project for which the request should be checked and created.

Return: \StdClass

Object with succeeded (boolean), data (boolean for this method), and message (not used for this method).

PUT

DELETE

deleteRequest

Delete an existing project snapshot request, iff it exists

Parameters (1)

Name Type Description
id int The project for which the request should be checked and deleted.

Return: \StdClass

Object with succeeded (boolean), data (boolean for this method), and message (not used for this method).

deleteSnapshot

Delete an existing project snapshot file, iff it exists

Parameters (1)

Name Type Description
id int The project for which the request should be checked and deleted.

Return: \StdClass

Object with succeeded (boolean), data (boolean for this method), and message (not used for this method).