HomeGuidesRecipesAPI EndpointsRelease NotesCommunity
Log In

Authentication & Dependencies



REST Endpoints Only

This demo will be using our REST methods, so the authentication bearer token will be placed into your headers. Please note that many of these endpoints are also available using the Layar Python SDK, and we will reference them in the tutorial accordingly.

Generate your oauth bearer token for basic authentication. For a full tutorial, please see our guide Configure Your Instance.

curl -X POST -u clientId:clientSecret https://baseUrl.vyasa.com/connect/oauth/token\?grant_type=client_credentials -H "Accept: application/json"
##Gather relevant URLS
authUrl = f"{envUrl}/connect/oauth/token"
##ClientID and SecretKey (replace with your own keys)
clientId = 'clientId'
clientSecret = 'clientSecret'
##instantiate token variable
token = requests.post(
        data={"grant_type" : "client_credentials"},
        auth=(clientId, clientSecret),
        headers = {'Content-Type' : 'application/x-www-form-urlencoded'},
 "scope":"read write"}%


from pprint import pprint
import time
import pandas as pd
import numpy as np

## import REST dependencies
import requests
import json

## Pandas settings (change to your preferences)
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)

Up Next

In the next tutorial, you will learn how to create new Document Sets, apply filters to new or existing Document Sets, and add specialized columns for metadata, sections, QA, and Classification.