Endpoint and Authentication

Please refer to the API overview section to get the API endpoint, query format and authentication process.

This section of the documentation shows how to manage your apps, API keys and iOS push certificates.

Apps

List

GET /api/apps

This API lists all apps available for the user making the request.

Query parameter

Property Type Description Default
unwanted boolean Defines if the list should include apps removed from sale or other inactive apps false

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "apps": [
      {
        "identifier": "FAAPPLI_1234567",
        "localizations": [
          {
            "language": "fr",
            "name": "BonjourApp",
            "description": null
          }
        ],
        "store_id": "123455688",
        "package_name": "fr.bonjour.app",
        "platform": "iOS App",
        "platform_id": "app-store",
        "is_qa": false,
        "has_usage_data": true,
        "has_pem_file": true,
        "last_sdk_version": "4.1.1",
        "children_app_id": [],
        "parent_app_id": null,
        "downloads": 10234,
        "downloads_last_report_date": 0,
        "mau": 321,
        "has_unwanted_status": false,
        "newest_version": "5.5.10",
        "last_version_status": "prepareForSubmission",
        "last_update": 1442389928,
        "icon": {
          "thumb": "https://abc.com/icon.png",
          "medium": "https://abc.com/icon.png",
          "large": "https://abc.com/icon.png"
        },
        "cv_icon": {
          "thumb": "https://abc.com/icon.png",
          "medium": "https://abc.com/icon.png",
          "large": "https://abc.com/icon.png"
        },
        "statuses": [
          {
            "cdate": 1442389928,
            "state": "prepareForSubmission",
            "version_number": "1.0.1.8"
          },
          {
            "cdate": 1437166560,
            "state": "live",
            "version_number": "5.5.10"
          },
          ...
        ],
        "current_live_version": "5.5.10",
        "current_version": "5.5.10",
        "primary_category": "SocialNetworking",
        "secondary_category": null
      },
      ...
    ]
  }
}

View

GET /api/apps/app_identifier

Returns one given app, provided the user requesting it has access to it.

Query parameter

Property Type Description Default
app_identifier string The identifier for the app to view required

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FAAPPLI_1234567",
    "localizations": [
      {
        "language": "fr",
        "name": "BonjourApp",
        "description": null
      }
    ],
    "store_id": "123455688",
    "package_name": "fr.bonjour.app",
    "platform": "iOS App",
    "platform_id": "app-store",
    "is_qa": false,
    "has_usage_data": true,
    "has_pem_file": true,
    "last_sdk_version": "4.1.1",
    "children_app_id": [],
    "parent_app_id": null,
    "downloads": 10234,
    "downloads_last_report_date": 0,
    "mau": 321,
    "has_unwanted_status": false,
    "newest_version": "5.5.10",
    "last_version_status": "prepareForSubmission",
    "last_update": 1442389928,
    "icon": {
      "thumb": "https://abc.com/icon.png",
      "medium": "https://abc.com/icon.png",
      "large": "https://abc.com/icon.png"
    },
    "cv_icon": {
      "thumb": "https://abc.com/icon.png",
      "medium": "https://abc.com/icon.png",
      "large": "https://abc.com/icon.png"
    },
    "statuses": [
      {
        "cdate": 1442389928,
        "state": "prepareForSubmission",
        "version_number": "1.0.1.8"
      },
      {
        "cdate": 1437166560,
        "state": "live",
        "version_number": "5.5.10"
      },
      ...
    ],
    "current_live_version": "5.5.10",
    "current_version": "5.5.10",
    "primary_category": "SocialNetworking",
    "secondary_category": null
  }
}

Status: 404 not found

{
    "status": "not_found",
    "success": false,
    "error_message": "App not found"
}

Update

PUT /api/apps/app_identifier

Updates the app matching the identifier, provided that the user has rights to access and edit the app.

Edition of apps automatically fetched from store accounts connected to FollowAnalytics is limited to the parent_identifier and name parameters. The others are automatically managed based on the data fetched from these accounts.

Query parameter

Property Type Description Default
app_identifier string The identifier for the app to edit required

Body parameters

