Skip to content

Import & export

Bring your requests from Postman, an OpenAPI document or a cURL command, and take any request out again as cURL or as code. Imports run entirely on your computer.

Open it from:

  • the Collection sidebar: + → Import… (or right-click an empty part of the tree);
  • a folder: right-click → Import into folder…;
  • the start screen of the work area, or the empty collection: Import….

It has three tabs:

TabImports
FileChoose a file, or drop it on the box. Postman collections and environments, OpenAPI and Swagger documents (JSON or YAML) and saved cURL commands are recognized automatically.
cURLA pasted cURL command, opened as a new request
OpenAPI URLAn OpenAPI or Swagger document downloaded from a URL

Import into chooses the folder the import goes into (Workspace root by default).

When an import finishes, the dialog shows Imported “name” with the number of requests, folders, environments and workspace variables it created, and notes for anything that couldn’t be brought over exactly. Choose Done.

Limit
File or download size50 MB
Unrecognized filesRefused: Supported: Postman collection v2/v2.1, Postman environment, OpenAPI 3.x / Swagger 2.0 (JSON or YAML), cURL command.

Export the collection from Postman as Collection v2.1 (v2.0 works too) and import the file. Exports downloaded from the Postman API, which wrap the collection in {"collection": …}, work as well.

What you get:

  • A new folder named after the collection, holding its folders and requests in the same order.
  • The collection’s auth and scripts on that folder; each folder’s and request’s auth, scripts and description on the folder or request.
  • Collection variables added to the workspace variables. A variable the workspace already has keeps its current value, and a note lists it.
PostmanIn Zorvik
Pre-request scriptPre-request script
Tests scriptPost-response script
Other script eventsSkipped, with a note
Auth: basic, bearer, API key, OAuth 1.0, OAuth 2.0 (every grant, implicit too), JWT Bearer, Digest, NTLM, AWS Signature, Hawk, Akamai EdgeGrid, ASAP, no auth, inheritThe same auth type, with its settings
Other auth typesNo auth, with a note
Saved responsesExamples of the request (bodies up to 1 MB)
OAuth 2.0 redirect URL on oauth.pstmn.io (or none)http://127.0.0.1:53682/callback, with a note to register it
Body: raw (JSON, XML, HTML, JavaScript, text), URL-encoded, form-data, file, GraphQLThe matching body type
Path variables (:id) with valuesPath variables
Disabled query parameters, parameter descriptionsSwitched-off parameters, with descriptions
Settings: follow redirects, max redirects, SSL verificationThe request’s Settings
Folder variablesSkipped, with a note
Collection v1 filesRefused; export as v2.1 again

Scripts are imported as they are. Scripts that use APIs Zorvik doesn’t have (pm.sendRequest, setTimeout, setInterval, pm.cookies, pm.visualizer) are listed in a note; they fail when run. See pm API reference.

Files for form-data and binary bodies aren’t part of a Postman export: choose them again after importing (a note says which).

Import an environment export file (Postman: Export on the environment) to create a new environment with its variables. Variables of Postman’s secret type become secret variables: their values go to this computer’s secret store, never into the workspace file.

A Postman globals export imports the same way, as an environment (named “Globals” when the file has no name). Zorvik’s own globals are only set by scripts.

Import OpenAPI 3.0 and 3.1, and Swagger 2.0, as JSON or YAML, from a file or from the OpenAPI URL tab.

  • A folder named after the document’s info.title, with a subfolder per tag (in the order of the document’s tags), holding the operations with that first tag. Operations without a tag go directly into the folder.
  • One request per operation, named after its summary, else its operationId, else METHOD /path. The description goes into the request’s Docs; deprecated operations say so there.
  • An environment named after the document, with baseUrl (the first server URL), placeholders for auth, and the path parameters with example values.
DocumentRequest
Server URL{{baseUrl}} at the start of every URL. An operation or path with its own absolute server gets that URL instead.
Path parameter {session_id}{{sessionId}} in the URL (camelCase). Generic names get the resource in front: /pets/{id} becomes {{petId}}. Example values go into the new environment.
Required query parameterIn the URL, with its example value when the document gives one
Optional query parameterA switched-off parameter in the Params table, with its description
Header parameterA header, switched on if required (Accept, Content-Type and Authorization parameters are ignored, as OpenAPI says)
Cookie parametersOne Cookie header
Request bodyAn example body (JSON, XML, text, form, multipart or a binary file), from the document’s examples, else generated from the schema: enums, formats and property names give realistic values
Security schemesAuth (below)
Security schemeAuthEnvironment placeholders
HTTP BasicBasic authusername, password (secret)
HTTP DigestDigest authusername, password (secret)
HTTP BearerBearer tokenbearerToken (secret)
API key in a header or queryAPI keyapiKey (secret)
OAuth 2.0 client credentials, authorization code, password or implicit flowOAuth 2.0 with the token and authorization URLs and all scopesclientId, clientSecret (secret), and for the password flow username, password
API key in a cookie, other HTTP schemes, OpenID ConnectNot imported, with a note

