Authentication

To manage data in a vault, you need to create and authenticate a service account for the vault. See Create a Service Account for a tutorial. Once you’ve done that, you should have a Bearer Token for your service account. To authenticate your requests, simply include it as a header parameter as follows:

authorization : Bearer {BEARER_TOKEN}.

Bearer

Access token, prefixed by Bearer: Bearer <token>. Retrieved using Generate Tokens End-Point

Security Scheme Type API Key
Header parameter name: Authorization

Batch

Batch Records

Executes all APIs defined in the request (for records) in a single transaction

Authorizations:
path Parameters
vaultID
required
string
Request Body schema: application/json
vaultID
string (Vault ID of these record)
Array of objects (The list of records)

Responses

Request samples

Content type
application/json
{
  • "records": [
    ]
}

Response samples

Content type
application/json
{
  • "vaultID": "string",
  • "responses": [
    ]
}

PiiFields

Bulk Get PiiFields

Gets records matching the ID's

Authorizations:
path Parameters
vaultID
required
string
query Parameters
skyflow_ids
Array of strings

List of Record IDs who's objects needs to be fetched. If not present, then all records will be fetched based on offset, limit and ordered by skyflow_id.

redaction
string
Default: "DEFAULT"
Enum: "DEFAULT" "REDACTED" "MASKED" "PLAIN_TEXT"

Redaction level to enforce on the data in response.

tokenization
boolean <boolean>

If 'true' tokens are returned.

fields
Array of strings

Fields that needs to be fetched for the given Record IDs. If not specified, all fields would be fetched.

offset
string <int64>
Default: "0"

Pagination Offset. - indicates the record number to start retrieving data. Not applicable for Token DLP View.

limit
string <int64>
Default: "25"

Pagination Limit. - indicates the number of records to retrieve. Not applicable for Token DLP View.

Responses

Request samples

curl -i -X GET \
  'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/:vaultID/pii_fields?skyflow_ids=string&redaction=DEFAULT&tokenization=true&fields=string&offset=0&limit=25' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Response samples

Content type
application/json
{
  • "records": [
    ]
}

Bulk Delete PiiFields

Deletes records matching the ID's or all records if '*' is provided as the ID

Authorizations:
path Parameters
vaultID
required
string
Request Body schema: application/json
vaultID
string (Vault ID Under from which these records needs to be deleted)
skyflow_ids
Array of strings (List of Record IDs that needs to be deleted or '*' if all records under piiFields needs to be deleted)

Responses

Request samples

Content type
application/json
{
  • "vaultID": "string",
  • "skyflow_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "RecordIDResponse": [
    ]
}

Insert PiiFields

Creates a Record for the given Vault ID & piiFields

Authorizations:
path Parameters
vaultID
required
string
Request Body schema: application/json
vaultID
string (Vault ID for piiFields)
Array of objects (The list of records)

Responses

Request samples

Content type
application/json
{
  • "records": [
    ]
}

Response samples

Content type
application/json
{
  • "records": [
    ]
}

Get PiiFields

Retrieves a Record by using Row ID of a piiFields

Authorizations:
path Parameters
vaultID
required
string
ID
required
string
query Parameters
redaction
string
Default: "DEFAULT"
Enum: "DEFAULT" "REDACTED" "MASKED" "PLAIN_TEXT"

Redaction level to enforce on the data in response.

tokenization
boolean <boolean>

If 'true' tokens are returned.

fields
Array of strings

Fields that needs to be fetched for the given Record ID. If not specified, all fields would be fetched.

Responses

Request samples

curl -i -X GET \
  'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/:vaultID/pii_fields/:ID?redaction=DEFAULT&tokenization=true&fields=string' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Response samples

Content type
application/json
{
  • "fields": {
    }
}

Delete PiiFields

Deletes the object by ID for the given piiFields

Authorizations:
path Parameters
vaultID
required
string
ID
required
string

Responses

Request samples

curl -i -X DELETE \
  https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/:vaultID/pii_fields/:ID \
  -H 'Authorization: YOUR_API_KEY_HERE'

Response samples

Content type
application/json
{
  • "skyflow_id": "string",
  • "deleted": true
}

Update PiiFields

Updates a Record for the given record ID , Vault ID & piiFields

Authorizations:
path Parameters
vaultID
required
string
ID
required
string
Request Body schema: application/json
ID
string (ID of the Record to Fetch)
vaultID
string (Vault ID Under for this record)
object (skyflowpiiFieldsRecords)

Responses

Request samples

Content type
application/json
{
  • "record": {
    }
}

Response samples

Content type
application/json
{
  • "skyflow_id": "ae7k43l4-596f-189a-lj45-mk3l3e79df71md",
  • "updatedTime": "2017-07-21T00:56:36.000Z"
}

Query

Query Record

Retrieves Records by using the query provided

Authorizations:
path Parameters
vaultID
required
string
Request Body schema: application/json
vaultID
string (Vault ID Under for which the query should be run)
query
string (The query to fire)

Responses

Request samples

Content type
application/json
{
  • "query": "select * from persons where skyflow_id='04c1feec-fda0-11ea-b6ad-a683e75f717a'"
}

Response samples

Content type
application/json
{
  • "records": [
    ]
}

Tokens

Bulk Get Record By Tokens

Retrieves all records using the token IDs

Authorizations:
path Parameters
vaultID
required
string
query Parameters
token_ids
Array of strings

List of Token IDs who's records needs to be fetched.

redaction
string
Default: "DEFAULT"
Enum: "DEFAULT" "REDACTED" "MASKED" "PLAIN_TEXT"

Redaction level to enforce on the data in response.

Responses

Request samples

curl -i -X GET \
  'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/:vaultID/tokens?token_ids=string&redaction=DEFAULT' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Response samples

Content type
application/json
{
  • "records": [
    ]
}

Get Record By Token

Retrieves a Record by using Token ID

Authorizations:
path Parameters
vaultID
required
string
ID
required
string
query Parameters
redaction
string
Default: "DEFAULT"
Enum: "DEFAULT" "REDACTED" "MASKED" "PLAIN_TEXT"

Redaction level to enforce on the data in response.

Responses

Request samples

curl -i -X GET \
  'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/:vaultID/tokens/:ID?redaction=DEFAULT' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Response samples

Content type
application/json
{
  • "token_id": "b8e920d4-0f70-11eb-91f2-0242ac10ee0c",
  • "fields": {
    }
}