Property Type Description Default
name string Name of the app as it will appear in the app list in FollowAnalytics, and as returned by the APIs -
package_name string Package name of the app. Usually follows a reverse domain name pattern, e.g. com.examplesite.appname -
store_id string Store identifier, which can be identical to the package name, or anything that would identify the app uniquely against a given app store. -
sku string Stock Keeping Unit, can be used to store an additional app identifier -
app_type string Either iOS App or Android App -
qa boolean Denotes if the app should be identified as a QA or Test app -
parent_identifier string Identifier of another app that would be its parent. This allows 2 levels in the app selector in FollowAnalytics. -

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FAAPPLI_1234567",
    "localizations": [
      {
        "language": "fr",
        "name": "BonjourApp",
        "description": null
      }
    ],
    "store_id": "123455688",
    "package_name": "fr.bonjour.app",
    "platform": "iOS App",
    "platform_id": "app-store",
    "is_qa": false,
    "has_usage_data": true,
    "has_pem_file": true,
    "last_sdk_version": "4.1.1",
    "children_app_id": [],
    "parent_app_id": null,
    "downloads": 10234,
    "downloads_last_report_date": 0,
    "mau": 321,
    "has_unwanted_status": false,
    "newest_version": "5.5.10",
    "last_version_status": "prepareForSubmission",
    "last_update": 1442389928,
    "icon": {
      "thumb": "https://abc.com/icon.png",
      "medium": "https://abc.com/icon.png",
      "large": "https://abc.com/icon.png"
    },
    "cv_icon": {
      "thumb": "https://abc.com/icon.png",
      "medium": "https://abc.com/icon.png",
      "large": "https://abc.com/icon.png"
    },
    "statuses": [
      {
        "cdate": 1442389928,
        "state": "prepareForSubmission",
        "version_number": "1.0.1.8"
      },
      {
        "cdate": 1437166560,
        "state": "live",
        "version_number": "5.5.10"
      },
      ...
    ],
    "current_live_version": "5.5.10",
    "current_version": "5.5.10",
    "primary_category": "SocialNetworking",
    "secondary_category": null
  }
}

Status: 404 not found

{
    "status": "not_found",
    "success": false,
    "error_message": "App not found"
}

Status: 400

{
    "status": "400",
    "success": false,
    "error_message": "Param xxxxx is not valid"
}

Create

POST /api/apps

Creates an app. Do not forget to add an API key to it to be able to send mobile data form the SDK. To do so, retrieve the identifier from the app returned by this create call, and use the create method on /api/apps/{app identifier}/api_keys, see below for details.

Body parameters

Property Type Description Default
name string Name of the app as it will appear in the app list in FollowAnalytics, and as returned by the APIs required
package_name string Package name of the app. Usually follows a reverse domain name pattern, e.g. com.examplesite.appname required
store_id string Store identifier, which can be identical to the package name, or anything that would identify the app uniquely against a given app store. required
sku string Stock Keeping Unit, can be used to store an additional app identifier -
app_type string Either iOS App or Android App required
qa boolean Denotes if the app should be identified as a QA or Test app false
parent_identifier string Identifier of another app that would be its parent. This allows 2 levels in the app selector in FollowAnalytics. -

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FAAPPLI_1234567",
    "localizations": [
      {
        "language": "fr",
        "name": "BonjourApp",
        "description": null
      }
    ],
    "store_id": "123455688",
    "package_name": "fr.bonjour.app",
    "platform": "iOS App",
    "platform_id": "app-store",
    "is_qa": false,
    "has_usage_data": true,
    "has_pem_file": true,
    "last_sdk_version": "4.1.1",
    "children_app_id": [],
    "parent_app_id": null,
    "downloads": 10234,
    "downloads_last_report_date": 0,
    "mau": 321,
    "has_unwanted_status": false,
    "newest_version": "5.5.10",
    "last_version_status": "prepareForSubmission",
    "last_update": 1442389928,
    "icon": {
      "thumb": "https://abc.com/icon.png",
      "medium": "https://abc.com/icon.png",
      "large": "https://abc.com/icon.png"
    },
    "cv_icon": {
      "thumb": "https://abc.com/icon.png",
      "medium": "https://abc.com/icon.png",
      "large": "https://abc.com/icon.png"
    },
    "statuses": [
      {
        "cdate": 1442389928,
        "state": "prepareForSubmission",
        "version_number": "1.0.1.8"
      },
      {
        "cdate": 1437166560,
        "state": "live",
        "version_number": "5.5.10"
      },
      ...
    ],
    "current_live_version": "5.5.10",
    "current_version": "5.5.10",
    "primary_category": "SocialNetworking",
    "secondary_category": null
  }
}

