Instance Example Code

Example code prepopulated with the instance URL and authorization token for the logged in database user can be found on the example code page of the HarperDB Studio. Code samples are generated based on the HarperDB API Documentation Postman collection. Code samples accessed with the following instructions:

  1. Navigate to the HarperDB Studio Organizations page.
  2. Click the appropriate organization that the instance belongs to.
  3. Select your desired instance.
  4. Click example code in the instance control bar.
  5. Select the appropriate category from the left navigation.
  6. Select the appropriate operation from the left navigation.
  7. Select your desired language/variant from the Choose Programming Language dropdown.
  8. Copy code from the sample code panel using the copy icon (Studio Copy Sample Code Icon).

Supported Languages

Sample code uses two identifiers: language and variant.

  • language is the programming language that the sample code is generated in.
  • variant is the methodology or library used by the language to send HarperDB requests.

The list of available language/variants are as follows:

LanguageVariant
C#RestSharp
cURLcURL
GoNative
HTTPHTTP
JavaOkHttp
JavaUnirest
JavaScriptFetch
JavaScriptjQuery
JavaScriptXHR
NodeJsAxios
NodeJsNative
NodeJsRequest
NodeJsUnirest
Objective-CNSURLSession
OCamlCohttp
PHPcURL
PHPHTTP_Request2
PowerShellRestMethod
Pythonhttp.client
PythonRequests
RubyNet:HTTP
ShellHttpie
Shellwget
SwiftURLSession