Skip to content

Hi Skyflow team!

This is a sample of what your docs might look like on Starport, based on your public docs.

Take a look! Ask AI, search, the MCP server, and Markdown copies all work.

Starport is a free and open-source docs framework based on Starlight and maintained by Promptless. Promptless is the AI agent that automatically updates your customer-facing docs.

Every annual Promptless plan comes with white-glove migration to Starport, where we migrate the content, tune the result with you, and you own the repository so you're never locked in.

Book a 15-minute walkthrough

Sample migration of Skyflow docs to Starport, prepared by PromptlessBook 15-minute call

Upload File

POST https://%7B%7Bvault_uri%7D%7D.vault.skyflowapis.com/v1/vaults/{vaultID}/{objectName}/{ID}/files
Content-Type: multipart/form-data

Uploads a file to the specified record.

  • Authorization header (bearer token, required) — Access token, prefixed by Bearer .
  • https://%7B%7Bvault_uri%7D%7D.vault.skyflowapis.com (Production, default)
  • https://%7B%7Bvault_uri%7D%7D.vault.skyflowapis-preview.com (Sandbox)
  • vaultID (string, required) — ID of the vault.
  • objectName (string, required) — Name of the table.
  • ID (string, required) — skyflow_id of the record.

This endpoint expects a multipart form containing an optional file.

  • fileColumnName (file, optional) — The key for fileColumnName is the name of the column to store the file in, which must have a file data type. The value is the file to upload.

OK

  • skyflow_id (string, optional) — ID of the updated record.
  • tokens (map from string to any, optional) — Tokens for the record.

Returned when the request is invalid or cannot be served.

Returned when the request is unauthorized.

Returned when the request is well-formed but contains semantic errors that prevent it from being processed.

An unexpected error response.

Request

{
"fileColumnName": "<file: <file1>>"
}

Response

{
"skyflow_id": "4423ccdf-75eb-4e2e-abfc-acb43b1440cd",
"tokens": {
"drivers_license_number": "2fd8e729-228a-43cf-8274-d0d0efe47f6c",
"name": "f5c268b7-5dd4-4d37-a12d-05d148a8a440",
"phone_number": "4639c565-85c8-4120-94a6-e0e91ffaeca4",
"ssn": "736-96-1306"
}
}

SDK Code

import requests
url = "https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName/ID/files"
files = { "fileColumnName": "open('<file1>', 'rb')" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.json())
const url = 'https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName/ID/files';
const form = new FormData();
form.append('fileColumnName', '<file1>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName/ID/files"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileColumnName\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName/ID/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileColumnName\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = http.request(request)
puts response.read_body
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse<String> response = Unirest.post("https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName/ID/files")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileColumnName\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName/ID/files', [
'multipart' => [
[
'name' => 'fileColumnName',
'filename' => '<file1>',
'contents' => null
]
]
'headers' => [
'Authorization' => 'Bearer <token>',
],
]);
echo $response->getBody();
using RestSharp;
var client = new RestClient("https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName/ID/files");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileColumnName\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import Foundation
let headers = ["Authorization": "Bearer <token>"]
let parameters = [
[
"name": "fileColumnName",
"fileName": "<file1>"
]
]
let boundary = "---011000010111000001101001"
var body = ""
var error: NSError? = nil
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["content-type"]!
let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
if (error != nil) {
print(error as Any)
}
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let request = NSMutableURLRequest(url: NSURL(string: "https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName/ID/files")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()