Table of Contents

Class PostmanImporter

Namespace
Cress.Importers.Postman
Assembly
Cress.Importers.dll

Converts a Postman Collection v2.1 JSON file into one or more CressFlow objects. Each request becomes a separate flow by default (singleFlow = false), or all requests are combined into a single multi-step flow when singleFlow = true.

public sealed class PostmanImporter
Inheritance
PostmanImporter
Inherited Members

Remarks

Supports:

  • HTTP methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
  • URL from request.url.raw (preferred) or reconstructed from host/path
  • Headers → with.headers.* key/value pairs
  • Raw body → with.body
  • Postman variable syntax {{varName}} is preserved verbatim
  • Folder hierarchy → flow tags
Does NOT support:
  • Pre-request scripts or test scripts (Postman JS hooks) — emitted as TODO comment steps
  • Body modes other than "raw" — emitted as TODO comment steps

Methods

Import(string, bool)

Parse a Postman Collection v2.1 JSON string and return one CressFlow per request.

public IReadOnlyList<CressFlow> Import(string collectionJson, bool singleFlow = false)

Parameters

collectionJson string

Full JSON content of the Postman collection.

singleFlow bool

When true, all requests are combined into one flow with sequential steps. When false (default), one flow is produced per request.

Returns

IReadOnlyList<CressFlow>

A list of CressFlow objects ready for YAML serialization.