Status: 400

{
    "status": "400",
    "success": false,
    "error_message": "Param xxxxx is not valid"
}

Delete

DELETE /api/apps/app_identifier

You can only delete apps that are not automatically managed on connected store accounts.

An app you delete is actually archived for 30 days and can be retrieve by the FollowAnalytics team if necessary.

Query parameter

Property Type Description Default
app_identifier string The identifier for the app to delete required

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FAAPPLI_1234567",
    "localizations": [
      {
        "language": "fr",
        "name": "BonjourApp",
        "description": null
      }
    ],
    "store_id": "123455688",
    "package_name": "fr.bonjour.app",
    "platform": "iOS App",
    "platform_id": "app-store",
    "is_qa": false,
    "has_usage_data": true,
    "has_pem_file": true,
    "last_sdk_version": "4.1.1",
    "children_app_id": [],
    "parent_app_id": null,
    "downloads": 10234,
    "downloads_last_report_date": 0,
    "mau": 321,
    "has_unwanted_status": false,
    "newest_version": "5.5.10",
    "last_version_status": "prepareForSubmission",
    "last_update": 1442389928,
    "icon": {
      "thumb": "https://abc.com/icon.png",
      "medium": "https://abc.com/icon.png",
      "large": "https://abc.com/icon.png"
    },
    "cv_icon": {
      "thumb": "https://abc.com/icon.png",
      "medium": "https://abc.com/icon.png",
      "large": "https://abc.com/icon.png"
    },
    "statuses": [
      {
        "cdate": 1442389928,
        "state": "prepareForSubmission",
        "version_number": "1.0.1.8"
      },
      {
        "cdate": 1437166560,
        "state": "live",
        "version_number": "5.5.10"
      },
      ...
    ],
    "current_live_version": "5.5.10",
    "current_version": "5.5.10",
    "primary_category": "SocialNetworking",
    "secondary_category": null
  }
}

Status: 400

{
    "status": "400",
    "success": false,
    "error_message": "You cannot remove this app"
}

API keys

To allow the FollowAnalytics SDK to send mobile data onto an app, an API key has to be used. Several apps can have the same API key, as long as it's defined on each of them.

List

GET /api/apps/app_identifier/api_keys

This API lists all API keys available for the given app.

Query parameter

Property Type Description Default
app_identifier string The identifier for the app for which to list API keys required

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "api_keys": [
      {
        "identifier": "FAAPIKEY_1234567",
        "api_key": "ZA1234567890AA",
        "revoked": false
      }
    ]
  }
}

View

GET /api/apps/app_identifier/api_keys/key_identifier

This API returns the API key matching the identifier provided, for the provided app identifier.

Query parameters

Property Type Description Default
app_identifier string The identifier for the app on which the key is defined required
key_identifier string The identifier for the API key to view required

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FAAPIKEY_1234567",
    "api_key": "ZA1234567890AA",
    "revoked": false
  }
}

Status: 404 not found

{
    "status": "not_found",
    "success": false,
    "error_message": "App or API key not found"
}

Update

UPDATE /api/apps/app_identifier/api_keys/key_identifier

Modifies an API key.

Query parameters

Property Type Description Default
app_identifier string The identifier for the app on which the key is defined required
key_identifier string The identifier for the API key to view required

Body parameters

Property Type Description Default
api_key string The actual key you'd like to use to send data on this app -
revoked boolean A revoked API key cannot be used anymore -

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FAAPIKEY_1234567",
    "api_key": "ZA1234567890AA",
    "revoked": false
  }
}

Status: 404 not found

{
    "status": "not_found",
    "success": false,
    "error_message": "App or API key not found"
}

Create

POST /api/apps/app_identifier/api_keys

Creates an API key.

Query parameters

Property Type Description Default
app_identifier string The identifier for the app on which the key is defined required

Body parameters

Property Type Description Default
api_key string The actual key you'd like to use to send data on this app random key
revoked boolean A revoked API key cannot be used anymore false

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FAAPIKEY_1234567",
    "api_key": "ZA1234567890AA",
    "revoked": false
  }
}

