Production Tips | Near Space Labs Docs

Postman Collection

Import the official collection to explore every endpoint with pre-built environments, example payloads, and scripting helpers.

  1. Download the Near Space Labs Postman collection.
  2. Import into Postman and set NSL_ID + NSL_SECRET env vars.
  3. Hit "Send" to test auth, surveys, coverage, and tile downloads in minutes.

Best Practices

Token Management

import time

class TokenManager:
    def __init__(self, nsl_id, nsl_secret):
        self.nsl_id = nsl_id
        self.nsl_secret = nsl_secret
        self.token = None
        self.expires_at = 0

def get_token(self):
        # Refresh 5 minutes before expiry
        if time.time() > self.expires_at - 300:
            self.token = get_auth_token(self.nsl_id, self.nsl_secret)
            self.expires_at = time.time() + 3600
        return self.token

Rate Limits & Performance