The document-wide security becomes the imported folder’s auth; operations with different security get their own. When a requirement combines several schemes, only one is imported (with a note). Fill in the placeholders in the new environment. The ones that hold secrets (password, bearerToken, apiKey, clientSecret) are already marked secret, so their values stay on your computer.

External $refs (to other files or URLs) aren’t followed; a note lists them. Very large documents are cut short with a note rather than slowing the app down.

When the document doesn’t say where the API runs (no servers, or no host in Swagger 2.0), or gives only a relative server URL such as /v1, the Import dialog asks for it:

This API document doesn’t say where the API runs. Give its base URL (for example https://api.example.com) and import again.

Type the base URL, such as https://api.example.com, and choose Import. It goes into the new environment as baseUrl; you can change it there later. A relative server path is added after the host you give (https://api.example.com + /v1), unless your URL has a path of its own.

When you import from the OpenAPI URL tab, the scheme and host the document was downloaded from are used as the base URL, so there’s nothing to ask.

The imported document is saved in the workspace’s specs/ folder, and the imported folder remembers it (in its _folder.yaml, as openapi: {spec, source, validate}). Each request remembers its operation, such as GET /pets/{petId}. This enables two things:

  • Contract checks: every response to an imported request is checked against the documented status codes and schema, as a test named Matches the API spec. Switch it off in Folder settings → API spec → Check responses against the spec. See OpenAPI contract checks.
  • Updating the folder from a new version of the document (below).

source is the URL it was imported from, or its path when the file was inside the workspace folder (a path elsewhere on your computer would mean nothing to teammates).

When the API changes, update the imported folder instead of importing it again:

  1. Right-click the imported folder → Update from API spec… (only folders imported from OpenAPI have it).
  2. Pick the new version: URL, File or Paste. The URL or file it was imported from is filled in when Zorvik knows it.
  3. Choose Preview changes. Nothing is written yet. The preview lists:
    • Added: operations new in the document;
    • Changed: operations that differ, with the fields that will be updated and the fields where your edits are kept;
    • No longer in the spec (kept, marked): operations the document dropped;
    • new environment variables for new path parameters.
  4. Choose Update to apply it, then Done.

How it merges, field by field:

Fields that can be updatedMethod, URL, headers, body, path variables, switched-off parameters and parameter descriptions, auth, docs
Your edits winA field is updated only where the saved request still has the old document’s value. A field you changed stays yours and is listed as kept.
Never touchedRequest names, scripts and settings
Removed operationsKept, so nothing you built is lost, and shown crossed out in the sidebar (no longer in the API spec). If a later version brings the operation back, it is restored.
New operationsAdded to the folder (and the tag subfolder)
New path parametersAdded to the folder’s environment
The kept documentReplaced by the new version, so the next update compares against it
Old document missingWhen the old version is no longer in specs/, edits can’t be told apart: URLs, parameters, headers and bodies take the new version, docs and auth stay. The preview warns about this.

If the document says nothing new, the preview says Nothing to change: the folder already matches this version.

Import → cURL: paste a command and choose Open as new request. It opens in a new, unsaved tab; save it with Mod+S. If anything couldn’t be imported exactly, a message lists it. A cURL command saved in a file imports from the File tab too, straight into the collection.

Commands copied from browser dev tools (“Copy as cURL”), API docs or a terminal work, written for:

  • bash, zsh and other POSIX shells (\ line continuations, '…', "…" and $'…' quoting);
  • Windows Command Prompt (^ continuations and escapes);
  • PowerShell (` continuations, curl.exe).

A leading $ prompt is ignored. Only the first command is imported.

OptionBecomes
-X, --requestThe method
-H, --headerA header (Name: with no value, which removes a header in curl, is skipped)
-d, --data, --data-ascii, --data-binary, --data-raw, --data-urlencodeThe body. JSON, XML or form data by the Content-Type header; JSON-looking data without a Content-Type becomes JSON (with a note). A JSON body that is exactly a GraphQL request, sent to a …/graphql URL or starting like a GraphQL document, becomes a GraphQL body.
-d @file (one data argument)A binary file body
--jsonA JSON body, plus Accept: application/json
-F, --form, --form-stringA multipart body; name=@path becomes a file field (with ;type= as its content type)
-T, --upload-fileA binary file body; the method becomes PUT
-G, --getThe data goes into the query string, with GET
-I, --headHEAD
-u, --userBasic auth; Digest with --digest, NTLM with --ntlm (DOMAIN\user stays the user name)
--oauth2-bearerBearer token
-b, --cookie with name=valueA Cookie header (cookie files are ignored, with a note)
-A, --user-agent; -e, --refererUser-Agent; Referer
-k, --insecureVerify TLS certificates: Off
-L, --locationFollow redirects: On
--max-redirs, -m/--max-timeMax redirects, Timeout
-0/--http1.0, --http1.1, --http2, --http3HTTP version
--url, --url-query, -g/--globoffThe URL, extra query parameters, literal []{}

Without -X, the method follows curl: POST with data or form fields, PUT with -T, HEAD with -I, else GET.

Proxy options (-x, --socks5, …) and certificate options (--cacert, --cert, --key, …) are ignored with a note: set those in Proxies and TLS & certificates. Options that only change curl’s output (-s, -v, -o, …) are ignored silently; other unsupported options are listed in the note.

Copy any HTTP request as a command or as a short program:

  • the request’s More actions (⋯) → Copy as cURL or code…;
  • or right-click a request in the sidebar → Copy as cURL or code….

The dialog lists the languages on the left (type in the search box to find one by name, library or platform: axios, android, flutter, .net; ↑ and ↓ move through the list), shows the code with syntax highlighting, and Copy copies it. Where a language has several libraries (or shells), pick one above the code. Zorvik remembers your last choice.

LanguageLibrariesNotes
cURLbash / zsh, Windows cmd, PowerShell (curl.exe)bash / zsh is the default on macOS and Linux, Windows cmd on Windows. Binary bodies go through base64 (bash) or a temporary file (cmd, PowerShell), so every byte arrives
HTTPieHTTPie 3A shell command
WgetWget 1.15+A shell command; binary bodies go through a temporary file
PowerShellInvoke-WebRequestPowerShell 7
JavaScriptfetch, axiosfetch: browsers and Node.js 18+; axios: Node.js (an ES module)
Pythonrequests, HTTPX
Gonet/httpA complete program, standard library only
Javajava.net.http.HttpClientJava 11+; runs with java Main.java
KotlinOkHttpOkHttp 4 (Android)
SwiftURLSessioniOS and macOS
C#HttpClient.NET 6+ top-level program
PHPthe curl extension
RubyNet::HTTP
RustreqwestWith Tokio
Dartpackage:httpFlutter and Dart
Clibcurl

What’s in it:

  • The method, the URL, the headers and the body as Zorvik would send them: inherited headers, auth (including the cached OAuth 2.0 token, or <access-token> when there is none), Content-Type and the encoded body.
  • Substitute variables (on by default) resolves {{variables}} with the active environment. Switch it off to keep them as {{name}}. Dynamic variables such as {{$uuid}} get a value either way.
  • Not included: headers Zorvik adds at send time (User-Agent, Accept, Accept-Encoding), cookies from the jar, pre-request scripts, and the request’s settings (timeout, redirects, TLS verification, HTTP version).
  • Each snippet leaves out what its library does by itself, with a comment saying why: Content-Length and Host everywhere; Accept-Encoding where the library adds it and decompresses (OkHttp, URLSession, axios, Dart, PowerShell); a body with GET or HEAD where the library can’t send one (OkHttp, URLSession, fetch, PowerShell). Java’s HttpClient refuses Connection, Expect and Upgrade, so those are left out too. A header sent twice is kept twice where the library allows it, and joined (, , or ; for Cookie) where it holds one value per name. Bodies that aren’t text are embedded as Base64 (C and Rust: as bytes).
  • Comments at the top say what the code can’t do that Zorvik does: answer a Digest or NTLM challenge (the code sends no credentials), and sign each request for AWS Signature V4, OAuth 1.0, JWT, Hawk, Akamai EdgeGrid and ASAP (the copied signature soon expires). <access-token> is explained when there is no OAuth 2.0 token yet.

AI agents can export requests the same way. See AI agents.