search

Authentication

To manage data in a vault, you need to create and authenticate a service account for the vault. See API Authentication 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

apiKey

Header Parameter Name

Authorization

OAuth2

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

    Moreinfo - Authorize Moreinfo - Generate Tokens Moreinfo - Scopes Moreinfo - OAuth 2.0

Security Scheme Type

oauth2

authorizationCode

authorizationUrl: https://api.skyflow.com/oauth/authorizetokenUrl: https://api.skyflow.com/oauth/tokenScopesadmin: Grants read and write access to the administrative information.developer: Grants developer access.viewer: Grants read-only access.

Tokens

Detokenize

POST

/v1/vaults/{vaultID}/detokenize

Retrieves the record corresponding to the provided token.

PATH PARAMETERS

vaultID

string

*

ID of the Vault in which tokens are contained.

BODY PARAMETER

detokenizationParameters

array

List of parameters for detokenization.

Array [ object {

token

string

Token that needs to be detokenized

} ]

downloadURL

boolean

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

REQUEST
curl --request POST \
  --url https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/detokenize \
  --header 'Authorization: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{"detokenizationParameters":[{"token":"string"}],"downloadURL":true}'
RESPONSE
{
  • records:[
    • {
      • token:"string",
      • valueType:"string",
      • value:"string"
      }
    ]
}

Tokenize

POST

/v1/vaults/{vaultID}/tokenize

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

PATH PARAMETERS

vaultID

string

*

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

BODY PARAMETER

tokenizationParameters

array

List of parameters for tokenization.

Array [ object {

value

string

Value that needs to be tokenized.

table

string

Table in which value belongs.

column

string

Column in which value belongs.

} ]

REQUEST
curl --request POST \
  --url https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/tokenize \
  --header 'Authorization: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{"tokenizationParameters":[{"value":"string","table":"string","column":"string"}]}'
RESPONSE
{
  • records:[
    • {
      • token:"string"
      }
    ]
}

Bulk Get Record By Token

GET

/v1/vaults/{vaultID}/tokens

Retrieves all records corresponding to the provided list of tokens.

PATH PARAMETERS

vaultID

string

*

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

QUERY PARAMETERS

token_ids

array

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.

REQUEST
curl --request GET \
  --url 'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/tokens?token_ids=SOME_ARRAY_VALUE&redaction=SOME_STRING_VALUE&downloadURL=SOME_BOOLEAN_VALUE' \
  --header 'Authorization: REPLACE_KEY_VALUE'
RESPONSE
{
  • records:[
    • {
      • token_id:"b8e920d4-0f70-11eb-91f2-0242ac10ee0c",
      • fields:{
        • Opportunity Name:"BPS Pilot",
        • Owner:{
          • id:"usrijG9SC4EQlq5cm",
          • email:"kat+collab15@skyflow.com",
          • name:"Jess Patel"
          },
        • Status:"Qualification",
        • Priority:"Medium",
        • Estimated Value:10000,
        • Proposal Deadline:"2017-06-14",
        • Expected Close Date:"2017-07-12"
        }
      }
    • {
      • token_id:"b8e920d4-0f70-11eb-91f2-0242ac10ee0d",
      • fields:{
        • Opportunity Name:"BPS second use case",
        • Owner:{
          • id:"usrGqHsNLhH41Q91M",
          • email:"kat+collab36@skyflow.com",
          • name:"Sandy Hagen"
          },
        • Status:"Proposal",
        • Priority:"Very Low Deprioritize",
        • Estimated Value:24791,
        • Expected Close Date:"2017-07-07"
        }
      }
    ]
}

Get Record By Token

GET

/v1/vaults/{vaultID}/tokens/{ID}

Retrieves the record corresponding to the provided token.

PATH PARAMETERS

vaultID

string

*

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

ID

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.

REQUEST
curl --request GET \
  --url 'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/tokens/{ID}?redaction=SOME_STRING_VALUE&downloadURL=SOME_BOOLEAN_VALUE' \
  --header 'Authorization: REPLACE_KEY_VALUE'
RESPONSE
{
  • token_id:"b8e920d4-0f70-11eb-91f2-0242ac10ee0c",
  • fields:{
    • Opportunity Name:"BPS Pilot",
    • Owner:{
      • id:"usrijG9SC4EQlq5cm",
      • email:"kat+collab15@skyflow.com",
      • name:"Jess Patel"
      },
    • Status:"Qualification",
    • Priority:"Medium",
    • Estimated Value:10000,
    • Proposal Deadline:"2017-06-14",
    • Expected Close Date:"2017-07-12"
    }
}

Records

Bulk Get Record

GET

/v1/vaults/{vaultID}/{objectName}

Gets records matching the provided skyflow_id(s).

PATH PARAMETERS

vaultID

string

*

ID of the Vault that contains the records.

objectName

string

*

Name of the table that contains the records.

QUERY PARAMETERS

