Akshat Agrawal
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Core API Quickstart This guide will help you make your first API call to Skyflow. By the end of this guide, you’ll have used the Skyflow API to insert and retrieve sensitive data from a vault. ## Prerequisites For this guide, you need a Skyflow account. If you don’t have an account, you can [sign up for a free trial account](https://www.skyflow.com/contact-sales). * For trial accounts, log in to try.skyflow.com. * For production accounts, log in to your dedicated sign in URL. ## Overview This guide will show you how to insert and retrieve data from a Skyflow vault in four steps: 1. Setting up a vault 2. Getting authenticated 3. Inserting data 4. Retrieving data In this tutorial, we’ll use the **Quickstart vault**, which is accessible from any Skyflow account (see Step 1 below for more details). You can follow along with your own vault as well, but keep in mind that the example code may differ slightly from what you would use. ## Setting Up a Vault The Quickstart vault is a simple vault designed to help you get started with Skyflow’s API. If you have a trial account, you’ll see that a Quickstart vault has been created for you automatically. If you don’t see the Quickstart vault, you can create one from the Vault Dashboard by clicking **Create Vault > Start With A Template > Quickstart > Create** as shown below: ![create_a_vault](../../images/create_a_vault.gif) The Quickstart vault comes with a simple schema and some data already loaded for your convenience. In this tutorial, we will be using the **credit_cards** table. ## Getting Authenticated To use the API, you need an API bearer token to authenticate your requests. If you’re using a trial account, you can generate an API bearer token by clicking **your name icon in the top right > Generate API Bearer Token > Generate Token > Copy icon** as shown below. This token is valid for 24 hours. You can always return to this menu to generate another bearer token. ![generate_a_bearer_token](../../../../images/generate_bearer_token.gif) **Important**: This feature is offered for convenience purposes in trial accounts only. If you’re using a production account, read our tutorial on [API Authentication](/api-authentication) for instructions on how to obtain a bearer token. ## Using Postman Collections In the remaining steps, you’ll make API calls to read from and write to your vault. You can use whichever API client is most convenient for you, though we recommend using [Postman](https://www.postman.com/) to get started quickly. If you don’t plan on using Postman, you can skip this step. Skyflow can automatically generate a Postman Collection specific to your vault. To use it, go to the Vault Browser menu and click **Postman Collection** as shown below. ![postman_select](../../../../images/postman_select.gif) A JSON file will download to your machine. In Postman, you’ll import this file as a collection by doing the following: 1. Go to the Workspaces tab and click **Import**. 2. Click **Upload Files** or drag and drop the json file into the field. 3. Click **Import**. ![postman_import2.gif](../../../../images/postman_import2.gif) Once imported, the collection will be added with the name of your vault (in the example, “QuickstartVault48748”). Click this collection and click the Variables tab. Then paste the API bearer token from the previous step into the “bearerToken” Current Value column as shown below. **Important**: You must click **Save** in Postman after pasting in the bearerToken. You may have to close the right-hand area before the Save button is visible. ![postman_bearertoken.gif](../../../../images/Postman_bearertoken.gif) Let's start making API calls! ## Inserting Data into the Vault To start, we’ll insert some fake data into the vault using the Insert Record API. The guide below explains how to do this using the Postman Collection or with a manual cURL request. <Tabs> <Tab label="Postman"> <InsertRecordPostman /> </Tab> <Tab label="cURL"> <InsertRecordCurl /> </Tab> </Tabs> ## Reading Data from the Vault To read data from the vault, use the Get Record API in Postman, or enter a manual cURL request. <Tabs> <Tab label="Postman"> <ReadDataPostman /> </Tab> <Tab label="cURL"> <ReadDataCurl /> </Tab> </Tabs> ### Dynamic Data Redaction Skyflow applies dynamic data redaction whenever data is retrieved from a vault. Data can be returned in one of the following redaction formats: | Redaction Type | Description | Example | | ------------------- | ----------- | ------- | | REDACTED | The value will be fully redacted in the response. | “John Doe” → “*REDACTED*” | | MASKED | The value will be partially redacted (masked) in the response. The masking format for a given data field is configured in the vault schema. | “4111111111111111” → “************1111 | | PLAIN_TEXT | The value will be returned in plain text in the response. | “11/25” → “11/25” | | DEFAULT | The value will be redacted using the default redaction format defined in the vault schema. Fields may have different default redaction formats. | To redact the data, use the Get Record API in Postman, or enter a manual cURL request. <Tabs> <Tab label="Postman"> <RedactionPostman /> </Tab> <Tab label="cURL"> <RedactionCurl /> </Tab> </Tabs> Go ahead and send the request! You should get back a response that looks similar to the one below: ```json { "fields": { "card_number": "XXXXXXXXXXXX1111", "cardholder_name": "*REDACTED*", "expiry_date": "11/25" "skyflow_id": "df38cdf0-701f-43b5-b954-4dbe9873b0f0" } } ``` Notice, the **card_number** field is masked such that only the last 4 digits are visible, the **cardholder_name** field is fully redacted, and the **expiry_date** is returned in plain text. These defaults are configured in the vault schema. You can learn more about this in the [Creating a Custom Vault](/creating-a-custom-vault) guide. Try sending the same request but this time, specify **?redaction=PLAIN_TEXT**. You’ll get back a response like the following: ```json { "fields": { "card_number": "411111111111", "cardholder_name": "John Doe", "expiry_date": "11/25" "skyflow_id": "df38cdf0-701f-43b5-b954-4dbe9873b0f0" } } ``` **Important**: This only works if you have permission to read the data in plain text. As the vault owner, you have plain text access by default. To learn more about data governance and how you can configure access control policies, see the [Data Governance Overview](/data-governance-overview) article. ## Next Steps Congratulations! You’re ready to start storing sensitive data in a secure vault! As next steps, check out the other [Data APIs](/apireference) or one of the articles below: * [Creating a Custom Vault](/creating-a-custom-vault) * [Tokenization Overview](/tokenization-overview) * [Data Governance Overview](/data-governance-overview)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully