Accessing historical data using the Asta Vision API
You can use the Asta Vision API to access historical information from previous versions of programmes and baselines.
You use the 'GET' method with an HTTP request to retrieve a collection of data from a resource. For example, you could use the 'GET' method to retrieve a list of projects or a list of programmes. The 'GET' method does not change the state of any resources.
For each 'GET' HTTP request method, two additional URIs exist in which you can specify a programme or baseline version number. You can use these URIs to access historical data, from previous versions of programmes and baselines.
For example, for the 'calendars' resource, the following URIs are available:
| URI | Retrieves data on |
|---|---|
|
/programmes/{programmeGuid}/data/calendars
Where {programmeGuid} is replaced by the unique identifier of a programme |
The calendars in the latest version of a programme |
|
/programmes/{programmeGuid}/data/{version}/calendars
Where {programmeGuid} is replaced by the unique identifier of a programme and {version} is replaced by the version number of a programme |
The calendars in a specific version of a programme |
|
/programmes/{programmeGuid}/baselinedata/{baselineVersion}/calendars
Where {programmeGuid} is replaced by the unique identifier of a programme and {baselineVersion} is replaced by the version number of a baseline |
The calendars in a specific version of a baseline |
The header of the response from a 'GET' HTTP request that accesses historical data indicates the version number that was included in the request, for example:
X-programmeversion: 1
Accessing historical data in this way does not affect the latest version of the programme or baseline, and is possible even if the latest version is locked. However, if the version number that you specify is the current version of a programme, the API checks for locks in the same way that it does when you do not specify a version number.
Identifying the version numbers of programmes and baselines
To identify the version numbers to use in a request for historical data, use a 'GET' HTTP request on the following URIs to retrieve a list of programme and baseline versions:
/programmes/{programmeGuid}/versions
/programmes/{programmeGuid}/baselineversions
The data in the versionNumber field in the response is what you should enter as the {version} or {baselineVersion} in a 'GET' HTTP request for historical data.
Introduction to the Asta Vision API
Using the API Portal to learn about and construct HTTP requests