Open API 3.0
Definition files
These OpenAPI documents describe the Pryv.io API and conform to the OpenAPI Specification. They are represented in YAML format and can be downloaded from the following links to be imported on other API tools such as Postman.
-
The API of Open-Pryv.io (open source version of Pryv.io) in OpenAPI 3.0 format: api_open.yaml.
-
The API of Pryv.io (Entreprise license) in OpenAPI 3.0 format: api.yaml.
-
The admin API of Pryv.io in OpenAPI 3.0 format: api_admin.yaml.
-
The system API of Pryv.io in OpenAPI 3.0 format: api_system.yaml.
Usage
Postman
Import
The OpenAPI description of Open-Pryv.io or Pryv.io Entreprise can be directly imported into Postman to test the API’s functionality.
- 1. If Postman has not yet been installed on your computer, you can download it from here.
- 2. In the Postman app, click
Import
to bring up the following screen:
You can choose to upload a file, enter a URL, or copy the YAML file on Postman.
Import the open-api-format/api.yaml
from the URL link or the YAML file directly with Import as an API
and Generate a Postman Collection
checked.
If you are using the Open Source version of Pryv.io, import the open-api-format/api_open.yaml
from the URL link.
Environment
- 3. In the top right corner of Postman, click on the eye icon to see the Environment Options and
Add
a new active Environment for Pryv :
- 4. Set the environment variables of Pryv.
Fill in the variable baseUrl
as shown below:
The variable baseUrl
should be set as https://{{token}}@{{username}}.pryv.me
, with the variables username
and token
corresponding to the username and access token of your Pryv account.
You can find more information on how to create a Pryv user on the dedicated page, and obtain an Access Token from the Pryv Access Token Generator.
In our example, the username
“testuser” associated to the token
“cdtasdjhashdsa” are used to set the baseUrl
variable as https://cdtasdjhashdsa@testuser.pryv.me
.
Note that you should remove trailing slash for the variable baseUrl
to have a working environment.
Finally, click on Add
to update the environment.
Testing the API
- 5. Once the Pryv environment is set, you can get familiar with Pryv.io API by testing different methods :
Select a method by directly clicking on it.
For GET
methods, you can check or uncheck the Query Params you need, and fill them with the right value in the Params
field.
As an example, see the method events.get
below :
For POST
and PUT
methods, you should fill the necessary parameters in the Body
field.
As an example, the different parameters name
, parentId
, etc. should be completed with their own value when creating a new stream for the method streams.create
below :
- 6. Once you have filled in the necessary fields for the method you are testing, click on
Send
to send the request :
- 7. Enjoy !
The original API reference can be found online.
For any questions or suggestions, do not hesitate to contact our team directly.