@panviva/node-sdk
v2.0.7
Published
  
Downloads
2,069
Readme
Panviva SDK
Introduction
Wouldn't it be great if you could share information seamlessly? This JavaScript SDK allows you to push your knowledge further and consume a complete list of Panviva's API offerings within your application. This is a simple NPM package provided by Panviva to help streamline integration with Panviva APIs within JavaScript environments.
Prerequisites
To use the Panviva SDK, you must have:
- Access to a Panviva instance (also known as a tenant)
- A developer account on the Panviva developer portal (dev.panviva.com)
- An active Panviva API subscription (also known as an API plan) and valid Panviva API credentials
If you are not a customer or need help visit www.panviva.com/support.
How to get credentials
Follow the steps below to get your API key & instance name.
To get your API key you must:
- Sign into the Panviva developer portal at dev.panviva.com
- Navigate to your profile (click your name then click "Profile" from the top navigation bar)
- Your should now see your API key under "Your Subscriptions" section of your profile.
To get your instance name you must:
- Sign into the Panviva developer portal at dev.panviva.com
- Navigate to your API (click "APIs" from the top navigation bar)
- You should now see your API instance under your API suite (look for "The instance name for the API Suite is")
Installation
To install @panviva/node-sdk:
# Run this command in your project root
# with npm
npm install --save @panviva/node-sdk
# with yarn
yarn add @panviva/node-sdkSet up:
const { PanvivaClient, ResourceApiKeys } = require('@panviva/node-sdk');
const panvivaClient = new PanvivaClient('_Your instance name here_');
// You can provide a base URL as the second argument, it defaults to `https://api.panviva.com`
panvivaClient.setApiKey(ResourceApiKeys.apiKeyHeader, '_Your API key_');Example request:
panvivaClient
.searchArtefacts({ simplequery: '*' })
.then((response) => {
console.log(response);
})
.catch((ex) => console.error(ex));