Status: 400

{
    "status": "400",
    "success": false,
    "error_message": "Param xxxxx is not valid"
}

Push certificates

FollowAnalytics needs a push certificate to be able to send push notifications to iOS apps.

Private keys are encrypted in the database, and decrypted when returned by the APIs.

List

GET /api/apps/app_identifier/push_certificates

This API lists all push certificates available for the given app.

Query parameter

Property Type Description Default
app_identifier string The identifier for the app for which to list certificates required

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "push_certificates": [
      {
        "identifier": "FACERT_krs4FCI",
        "x509_pem": "-----BEGIN CERTIFICATE-----\r\nABCDEF1234............\r\n-----END CERTIFICATE-----\r\n",
        "revoked": false,
        "not_after": "2016-06-23T17:44:43.000Z",
        "not_before": "2015-06-24T17:44:43.000Z",
        "pkey_pem": "-----BEGIN RSA PRIVATE KEY-----\nABCDEF1234............\n-----END RSA PRIVATE KEY-----\n"
      }
    ]
  }
}

View

GET /api/apps/app_identifier/push_certificates/cert_identifier

This API returns the push certificate matching the identifier provided, for the provided app identifier.

Query parameters

Property Type Description Default
app_identifier string The identifier for the app on which the certificate is defined required
cert_identifier string The identifier for the certificate to view required

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FACERT_krs4FCI",
    "x509_pem": "-----BEGIN CERTIFICATE-----\r\nABCDEF1234............\r\n-----END CERTIFICATE-----\r\n",
    "revoked": false,
    "not_after": "2016-06-23T17:44:43.000Z",
    "not_before": "2015-06-24T17:44:43.000Z",
    "pkey_pem": "-----BEGIN RSA PRIVATE KEY-----\nABCDEF1234............\n-----END RSA PRIVATE KEY-----\n"
  }
}

Status: 404 not found

{
    "status": "not_found",
    "success": false,
    "error_message": "App or certificate not found"
}

Update

UPDATE /api/apps/app_identifier/push_certificates/cert_identifier

Modifies a push certificate.

Query parameters

Property Type Description Default
app_identifier string The identifier for the app on which the certificate is defined required
cert_identifier string The identifier for the certificate to view required

Body parameters

Property Type Description Default
x509_pem string The pem format of the certificate (see the example API outputs) -
pkey_pem string The pem format of the private key (see the example API outputs) -
revoked boolean A revoked certificate cannot be used anymore -

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FACERT_krs4FCI",
    "x509_pem": "-----BEGIN CERTIFICATE-----\r\nABCDEF1234............\r\n-----END CERTIFICATE-----\r\n",
    "revoked": false,
    "not_after": "2016-06-23T17:44:43.000Z",
    "not_before": "2015-06-24T17:44:43.000Z",
    "pkey_pem": "-----BEGIN RSA PRIVATE KEY-----\nABCDEF1234............\n-----END RSA PRIVATE KEY-----\n"
  }
}

Status: 404 not found

{
    "status": "not_found",
    "success": false,
    "error_message": "App or certificate not found"
}

Create

POST /api/apps/app_identifier/push_certificates

Creates a push certificate on the specified app.

Query parameters

Property Type Description Default
app_identifier string The identifier for the app on which the push certificate is to be added required

Body parameters

Property Type Description Default
x509_pem string The pem format of the certificate (see the example API outputs) required
pkey_pem string The pem format of the private key (see the example API outputs) required
revoked boolean A revoked certificate cannot be used anymore false

Response

Status: 200 OK

{
  "success": true,
  "result": {
    "identifier": "FACERT_krs4FCI",
    "x509_pem": "-----BEGIN CERTIFICATE-----\r\nABCDEF1234............\r\n-----END CERTIFICATE-----\r\n",
    "revoked": false,
    "not_after": "2016-06-23T17:44:43.000Z",
    "not_before": "2015-06-24T17:44:43.000Z",
    "pkey_pem": "-----BEGIN RSA PRIVATE KEY-----\nABCDEF1234............\n-----END RSA PRIVATE KEY-----\n"
  }
}

Status: 400

{
    "status": "400",
    "success": false,
    "error_message": "Param xxxxx is not valid"
}