Skip to main content
Skip table of contents

REST API

Overview

REST API uses HTTP requests to GET, PUT, POST, and DELETE data. You can use the Data Virtuality REST API to build web services on top of the Data Virtuality Platform to develop integrations with other applications.

In this guide, you will find the REST endpoints available in Pipes and expected HTTP response codes, along with examples.

Please note that, at the moment, there are two limitations. First, the Data Virtuality REST API only supports JSON content type; we recommend setting language detection to JSON if you use an HTTP client (such as Postman). Second, the Data Virtuality REST API works only with the default virtual database (datavirtuality); this is why no VDB name or id specification is required in any of the commands.

Authentication

Every request should contain a Content-Type: application/json header and an x-auth-token: secure token from the example below.

Authentication is done at the endpoint with the following call:

XML
POST https://<datavirtuality-server-address>/api/login
Body
{"username":"username@company.com","password":"secure_password"}

Result:
{"username": "username@company.com","token": "secure token"}

The resulting token is used for authentication in REST API requests.

Here is an example:

TEXT
POST https://us.pipes.datavirtuality.com/api/login
Body
{"username":"username@company.com","password":"secure_password"}

Result:
{"username": "username@company.com","token": "username@company.com:1659127838348:ac499"}

The authentication token is valid for 30 days or until the Pipes application is updated. If the token has expired, HTTP 401 status is returned along with the following message:

TEXT
<html>

<head>
	<title>Error</title>
</head>

<body>Unauthorized: Authentication token was either missing or invalid.</body>

</html>


Please be aware that to use REST API, your user should use username and password authentication. Users using Google Sign-In are not supported, but you can create a new user using the Invite function to log in with a username and password and then use this user for REST API access. 
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.