Using the Asta Vision API to upload and download programmes
You can use the Asta Vision API to upload new revisions of programmes, and to download programmes.
To upload a new revision of a programme using the Asta Vision API, you must supply an API access key that specifies a user to which the 'Check In/Out Programme' security rule has been assigned as a header, and the programme must have a status of 'Checked In'.
To upload a new revision of a programme using the Asta Vision API, use the following 'upload' HTTP request:
POST /programmes/{programmeGuid}/upload
Where {programmeGuid} is replaced by the unique identifier of the programme you want to upload.
The body of the 'upload' request must include details of the programme file, and can optionally include additional parameters, in the following format:
{
"programmeFile" : "{an IFormFile object}"
"versionName" : "{optional new version name}"
"versionDescription" : "{optional new version description}"
"progressDate" : "{optional new version progress date}"
"classificationValue" : "{optional new version classification name}"
}
Where:
- {an IFormFile object} is replaced by details of the file you want to upload.
- {optional new version name} is replaced by a name that should be applied to the new version of the programme.
- {optional new version description} is replaced by a description that should be applied to the new version of the programme.
- {optional new version progress date} is replaced by a date that should be applied as the progress date in the new version of the programme.
- {optional new version classification name} is replaced by the name of an existing revision classification that should be applied to the new version of the programme.
To download a programme - and optionally, either its latest baseline or a specific baseline - using the Asta Vision API, use the following 'download' HTTP request:
GET /programmes/{programmeGuid}/download
Where {programmeGuid} is replaced by the unique identifier of the programme you want to download.
The body of the 'download' request can optionally include additional parameters, in the following format:
{
"versionNumber" : "{optional programme version number}"
"baselineVersionNumber" : "{optional baseline version number}"
"includeBaselines" : "{optional true or false}"
}
Where:
- {optional programme version number} is replaced by the specific version number of a programme; if you exclude this parameter, the latest version of the programme is downloaded.
- {optional programme baseline number} is replaced by the specific version number of a baseline; if you exclude this parameter and the includeBaselines parameter is set to True, the latest version of the baseline - ie whichever permanent baseline has the latest creation date - is downloaded.
- {optional true or false} is replaced by True if you want to download one of the programme's baselines alongside the programme; or by False if you want to download the programme without a baseline.
Immediately before a programme is downloaded by the Asta Vision API, the following changes are made to the programme:
- The programme status is set to 'Checked In', to prevent Asta Powerproject from offering to check the programme back into Asta Vision when it is closed.
- All non-permanent baseline summary objects are deleted from the programme. If a baseline is downloaded alongside the programme, the baseline summary object for the requested baseline is inserted into the project and that baseline will be set to be the current baseline'
Introduction to the Asta Vision API
Creating access keys for the Asta Vision API
Using the API Portal to learn about and construct HTTP requests
Operations available in the Asta Vision API
Creating webhooks for the Asta Vision API