skyflow_ids

array

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

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

offset

string

Default : 0

Record position at which to start retrieving data.

limit

string

Default : 25

Number of records to retrieve. Maximum 25 records.

downloadURL

boolean

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

REQUEST
curl --request GET \
  --url 'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/{objectName}?skyflow_ids=SOME_ARRAY_VALUE&redaction=SOME_STRING_VALUE&tokenization=SOME_BOOLEAN_VALUE&fields=SOME_ARRAY_VALUE&offset=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&downloadURL=SOME_BOOLEAN_VALUE' \
  --header 'Authorization: REPLACE_KEY_VALUE'
RESPONSE
{
  • records:[
    • {
      • fields:{
        • Opportunity Name:"BPS Pilot",
        • Owner:{
          • id:"usrijG9SC4EQlq5cm",
          • email:"kat+collab15@skyflow.com",
          • name:"Jess Patel"
          },
        • Status:"Qualification",
        • Priority:"Medium",
        • Estimated Value:10000,
        • Proposal Deadline:"2017-06-14",
        • Expected Close Date:"2017-07-12"
        }
      }
    • {
      • fields:{
        • Opportunity Name:"BPS second use case",
        • Owner:{
          • id:"usrGqHsNLhH41Q91M",
          • email:"kat+collab36@skyflow.com",
          • name:"Sandy Hagen"
          },
        • Status:"Proposal",
        • Priority:"Very Low Deprioritize",
        • Estimated Value:24791,
        • Expected Close Date:"2017-07-07"
        }
      }
    ]
}

Insert Record

POST

/v1/vaults/{vaultID}/{objectName}

Inserts a record in the specified table.

PATH PARAMETERS

vaultID

string

*

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

objectName

string

*

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

BODY PARAMETER

records

array

List of records to be inserted.

Array [ object {

fields

object

object {

}

} ]

quorum

boolean

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

tokenization

boolean

If true, tokens are included in the response.

upsert

string

Providing this column will try to upsert the record. This column must be marked unique in schema

REQUEST
curl --request POST \
  --url https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/{objectName} \
  --header 'Authorization: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{"records":[{"fields":{"Opportunity Name":"BPS Pilot","Owner":{"id":"usrijG9SC4EQlq5cm","email":"kat+collab15@skyflow.com","name":"Jess Patel"},"Status":"Qualification","Priority":"Medium","Estimated Value":10000,"Proposal Deadline":"2017-06-14","Expected Close Date":"2017-07-12"}},{"fields":{"Opportunity Name":"BPS second use case","Owner":{"id":"usrGqHsNLhH41Q91M","email":"kat+collab36@skyflow.com","name":"Sandy Hagen"},"Status":"Proposal","Priority":"Very Low Deprioritize","Estimated Value":24791,"Expected Close Date":"2017-07-07"}}]}'
RESPONSE
{
  • records:[
    • {
      • skyflow_id:"ae7k43l4-596f-189a-lj45-mk3l3e79df71md",
      • createdTime:"2017-07-21T00:56:36.000Z"
      }
    • {
      • skyflow_id:"lak49d832-35hj-fhu4-f789-degl3ey6dfdsfb",
      • createdTime:"2017-07-21T00:56:36.000Z"
      }
    ]
}

Bulk Delete Record

DELETE

/v1/vaults/{vaultID}/{objectName}

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

PATH PARAMETERS

vaultID

string

*

ID of the Vault that contains the records.

objectName

string

*

Name of the table that contains the records.

BODY PARAMETER

skyflow_ids

array

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

Array [ string

]

REQUEST
curl --request DELETE \
  --url https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/{objectName} \
  --header 'Authorization: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{"skyflow_ids":["string"]}'
RESPONSE
{
  • RecordIDResponse:[
    • "string"
    ]
}

Get Record

GET

/v1/vaults/{vaultID}/{objectName}/{ID}

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

PATH PARAMETERS

vaultID

string

*

ID of the Vault that contains the record.

objectName

string

*

Name of the table that contains the record.

ID

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

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.

REQUEST
curl --request GET \
  --url 'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/{objectName}/{ID}?redaction=SOME_STRING_VALUE&tokenization=SOME_BOOLEAN_VALUE&fields=SOME_ARRAY_VALUE&downloadURL=SOME_BOOLEAN_VALUE' \
  --header 'Authorization: REPLACE_KEY_VALUE'
