Skip to main content

How to use Propel Applications

Propel Applications represent the web or mobile app you are building. They provide the API credentials that allow your client- or server-side app to access the Propel API. The Application's Propeller that determines the speed and cost of your Metric Queries.

Each web or mobile app you build should have its own Propel Application. This way you can have separate API credentials for each app or workload and you can control the cost and speed of Metric Queries for each. You will also be able to see the query volume and spend for each Application.

Creating an Application​

Applications must be created via the Propel Console. To create a new Application, follow these steps:

  1. Log into the Propel Console and navigate to the Applications section.

  2. Click on the "New Application" button.

  3. Enter a unique name and description for your new Application.

  4. Select the desired scopes, i.e. what the Application will be allowed to do.

  5. Select the Propeller size (P1_X_SMALL is a good default to start with. You can change it later if you need to).

  6. And click "Create Application".

An animated screen capture of how to create a Propel Application.

After you've created your Application, you can follow our step-by-step authentication guide to start making API requests with Propel.

Application properties​

A Propel Application has the following properties: a pair of OAuth 2.0 client credentials, a list of scopes, and a Propeller.

OAuth 2.0 client credentials​

The OAuth 2.0 client credentials consist of a client identifier and a secret used to request access tokens that give you scoped access to the Propel API.

Scopes​

Scopes control what an Application can or cannot do on your app’s behalf. When generating an access token for your app, you don't need to provide scopes in your authorization request. However, if you wish to further restrict access for a given Application, you can use the optional scope parameter in the authorization request.

Your app can request the following scopes:

ScopeDescription
adminThe Application has read and write access to Data Sources, Data Pools, and Metrics within its Environment.
application:adminThe Application can create another Application within its Environment.
metric:queryThe Application can query Metrics within its Environment.
metric:readThe Application can list Metrics within its Environment.
metric:statsThe Application can query Metrics’ Dimension Statistics within its Environment.
data_pool:queryThe Application can query Data Pools within its Environment.
data_pool:statsThe Application can query Data Pools’ Dimension Statistics within its Environment.

Example 1: Generating an access token with only the “metric:query” and “metric:stats” scopes​

This example uses curl to generate an access token with only the “metric:query” and “metric:stats” scopes. By doing so, we can ensure the generated access token can only query Metrics and Dimension Statistics. It will not be able to create new Data Sources, delete Metrics, or perform any other admin operations.

curl https://auth.us-east-2.propeldata.com/oauth2/token \
-d grant_type=client_credentials \
-d client_id=$APPLICATION_ID \
-d client_secret=$APPLICATION_SECRET \
-d 'scope=metric:query metric:stats'

Propeller​

Propellers are the serverless computing capacity in Propel. They are your Application's query processing power. They determine the number of rows per second that a request can process when querying a Data Pool. The larger the Propeller, the more rows per second it can process, resulting in faster queries. The size of the Propeller determines the price of the data processed for a query. They provide an easy way to select the optimal cost and query speed for each use case.

The table below describes the different Propellers, their capacity, and their price. The Propeller’s price is determined by the maximum number of records it can process per second.

PropellerMax records processed per secondPrice per processed GB
P1_X_SMALL1,000,000$0.03 / GB
P1_SMALL10,000,000$0.05 / GB
P1_MEDIUM100,000,000$0.10 / GB
P1_LARGE250,000,000$0.15 / GB
P1_X_LARGE500,000,000$0.25 / GB

Read How to choose the right Propeller to learn the rules of thumb for choosing the optimal speed and cost for your app.

API Reference​

Below are all the APIs that relate to Applications.

Objects​

Queries​

Mutations​

Applications cannot be created, modified or deleted via the API.

Enums​

Inputs​

Since Applications cannot be created, modified or deleted via the API, there are no related inputs.