Get started with Skyflow
Managing your data with Skyflow is as simple as making an API call. By the end of this guide, you’ll have used the Data API to insert and retrieve sensitive data from a vault.
Prerequisites
Before you get started,
- Make sure you have a terminal that can run
bash
commands. - Sign in to your Skyflow account. If you don’t have an account, sign up for a free trial.
Get vault information
Every account comes with a Quickstart vault. This vault is pre-configured with two tables: credit_cards
and persons
. Before you can insert data into the vault, you’ll need to gather some information. Alternatively, you can create a vault and gather that vault’s information instead.
- In Studio, click vault menu icon > View vault details.
- Note your Account ID, Vault ID, and Vault URL values.
- Set environment variables for your account, vault, and auth details:
Authenticate
To authenticate API calls, you need a JWT bearer token or an API key. For a short-lived token, use the following process. To generate tokens from service accounts, see Authenticate.
- In Studio, click your account icon and choose Generate API Bearer Token.
- Click Generate Token. Studio copies the token to your clipboard. The token is valid for 24 hours.
- Set an environment variable for your token:
Insert data
When you insert a record, you specify the table name in the URL of the request and the record values in the request body. The request body is a JSON object with a records
array. Each object in the records
array has a fields
object with the record values.
The following command inserts a single record into the credit_cards
table:
When you insert a record, Skyflow returns the skyflow_id
of the record. You can use this ID to retrieve the record later.
If you set the tokenization
field to true
, Skyflow also returns tokens for the inserted record values.
For insert options and behaviors, see Insert records.
Get data
You can use a record’s skyflow_id
to return record data or tokens.
The following command returns values for the specified record.
By default, the response includes data for all columns. Data is redacted according to the vault schema and the access policies assigned to the role making the API call.
To return tokens instead of data, add the tokenization
URL parameter and set it to true
.
The response includes tokens for all columns that have been tokenized.
For retrieval options and behaviors, see Get Record by ID.
Next steps
Now that you can insert and get records, you’re ready to start exploring more of what Skyflow has to offer.