Skip to content

Test the API with Postman

Audience  Developers who prefer a point-and-click workflow—send, inspect, iterate—directly from Postman without navigating Swagger-UI or writing cURL scripts.


1 · Prerequisites

Requirement Minimum Version Notes
Postman Desktop 10.21 Native application strongly recommended.
ANKASecure Collection 2.0 Download below.
ANKASecure Environment 1.0 Download below.

2 · Download

Artifact Path within docs SHA-256
Collection (JSON) downloads/postman/ankasecure-v2.postman_collection.json downloads/postman/core-generate-postman-collection.sha256
Environment (JSON) downloads/postman/ankasecure-env.json 935536adaf30e3bcf4c38cb7e2100b42ad56cd002e3e2bb33192036806c05318

Download both files to a local folder.
Integrity can be verified with shasum -a 256 <file>.


3 · Import into Postman

  1. File → Import → Upload Files → select the collection and the environment.
  2. Confirm that the “AnkaSecure Environment” is active (drop-down in the top-right corner).
  3. The collection sidebar now shows three root folders:
  4. Key Management
  5. Secure Operations
  6. Secure Streaming

Each folder maps exactly to the tags defined in the OpenAPI specification.


4 · Configure Environment Variables

Variable Default Description
host demo.ankatech.co DNS name or IP of your AnkaSecure server.
port 443 Listener port.
baseUrl auto-derived ${protocol}://${host}:${port}
token (empty) Runtime JWT acquired in step 5.

Update host/port if you are targeting an on-premise or staging instance.
Do not edit baseUrl; a pre-request script derives it on every call.


5 · Authenticate

  1. Expand Authentication folder.
  2. Open POST /auth/login request.
  3. In the Body › JSON tab, provide valid credentials:

json { "clientId": "<your-client-id>", "clientSecret": "<your-client-secret>" }

  1. Click Send.

  2. On success (200 OK) a pre-request script extracts access_token and assigns it to the token environment variable. All subsequent requests automatically inject

    Authorization: Bearer {{token}}

    in the header.

Troubleshooting\ If token remains empty, open the "Tests" tab of POST /auth/login and verify that pm.environment.set('token', ...) is executed.


6 - Run Your First Flow

Open the Quick-Start folder and click ▶ Run collection.

Step Request Expected Status
① Generate Key POST /api/key-management/keys 201 Created
② Encrypt Data POST /api/crypto/encrypt 200 OK
③ Decrypt Data POST /api/crypto/decrypt 200 OK

The Collection Runner displays pass/fail and aggregated timings. All assertions are implemented in the "Tests" tab of each request and use Chai expectations.


7 - Streaming Operations

For large files or streaming use-cases:

  1. Select any request under Secure Streaming.

  2. In the Body › form-data tab, retain the two parts:

    • metadataapplication/json

    • fileFile (choose file dialog)

Pre-request scripts hash the payload to enforce the 5 MB limit defined by the API; exceeding the limit fails fast with Payload Too Large.


8 - Continuous Integration (Optional)

The collection is fully compatible with Newman:

npm install -g newman newman run ankasecure-v2.postman_collection.json\ --environment ankasecure-env.json\ --reporters cli,junit\ --reporter-junit-export newman-report.xml

Integrate the JUnit report into Jenkins, GitHub Actions, or GitLab CI/CD pipelines for regression-style contract testing.


9 - Mapping to Swagger-UI

Collection folders and request names correspond one-to-one with tags and operationIds in Swagger-UI.\ When you need deep schema details, click "Swagger UI" in the sidebar or navigate to /api_reference/swagger.md.


10 - Support

  • API usage & limits → GET /api/license-management/license-info/{clientId} (folder License)

  • Collection issues  → open a ticket in the documentation workspace (docs.idea label).

  • General assistance → [email protected] (Response SLA: 1 business day).


Change Log

Version Date Notes
1.0 2025-05-12 Initial public release aligned with OpenAPI 2.0.