Skip to content

Latest commit

 

History

History
299 lines (221 loc) · 8.92 KB

IdentityApi.md

File metadata and controls

299 lines (221 loc) · 8.92 KB

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

// Import classes:
//import com.passbase.ApiClient;
//import com.passbase.ApiException;
//import com.passbase.Configuration;
//import com.passbase.auth.*;
//import com.passbase.api.IdentityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: SecretApiKey
ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
SecretApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SecretApiKey.setApiKeyPrefix("Token");

IdentityApi apiInstance = new IdentityApi();
java.util.UUID id = new java.util.UUID(); // java.util.UUID | Unique ID of the identity to return
try {
    Identity result = apiInstance.getIdentityById(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IdentityApi#getIdentityById");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id java.util.UUID 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

// Import classes:
//import com.passbase.ApiClient;
//import com.passbase.ApiException;
//import com.passbase.Configuration;
//import com.passbase.auth.*;
//import com.passbase.api.IdentityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: SecretApiKey
ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
SecretApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SecretApiKey.setApiKeyPrefix("Token");

IdentityApi apiInstance = new IdentityApi();
String id = "id_example"; // String | Identity id
String resourceId = "resourceId_example"; // String | Resource id
try {
    Resource result = apiInstance.getIdentityResourceById(id, resourceId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IdentityApi#getIdentityResourceById");
    e.printStackTrace();
}

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

ResourceFile getIdentityResourceFileById(id, resourceId, resourceFileId)

Get resource file

Get a raw resource file attached to an identity by providing the resource ID and the resource file ID. This is a protected route and you'll need a specific government authorization to access it.

Example

// Import classes:
//import com.passbase.ApiClient;
//import com.passbase.ApiException;
//import com.passbase.Configuration;
//import com.passbase.auth.*;
//import com.passbase.api.IdentityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: SecretApiKey
ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
SecretApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SecretApiKey.setApiKeyPrefix("Token");

IdentityApi apiInstance = new IdentityApi();
String id = "id_example"; // String | Identity id
String resourceId = "resourceId_example"; // String | Resource id
String resourceFileId = "resourceFileId_example"; // String | Resource file id
try {
    ResourceFile result = apiInstance.getIdentityResourceFileById(id, resourceId, resourceFileId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IdentityApi#getIdentityResourceFileById");
    e.printStackTrace();
}

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(limit, cursor)

List identities

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

Example

// Import classes:
//import com.passbase.ApiClient;
//import com.passbase.ApiException;
//import com.passbase.Configuration;
//import com.passbase.auth.*;
//import com.passbase.api.IdentityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: SecretApiKey
ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
SecretApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SecretApiKey.setApiKeyPrefix("Token");

IdentityApi apiInstance = new IdentityApi();
Integer limit = 56; // Integer | 
String cursor = "cursor_example"; // String | 
try {
    PaginatedIdentities result = apiInstance.listIdentities(limit, cursor);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IdentityApi#listIdentities");
    e.printStackTrace();
}

Parameters

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

Return type

PaginatedIdentities

Authorization

SecretApiKey

HTTP request headers

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

listIdentityResources

PaginatedResources listIdentityResources(id, limit, cursor)

List resources

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

Example

// Import classes:
//import com.passbase.ApiClient;
//import com.passbase.ApiException;
//import com.passbase.Configuration;
//import com.passbase.auth.*;
//import com.passbase.api.IdentityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: SecretApiKey
ApiKeyAuth SecretApiKey = (ApiKeyAuth) defaultClient.getAuthentication("SecretApiKey");
SecretApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SecretApiKey.setApiKeyPrefix("Token");

IdentityApi apiInstance = new IdentityApi();
String id = "id_example"; // String | Identity id
Integer limit = 56; // Integer | 
String cursor = "cursor_example"; // String | 
try {
    PaginatedResources result = apiInstance.listIdentityResources(id, limit, cursor);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IdentityApi#listIdentityResources");
    e.printStackTrace();
}

Parameters

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

Return type

PaginatedResources

Authorization

SecretApiKey

HTTP request headers

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