You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@panviva/node-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@panviva/node-sdk

![npm](https://img.shields.io/npm/dm/@panviva/node-sdk) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@panviva/node-sdk) ![npm (scoped)](https://img.shields.io/npm/v/@panviva/node-sdk)


Version published
Weekly downloads
319
decreased by-12.12%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Panviva SDK

npm npm bundle size (scoped) npm (scoped)

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:

  1. Access to a Panviva instance (also known as a tenant)
  2. A developer account on the Panviva developer portal (dev.panviva.com)
  3. 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:

  1. Sign into the Panviva developer portal at dev.panviva.com
  2. Navigate to your profile (click your name then click "Profile" from the top navigation bar)
  3. Your should now see your API key under "Your Subscriptions" section of your profile.

To get your instance name you must:

  1. Sign into the Panviva developer portal at dev.panviva.com
  2. Navigate to your API (click "APIs" from the top navigation bar)
  3. 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-sdk

Set 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));

Available client methods


Method NameParameter NameParameter TypeDescription
getArtefactByIdidstringThe id (ID) of an artefact
getArtefactCategoriesoptions (optional)anyOverride HTTP request options.
getArtefactCategoryPostpostArtefactCategoryRequestPostArtefactCategoryRequestJSON object containing the category name
options (optional)anyOverride HTTP request options.
getContainerByIdidstringThe id of a document container
options (optional)anyOverride HTTP request options.
getDocumentByIdidstringA document unique identifier, Document ID. If a document is a translated document, this value represents Internal ID or IID in Panviva API v1.
version (optional)integerRequest the API to return a particular version of the specified document.
options (optional)anyOverride HTTP request options.
getDocumentByIdContainersidstringA document unique identifier, Document ID. If a document is a translated document, this value represents Internal ID or IID in Panviva API v1.
options (optional)anyOptional parameter to Override HTTP request options.
getDocumentByIdContainersRelationshipsidstringA document unique identifier, Document ID. If a document is a translated document, this value represents Internal ID or IID in Panviva API v1.
options (optional)anyOverride HTTP request options.
getDocumentByIdTranslationsidstringA document unique identifier, Document ID. If a document is a translated document, this value represents Internal ID or IID in Panviva API v1.
options (optional)anyOverride HTTP request options.
getFileByIdidstringThe internal id (IID) of a Panviva file (external document)
options (optional)anyOverride HTTP request options.
getDocumentByIdContainersidstringA document unique identifier, Document ID. If a document is a translated document, this value represents Internal ID or IID in Panviva API v1.
options (optional)anyOverride HTTP request options.
getFolderByIdidstringThe internal id (IID) of a Panviva folder
options (optional)anyOverride HTTP request options.
getFolderByIdChildrenidstringThe internal id (IID) of a Panviva folder
options (optional)anyOverride HTTP request options.
getFolderByIdTranslationsidstringThe internal id (IID) of a Panviva folder
options (optional)anyOverride HTTP request options.
getFolderRootidstringThe internal id (IID) of a Panviva folder
getImageByIdidstringThe id of a Panviva image
options (optional)anyOverride HTTP request options.
searchArtefactssimplequerystringNatural language query string. For example: Action Movies (Note: Use simplequery OR advancedquery, not both.)
advancedquerystring Query string written in Lucene query syntax. For example: films AND books\. (Note: Use simplequery OR advancedquery, not both.)
filter (optional)string Accepts a Lucene-formatted filter string. Examples: category/name eq 'Mortgages', panvivaDocumentVersion gt '8' (Filterable fields include dateCreated, dateModified, dateDeleted, category/name, category/dateCreated, category/dateModified, metaData/keyword/values, metaData/keyword/dataType, title, primaryQuery, isDeleted, timestamp, panvivaDocumentId, panvivaDocumentVersion, id)
channel (optional)string Return response for a specific channel, instead of the default
pageOffset (optional)integer The pagination offset to denote the number of initial search results to skip. For example, pageOffset of 100 and pageLimit of 10 would return records 101-110.
pageLimit (optional)any The number of records to return. Must be an integer between 0 and 1000.
facet (optional)string Accepts a Lucene-formatted facet string. Examples: facet=metaData/keyword/values (Facetable fields include metaData/values)
options (optional)anyOverride HTTP request options.
postLiveCshpostLiveCshRequestPostLiveCshRequest JSON object containing information required to perform a live activity
options (optional)anyOverride HTTP request options.
postliveDocumentpostLiveDocumentRequestPostLiveDocumentRequest JSON object containing information required to perform a live activity
options (optional)anyOverride HTTP request options.
postLiveSearchpostLiveSearchRequestPostLiveSearchRequest JSON object containing information required to perform a live activity
options (optional)anyOverride HTTP request options.
searchtermstring The word or phrase to be searched for
pageOffset (optional)integer The pagination offset to denote the number of initial search results to skip. For example, pageOffset of 100 and pageLimit of 10 would return records 101-110.
pageLimit (optional)integerThe number of records to return. Must be an integer between 0 and 1000.
options (optional)anyOverride HTTP request options.

FAQs

Package last updated on 08 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc