Airship Postman collection

Use our Postman public workspace to experiment with the Airship API.

Overview

The Airship API v3 Postman collection provides sample API requests for our most popular endpoints.

To use the Airship collection, you will fork the collection and an environment to your personal workspace, where you can personalize your payloads and add your project credentials, channels, etc. You can also choose to get updates when there are changes to the main collection.

Forking the Airship collection

  1. Go to our Airship Public Workspace.
  2. Click Collections in the sidebar, then select Airship API v3 and click   to open a list of actions.
  3. Click Create a fork in the list of actions.
  4. Enter a label for your fork and select location My Workspace.
  5. (Optional) Check the box for Watch original collection to get notified about updates to the original collection.
  6. Click Fork Collection.

Your forked collection will be created in My Workspace.

Forking the Airship environment

After forking the collection:

  1. Click Environments in the sidebar, then select Public Airship Environment and click   to open a list of actions.
  2. Click Create a Fork in the list of actions.
  3. Enter a label for your fork and select location My Workspace.
  4. Click Fork Environment.

Your forked environment will be created in My Workspace. Initial values are shared when you share a collection or environment. Current values are local and not synced or shared.

Setting up your Postman environment

The Airship Public Workspace contains the Airship API v3 collection and Public Airship Environment. Global variables, such as {{baseUrl}}, and variables defined in the Public Airship Environment are used for all the pre-built requests in the collection. The endpoints use either the Bearer Token {{bearer_token}} or both App Key {{app_key}} and Master Secret {{master_secret}} for authorization.

Follow the steps below to set up your variables in your Postman environment. All the variables defined in the Public Airship Environment are used in the Airship API v3 requests.

  1. Go to My Workspace.

  2. Click Environments in the sidebar, then select Public Airship Environment.

  3. Click   at the top right of the screen and select Public Airship Environment.

  4. Edit the values in the CURRENT VALUE column for variables to be used in the API requests.

    • app_key, master_secret, and bearer_token — Replace the current values with values from your Airship project. Your app key and master secret are in Settings in the Airship dashboard. To create bearer tokens, go to Settings » Project Configuration » Tokens and click Manage. You cannot access a token value after closing its creation window.

    • android_channel and ios_channel — Replace the current values with your Android and iOS channel IDs. See: Find a Channel ID.

    Your current values are local and not synced or shared. You can ignore variables where their current values are blank, since they will be populated via scripts.

  5. Click Save.

 Note

Make sure tag groups exist before adding them to the environment and using them in requests. Verify tag groups in Airship, by going to Settings » Project Configuration » Tag groups.

Sending a push request

The Airship API v3 collection is organized in folders based on endpoints. Clicking on a folder will expand all pre-built requests related to that endpoint. Clicking on a request will open a new tab in the main window of Postman.

  1. Go to My Workspace.
  2. Click Collections in the sidebar, then select the Airship API v3 collection.
  3. Click   at the top right of the screen and select Public Airship Environment.
  4. In the Airship API v3 collection folders, click to open the Push folder, then open the request POST Send a Push.
  5. Click the Body tab to review the request body.
  6. Click Send and verify the response data that is returned below the request section.