Airship Postman collection

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

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. Select Collections in the sidebar, then select Airship API v3.
  3. Select the three dots icon (), then select Create a fork.
  4. Enter a label for your fork, then select location My Workspace.
  5. (Optional) Check the box for Watch original collection to get notified about updates to the original collection.
  6. Select Fork Collection.

Your forked collection will be created in My Workspace.

Forking the Airship environment

After forking the collection:

  1. Select Environments in the sidebar, then select Public Airship Environment.
  2. Select the three dots icon (), then select Create a fork.
  3. Enter a label for your fork, then select location My Workspace.
  4. Select 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 a 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. Select Environments in the sidebar, then select Public Airship Environment.
  3. Select the down arrow icon () at the top right of the screen, then select Public Airship Environment.
  4. Edit the values in the CURRENT VALUE column for variables to be used in the API requests:
    VariableValue
    app_key and master_secretReplace the current values with values from your Airship project. In Airship, go to Settings and copy them from the sidebar,
    bearer_tokenReplace the current values with values from your Airship project. If you don't already have a bearer token, follow the steps for Creating bearer tokens in Airship API Security.
    android_channel and ios_channelReplace 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 with blank values. They will be populated via scripts.
  5. Select Save.
 Note

Make sure tag groups exist in Airship before adding them to the environment and using them in requests:

  1. Go to Settings.
  2. Under Project configuration, select Manage for Tag Groups.

Sending a push request

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

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