Understanding API terminology
Throughout this Help, the following terms are used to refer to elements of the Asta Vision API:
| Term | Definition | Examples |
|---|---|---|
| Access key | A key, supplied as a header in HTTP requests, that enables Asta Vision users to access the Asta Vision API and to construct requests with the access rights of a specific Asta Vision user. You create API access keys within Asta Vision. |
Authorization: Bearer {token}
A header containing an API access key, where {<token}> is replaced by the API access key. |
| API | A set of protocols and tools that allow different software applications to communicate with each other. APIs enable the integration of various systems, allowing them to share data and functionality seamlessly. They provide a way for different software components to interact and work together efficiently. You can think of an API as a bridge that connects two systems and lets them share data or services, in real time | The Asta Vision API. |
| API Portal |
A website that you can use to learn about and construct API requests. The API Portal describes the various operations that you can use to access and edit your Asta Vision and Asta Powerproject data in an API request, and shows the various parameters that you can apply to each operation. If you use the API Portal to construct sample API requests, you can then copy and paste these into external applications or into your own code, which saves you from having to code API requests from scratch.
The URL of the API Portal differs for each Asta Vision API customer. |
N/A |
| Body |
Optional data that is sent with an HTTP request, which gives information on how the request should be carried out.
For example, when using a 'POST' HTTP request to create a chart within a programme, the body of the request gives details of the chart that is to be created, including the chart ID, the chart name, the ID of the chart in which the new chart is to be created and the order in which the chart should appear within its parent. |
In a 'POST' HTTP request to an API that enables you to create a customer, the body might contain the following information:
{ "id": 123, "name": "Dominique Webb", "email": "dwebb@example.com" } |
| Collection | A group of similar resources. A resource is a single record; all the resources of that type is a collection. |
All programmes.
All tasks.
All cost centres.
All tasks within a specified chart.
All tasks with a start date greater than or equal to a specified date. |
| Endpoint | The full path of an HTTP request. An endpoint is part of an operation. |
https://eleco.net/astavisionapi/programmes/1234/data/tasks/4321
In this example:
|
| Header |
A piece of metadata that is sent alongside an HTTP request, which tells the API server how to interpret the request, provide authentication, control caching, and pass additional information needed for the operation. Some headers are required; others are optional.
All HTTP requests require an 'Authorization' API access key to be supplied as a header.
For 'POST' and 'PATCH' operations that relate to Asta Powerproject data, an 'x-LockKey' header that locks or unlocks the relevant programme is required. |
Authorization: Bearer {token}
A header containing an API access key, where {<token}> is replaced by the API access key. |
| HTTP request |
A message that is sent by an application to an API, asking it to do something or to provide some data.
An HTTP request includes the following elements:
|
See the entries in this table that relate to the individual elements of an HTTP request for examples. |
| HTTP response |
A message that is sent back to an application by an API, following an HTTP request.
An HTTP response includes the following elements:
|
See the API Portal for information on the responses that can be received for each operation. |
| Method |
The action that you want an HTTP request to perform on an endpoint, as part of an operation:
|
The following example operations each contain a different method:
GET /programmes/{programmeGuid}/data/calendars
Use to retrieve a collection of a programme's calendars.
POST /programmes/{programmeGuid}/data/charts
Use to create a chart within a programme.
PATCH /programmes/{programmeGuid}/data/costcentres/{costCentreId}
Use to update the details of a cost centre.
DELETE /programmes/{programmeGuid}/data/costrates/{costRateId}
Use to delete a cost and income rate. |
| Operation | A single action that the API can perform using an HTTP request - a specific action on an endpoint. |
GET /programmes/{programmeGuid}/data/calendars
Use to retrieve a collection of a programme's calendars.
POST /programmes/{programmeGuid}/data/charts
Use to create a chart within a programme.
PATCH /programmes/{programmeGuid}/data/costcentres/{costCentreId}
Use to update the details of a cost centre.
DELETE /programmes/{programmeGuid}/data/costrates/{costRateId}
Use to delete a cost and income rate. |
| Resource | An entity that you can use the Asta Vision API to expose and manage. |
An individual programme.
An individual task.
An individual cost centre. |
| URI | Uniform Resource Identifier. A resource identifier, a route or a path structure in the API. |
/programmes is the programme collection URI. It identifies the collection of all programmes.
/programmes/2333 is the URI of programme 2333. It identifies an individual programme.
/programmes/{programmeGUid} is the URI for the programme resource. |
| Webhook | An HTTP callback that allows an API to automatically send event data to another application when something happens, rather than requiring that application to repeatedly ask for updates. You can use webhooks in conjunction with the Asta Vision API to inform other systems when certain types of event occur in Asta Vision. You create webhooks within Asta Vision. |
A webhook that informs another application when a programme is created.
A webhook that informs another application when a workflow action is carried out.
A webhook that informs another application when your Business Intelligence database is updated. |
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