RESPONSE
{
  • fields:{
      }
    }

    Update Record

    PUT

    /v1/vaults/{vaultID}/{objectName}/{ID}

    Updates the specified record.

    PATH PARAMETERS

    vaultID

    string

    *

    ID of the Vault that contains the record.

    objectName

    string

    *

    Name of the table that contains the record.

    ID

    string

    *

    ID of the record to be updated.

    BODY PARAMETER

    record

    object

    object {

    fields

    object

    object {

    }

    }

    tokenization

    boolean

    If true, tokens are included in the response.

    quorum

    boolean

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

    REQUEST
    curl --request PUT \
      --url https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/{objectName}/{ID} \
      --header 'Authorization: REPLACE_KEY_VALUE' \
      --header 'content-type: application/json' \
      --data '{"record":{"fields":{"Opportunity Name":"BPS Pilot","Owner":{"id":"usrijG9SC4EQlq5cm","email":"kat+collab15@skyflow.com","name":"Jess Patel"},"Status":"Qualification","Priority":"Medium","Estimated Value":10000,"Proposal Deadline":"2017-06-14","Expected Close Date":"2017-07-12"}}}'
    RESPONSE
    {
    • skyflow_id:"ae7k43l4-596f-189a-lj45-mk3l3e79df71md",
    • updatedTime:"2017-07-21T00:56:36.000Z"
    }

    Delete Record

    DELETE

    /v1/vaults/{vaultID}/{objectName}/{ID}

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

    PATH PARAMETERS

    vaultID

    string

    *

    ID of the Vault that contains the record.

    objectName

    string

    *

    Name of the table that contains the record.

    ID

    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).

    REQUEST
    curl --request DELETE \
      --url 'https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/{objectName}/{ID}?quorum=SOME_BOOLEAN_VALUE' \
      --header 'Authorization: REPLACE_KEY_VALUE'
    RESPONSE
    {
    • skyflow_id:"string",
    • deleted:"boolean"
    }

    Batch Operation

    POST

    /v1/vaults/{vaultID}

    Executes specified Record CRUD APIs in a single transaction.

    PATH PARAMETERS

    vaultID

    string

    *

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

    BODY PARAMETER

    records

    array

    List of operations to be performed.

    Array [ object {

    fields

    object

    object {

    }

    tableName

    string

    Name of the table on which to perform the operations.

    method

    string

    batchID

    string

    ID by which to group operations. Operations in the same group will be executed sequentially.

    quorum

    boolean

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

    redaction

    string

    tokenization

    boolean

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

    ID

    string

    skyflow_id (for GET, DELETE, and PUT methods)

    downloadURL

    boolean

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

    } ]

    REQUEST
    curl --request POST \
      --url https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID} \
      --header 'Authorization: REPLACE_KEY_VALUE' \
      --header 'content-type: application/json' \
      --data '{"records":[{"method":"POST","objectName":"patients","quorum":true,"batchID":"patient-123456","fields":{"Opportunity Name":"BPS Pilot","Owner":{"id":"usrijG9SC4EQlq5cm","email":"kat+collab15@skyflow.com","name":"Jess Patel"},"Status":"Qualification","Priority":"Medium","Estimated Value":10000,"Proposal Deadline":"2017-06-14","Expected Close Date":"2017-07-12"}},{"fields":{"Opportunity Name":"BPS second use case","Owner":{"id":"usrGqHsNLhH41Q91M","email":"kat+collab36@skyflow.com","name":"Sandy Hagen"},"Status":"Proposal","Priority":"Very Low Deprioritize","Estimated Value":24791,"Expected Close Date":"2017-07-07"}}]}'
    RESPONSE
    {
    • vaultID:"string",
    • responses:[
      • {
          }
        ]
      }

      Query

      Execute Query

      POST

      /v1/vaults/{vaultID}/query

      Retrieves records for the query provided.

      PATH PARAMETERS

      vaultID

      string

      *

      ID of the Vault to query.

      BODY PARAMETER

      vaultID

      string

      ID of the Vault to query.

      query

      string

      SQL query to be executed.

      REQUEST
      curl --request POST \
        --url https://workspace-name.account-name.vault.skyflowapis.com/v1/vaults/{vaultID}/query \
        --header 'Authorization: REPLACE_KEY_VALUE' \
        --header 'content-type: application/json' \
        --data '{"query":"select * from opportunities where id='\''01010000ade21cded569d43944544ec6'\''"}'
      RESPONSE
      {
      • records:[
        • {
          • fields:{
            • Opportunity Name:"BPS Pilot",
            • Owner:{
              • id:"usrijG9SC4EQlq5cm",
              • email:"kat+collab15@skyflow.com",
              • name:"Jess Patel"
              },
            • Status:"Qualification",
            • Priority:"Medium",
            • Estimated Value:10000,
            • Proposal Deadline:"2017-06-14",
            • Expected Close Date:"2017-07-12"
            }
          }
        • {
          • fields:{
            • Opportunity Name:"BPS second use case",
            • Owner:{
              • id:"usrGqHsNLhH41Q91M",
              • email:"kat+collab36@skyflow.com",
              • name:"Sandy Hagen"
              },
            • Status:"Proposal",
            • Priority:"Very Low Deprioritize",
            • Estimated Value:24791,
            • Expected Close Date:"2017-07-07"
            }
          }
        ]
      }