IT - API Information
From VersaVision Support
OVERVIEW
- The VersaVision system utilizes a Microservice Architecture.
- There are multiple services that have dedicated purposes.
- All the APIs follow a RESTful approach and utilize JSON serialization, this allows them to be easily accessed from any modern programming language.
GLOSSARY OF TERMS
- API - Application Programming Interface - a software intermediary that allows 2 applications to talk to one another.
- API Key - a code that is used to identify and authenticate an application or user.
- Endpoints - a specific location within an API that accepts requests and sends back responses.
- JavaScript - a scripting language that enables the user to create dynamically updating content.
- JSON - JavaScript Object Notation - format for storing and transporting data.
- JSON Serialization - the process of converting the state of an object, the values of its properties, into a form that can be stored or transmitted.
- JSON Objects - a defined piece of information or data used/created when executing JSON.
- JSON Web Token (JWT) - a JSON Object that is used to securely transfer information, between 2 parties/entities.
- Microservice Architecture - each microservice is a single service built to accommodate an application feature and handle discrete tasks. Each service communicates with other services through simple interfaces.
- RESTful - an architectural style for an application program interface (API) that uses HTTP requests to access and use data. That data can be used to GET, PUT, POST and DELETE data types.
- Schema - the organization or structure for a database.
- Swagger - an open source set of rules, specifications and tools for developing and describing RESTful APIs. The Swagger framework allows developers to create interactive, machine and human-readable API documentation.
- VersaVision - Commands - area in our software that allows the creation of custom programming (JavaScript, SQL Server, PostgreSQL).
- VersaVision - Function - a sequence of program instructions that performs a specific task, packaged as a unit.
SWAGGER
- The VersaVision system uses a utility called Swagger (https://swagger.io/).
- It utilizes the Open API standard and provides an interactive API documentation experience.
- Access to Swagger is available on all VersaVision systems.
- Simply add "/Swagger" after the IP Address of the VersaVision application server.
- Once accessed, the user will see a web page similar to the image below:
- Users can execute endpoints directly from the Swagger Interface.
- After executing an endpoint, the results will appear inside the Swagger Interface.
- Additional Schema information, that defines the object, can be viewed in the Swagger Interface.
AUTHENTICATION
- VersaVision is an on-premise system sitting in the safety of the customer’s network, many of the APIs are read only and will allow users to run them with no authentication.
- Some of the APIs that require more security would require the use of JSON Web Tokens (JWTs).
- A JWT would have to be generated, then placed in the header of the request in the form of “Authorization: Bearer X” (X = the token).
- In the future, VersaVision will provide an additional authentication option that will allow the user to put an API Key in the request header or the URL as a query parameter.
SUMMARY
- There are many services and endpoints in the VersaVision system which customers are free to explore on their own.
- In most cases, the customer should work with a Technician at VersaCall to create an approach for specific use cases.
- Example:
- A Case where multiple endpoints need to be called/executed, data compiled, and processed.
- A VersaCall Technician can assist utilizing the VersaVision Commands application to eliminate some of the work required on the customer side.
- Custom Commands can be generated utilizing JavaScript that perform a set functions.
- The customer would simply call the Command, and it will process the information thus simplifying the work required to integrate with the VersaVision System.