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

OAuth2

Authentication using OAuth 2.0 with Grant Type as the authorization code.

Security Scheme Type OAuth2
authorizationCode OAuth Flow
Authorization URL: https://api.skyflow.com/oauth/authorize
Token URL: https://api.skyflow.com/oauth/token
Scopes:
  • admin -

    Grants read and write access to the administrative information.

  • developer -

    Grants developer access.

  • viewer -

    Grants read-only access.

Tokens

Detokenize

Retrieves the record corresponding to the provided token.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault in which tokens are contained.

Request Body schema: application/json
Array of objects (v1DetokenizeRecordRequest)

List of parameters for detokenization.

downloadURL
boolean

For fields that are of blob data type, if 'true' file download URLs are returned.

Responses

Request samples

Content type
application/json
{
  • "detokenizationParameters": [
    ],
  • "downloadURL": true
}

Response samples

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

Tokenize

Returns the tokens associated with the records passed. Only applicable for deterministically tokenized fields.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault in which records need to be tokenized.

Request Body schema: application/json
Array of objects (v1TokenizeRecordRequest)

List of parameters for tokenization.

Responses

Request samples

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

Response samples

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

Bulk Get Record By Token

Retrieves all records corresponding to the provided list of tokens.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault from which the records need to be fetched.

query Parameters
token_ids
Array of strings

List of tokens of the records to be fetched. Usage - ?token_ids=token1&token_ids=token2.

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

Redaction level to enforce on the record (subject to Policies assigned to the caller of this API).

downloadURL
boolean

For fields that are of blob data type, if 'true' file download URLs are returned.

Responses

Request samples

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

Response samples

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

Get Record By Token

Retrieves the record corresponding to the provided token.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault from which the record needs to be fetched.

ID
required
string

Token of the record to be fetched.

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

Redaction level to enforce on the record (subject to Policies assigned to the caller of this API).

downloadURL
boolean

If true, file download URLs are returned for fields that are of blob data type.

Responses

Request samples

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

Response samples

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

Records

Bulk Get Record

Gets records matching the provided skyflow_id(s).

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault that contains the records.

objectName
required
string

Name of the table that contains the records.

query Parameters
skyflow_ids
Array of strings

List of skyflow_id(s) of the records to be retrieved. If not present, all records will be retrieved.

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

Redaction level to enforce on the record (subject to Policies assigned to the caller of this API).

tokenization
boolean

If true, tokens are returned. Only applicable if skyflow_id(s) are specified.

fields
Array of strings

Subset of fields to be retrieved for the given record. If not specified, all fields will be retrieved.

offset
string <int64>
Default: "0"

Record position at which to start retrieving data.

limit
string <int64>
Default: "25"

Number of records to retrieve.

downloadURL
boolean

If true, file download URLs are returned for fields that are of blob data type.

Responses

Request samples

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

Response samples

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

Bulk Delete Record

Deletes all records or records matching the provided skyflow_id(s).

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault that contains the records.

objectName
required
string

Name of the table that contains the records.

Request Body schema: application/json
skyflow_ids
Array of strings

List of skyflow_id(s) of the records to be deleted. If '*' is provided, all records will be deleted.

Responses

Request samples

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

Response samples

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

Insert Record

Inserts a record in the specified table.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault into which the record needs to be inserted.

objectName
required
string

Name of the table into which the record needs to be inserted.

Request Body schema: application/json
Array of objects (v1FieldRecords)

List of records to be inserted.

quorum
boolean
Default: "false"

If true, the transaction is performed with strong consistency. Otherwise, it is eventually consistent.

tokenization
boolean

If true, tokens are included in the response.

Responses

Request samples

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

Response samples

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

Get Record

Retrieves the specified record. The entire row is returned unless a subset of fields is specified.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault that contains the record.

objectName
required
string

Name of the table that contains the record.

ID
required
string

skyflow_id of the record to be retrieved.

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

Redaction level to enforce on the record (subject to Policies assigned to the caller of this API).

tokenization
boolean

If true, tokens are returned.

fields
Array of strings

Subset of fields to be retrieved for the given record. If not specified, all fields will be retrieved.

downloadURL
boolean

If true, file download URLs are returned for fields that are of blob data type.

Responses

Request samples

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

Response samples

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

Update Record

Updates the specified record.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault that contains the record.

objectName
required
string

Name of the table that contains the record.

ID
required
string

ID of the record to be updated.

Request Body schema: application/json
object (v1FieldRecords)
tokenization
boolean

If true, tokens are included in the response.

quorum
boolean
Default: "false"

If true, the transaction is performed with strong consistency. Otherwise, it is eventually consistent.

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"
}

Delete Record

Deletes the specified record. The skyflow_id of the deleted record is returned if successful.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault that contains the record.

objectName
required
string

Name of the table that contains the record.

ID
required
string

skyflow_id of the record to be retrieved.

query Parameters
quorum
boolean

Decides if projection populated should be Sync or Not (No Eventual consistency).

Responses

Request samples

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

Response samples

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

Batch Operation

Executes specified Record CRUD APIs in a single transaction.

Authorizations:
path Parameters
vaultID
required
string

ID of the Vault on which the operations will be performed.

Request Body schema: application/json
Array of objects (v1BatchRecord)

List of operations to be performed.

Responses

Request samples

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

Response samples

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