Skip to content

Latest commit

 

History

History
279 lines (205 loc) · 7.18 KB

File metadata and controls

279 lines (205 loc) · 7.18 KB

VerificationApi.IdentityApi

All URIs are relative to https://api.passbase.com/verification/v2

Method HTTP request Description
getIdentityById GET /identities/{id} Get identity
getIdentityResourceById GET /identity/{id}/resources/{resource_id} Get resource
getIdentityResourceFileById GET /identity/{id}/resources/{resource_id}/resource_files/{resource_file_id} Get resource file
listIdentities GET /identities List identities
listIdentityResources GET /identity/{id}/resources List resources

getIdentityById

Identity getIdentityById(id)

Get identity

Retrieve an identity by providing the identity ID.

Example

const {
  PassbaseClient,
  PassbaseConfiguration,
  ResponseFormats,
} = require("@passbase/node");
const apiKey = "[redacted]";
const config = new PassbaseConfiguration({
  apiKey,
  format: ResponseFormats.Json,
});
const client = new PassbaseClient(config);
let id = null; // String | Unique ID of the identity to return
client.getIdentityById(id).then(
  data => {
    console.log("API called successfully. Returned data: " + data);
  },
  error => {
    console.error(error);
  },
);

Parameters

Name Type Description Notes
id String Unique ID of the identity to return

Return type

Identity

Authorization

SecretApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getIdentityResourceById

Resource getIdentityResourceById(id, resourceId)

Get resource

Get a resource attached to an identity by providing the resource ID.

Example

const {
  PassbaseClient,
  PassbaseConfiguration,
  ResponseFormats,
} = require("@passbase/node");
const apiKey = "[redacted]";
const config = new PassbaseConfiguration({
  apiKey,
  format: ResponseFormats.Json,
});
const client = new PassbaseClient(config);
let id = "id_example"; // String | Identity id
let resourceId = "resourceId_example"; // String | Resource id
client.getIdentityResourceById(id, resourceId).then(
  data => {
    console.log("API called successfully. Returned data: " + data);
  },
  error => {
    console.error(error);
  },
);

Parameters

Name Type Description Notes
id String Identity id
resourceId String Resource id

Return type

Resource

Authorization

SecretApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getIdentityResourceFileById

Resource getIdentityResourceFileById(id, resourceId)

Get resource

Get a resource attached to an identity by providing the resource ID.

Example

const {
  PassbaseClient,
  PassbaseConfiguration,
  ResponseFormats,
} = require("@passbase/node");
const apiKey = "[redacted]";
const config = new PassbaseConfiguration({
  apiKey,
  format: ResponseFormats.Json,
});
const client = new PassbaseClient(config);
let id = "id_example"; // String | Identity id
let resourceId = "resourceId_example"; // String | Resource id
let resourceFileId = "resourceFileId_example"; // String | ResourceFile id
client.getIdentityResourceFileById(id, resourceId, resourcefileId).then(
  data => {
    console.log("API called successfully. Returned data: " + data);
  },
  error => {
    console.error(error);
  },
);

Parameters

Name Type Description Notes
id String Identity id
resourceId String Resource id
resourceFileId String Resource file id

Return type

ResourceFile

Authorization

SecretApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listIdentities

PaginatedIdentities listIdentities(opts)

List identities

List all the identities retrievable by the provided API Secret Key.

Example

import VerificationApi from 'verification_api';
const apiKey = "[redacted]";
const config = new PassbaseConfiguration({
  apiKey,
  format: ResponseFormats.Json,
});
const client = new PassbaseClient(config);
let opts = {
  'limit': 100, // Number |
  'cursor': aWQ6NDA3MQ%3D%3D // String |
};
client.listIdentities(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
limit Number [optional]
cursor String [optional]

Return type

PaginatedIdentities

Authorization

SecretApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listIdentityResources

PaginatedResources listIdentityResources(id, opts)

List resources

List resources attached to an identity by providing the identity ID.

Example

const {
  PassbaseClient,
  PassbaseConfiguration,
  ResponseFormats,
} = require("@passbase/node");
const apiKey = "[redacted]";
const config = new PassbaseConfiguration({
  apiKey,
  format: ResponseFormats.Json,
});
const client = new PassbaseClient(config);
let id = "id_example"; // String | Identity id
let opts = {
  'limit': 100, // Number |
  'cursor': aWQ6NDA3MQ%3D%3D // String |
};
client.listIdentityResources(id, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Identity id
limit Number [optional]
cursor String [optional]

Return type

PaginatedResources

Authorization

SecretApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json