Fetch application data

GET /app/data

Retrieves useful details about the application.

Like some other resources, certain properties are translated given the Accept-Language header.


Minimal curl example

curl -ig 'https://api.mention.net/api/app/data' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Accept-Version: 1.19'

Response example

  • Body
{

    "app_languages": {...},
    "alert_languages": {...},
    "alert_countries": {...},
    "alert_tones": {...},
    "alert_sources": {...},
    "alert_share_roles": {...},
    "alert_colors": [...],
    "countries": {...},
    "task_types": {...},
    "mention_folders": {...},
    "mention_log_types": {...},
    "social_account_types": {...},
    "locale": "en",
    "week_days": {...},
    "push_notification_frequencies": {...},
    "desktop_notification_frequencies": {...},
    "email_notification_frequencies": {...},
    "trending_email_notification_frequencies": {...},
    "trending_sms_notification_frequencies: {...}
}

App languages

app_languages

Languages in which the application is translated.

Example:

"app_languages": {
        "fr": {
            "name": "Fran\u00e7ais"
        },
        "en": {
            "name": "English"
        },
        "de": {
            "name": "Deutsch"
        },
        "es": {
            "name": "Espa\u00f1ol"
        }
    }

Alert languages

alert_languages

Languages that can be tracked for a specific alert. The key represents the 2 characters code of the language; the value is a json object containing in particular an attribute "name", with the name of the language.

Example:

...
"alert_languages": {
        "fr": {
            "name": "French",
            "order": 0
        },
        "en": {
            "name": "English",
            "order": 1
        },
        ...
}, ...

Alert countries

alert_countries

Countries that can be tracked for a specific alert. The key represents the 2-characters country code, whereas the value specifies the country name.

XX specifies the "unknown countries". When you select it, it means that if we could not determine the origin country of the mention, and that it matches your other alert criteria, we will keep it and forward it to your alert.

Example:

...
"alert_countries": {
        "XX": "Get mentions without country information",
        "AF": "Afghanistan",
        "AX": "\u00c5land Islands",
        "AL": "Albania",
        "DZ": "Algeria",
        ...
}, ...

Alert tones

alert_tones

Tones that can be attributed to mentions of an alert. The key is the numerical value; The code is a code that may be used in forms, whereas the name is the translated name for this tone.

Example:

...
"alert_tones": {
        "-1": {
            "name": "Negative",
            "code": "negative"
        },
        "0": {
            "name": "Neutral",
            "code": "neutral"
        },
        "1": {
            "name": "Positive",
            "code": "positive"
        }
}, ...

Alert sources

alert_sources

List of all sources. May be used by the client to create a visual list of these mentions.

Example:

...
"facebook": {
            "name": "Facebook",
            "icons": {
                "16x16": "\/bundles\/mentionweb\/images\/icons\/source\/16x16\/facebook.png"
            },

            "order": 0
        },
        "twitter": {
            "name": "Twitter",
            "icons": {
                "16x16": "\/bundles\/mentionweb\/images\/icons\/source\/16x16\/twitter.png"
            },

            "order": 1
        },
        ...
}, ...

Alert share roles

alert_share_roles

List of all active share roles that an account may have on an alert. It is used in alert shares Example:

...
"alert_share_roles": {
    "user": {
        "name": "User"
    },
    "admin": {
        "name": "Owner"
    }
}, ...

Alert colors

alert_colors

List of color codes that can be attributed to alerts. These codes are used in particular in the statistics, in order to distinguish alerts with each other.

Example:

"alert_colors": ["#1ae5bd", "#05e363", "#3299ff", "#ba4de6", "#ffcc00", "#ff8000", "#eb2a5d", "#00c7d0", "#17c632", "#22d1ee", "#5639a6", "#9baab6", "#85939d", "#ff9c00", "#50e3c2", "#e02222", "#7fdb1b", "#3ac2ff", "#a43dff", "#fc3693"],

Countries

countries

A list of countries where our app can be used. The key is a 2 character country code, whereas the value is a json object with translated name attribute, paymentCurrencyattribute and some other attributes. This is mainly used for payment setups.

Example:

...
"countries": {
        "AF": {
            "name": "Afghanistan",
            "code": "AF",
            "isEU": false,
            "paymentCurrency": "USD"
        },
        "AX": {
            "name": "\u00c5land Islands",
            "code": "AX",
            "isEU": false,
            "paymentCurrency": "USD"
        },
        "AL": {
            "name": "Albania",
            "code": "AL",
            "isEU": false,
            "paymentCurrency": "USD"
        }...
}, ...

Task types

task_types

List of tasks that can be applied to a mention. The key is a code for the task, and the value is a json object with translated name attribute and enabled boolean attribute.

Example:

...
"task_types": {
        "read": {
            "name": "to be read",
            "enabled": true
        },
        "comment": {
            "name": "to be commented",
            "enabled": false
        },
        ...
}, ...

Mention folders

mention_folders

List of folders in which mentions may be distributed. The key is the folder code, whereas the value is a json object with a translated name attribute and a boolean hidden attribute. The latter attribute indicates if the folder is at use. Example:

...
"mention_folders": {
        "inbox": {
            "name": "Inbox",
            "hidden": false
        },
        "archive": {
            "name": "Archive",
            "hidden": false
        },
        "trash": {
            "name": "Trash",
            "hidden": false
        },...
}, ...

Mention log types

mention_log_types

List of logs associated to user actions and displayed. The key is a log code, and the value is a json object containing a translated name attribute and meant to be displayed on action.

Example

    ...
    "mention_log_types": {
        "favorited": {
            "name": "favorited"
        },
        "unfavorited": {
            "name": "removed from favorites"
        },
        "trashed": {
            "name": "marked as irrelevant"
        },
        "untrashed": {
            "name": "unmarked as irrelevant"
        },
        ...
    }, ...

Social account types

social_account_types

List of all social account vendors that can be registered at mention. Example

...
"social_account_types": {
    "facebook": {
        "name": "Facebook"
    },
    "twitter": {
        "name": "Twitter"
    },
    "tumblr": {
        "name": "Tumblr"
    },
    "buffer": {
        "name": "Buffer"
    },
    "zendesk": {
        "name": "Zendesk"
    },
    "instagram": {
        "name": "Instagram"
    }
},
...

locale

locale

A variable that indicates the application language of the requesting account.

Example

...
"locale": "en",
...

Week days

week_days

Week day list, with key being the number representing day position in the week, and value being a json object with a translated name attribute, and a translated abbr for abbreviation attribute. Example

...
"week_days": {
        "1": {
            "name": "Mon",
            "abbr": "Mon"
        },
        "2": {
            "name": "Tue",
            "abbr": "Tue"
        },
        "3": {
            "name": "Wed",
            "abbr": "Wed"
        }, 
        ...
}, ...

Push notification frequencies

push_notification_frequencies

Lists all push notification frequencies of the application, that is, frequencies of notifications for all mobile clients. The key is the frequency code, whereas the value is a json object with a translated name property, and some other secondary properties. Example

...
"push_notification_frequencies": {
    "default": {
        "name": "default",
        "enabled": true,
        "order": 0
    },
    "instantly": {
        "name": "instantly",
        "enabled": true,
        "order": 1
    },
    "5min": {
        "name": "5min",
        "enabled": true,
        "order": 2
    },
    ...
}

Desktop notification frequencies

desktop_notification_frequencies

Lists all desktop notification frequencies of the application, that is, for all desktop clients (webapp, computer installed application). The key is the frequency code, whereas the value is a json object with translated name attribute mainly. Example

"desktop_notification_frequencies": {
    "default": {
        "name": "default",
        "enabled": true,
        "order": 0
    },
    "instantly": {
        "name": "instantly",
        "enabled": true,
        "order": 1
    },
    "5min": {
        "name": "5min",
        "enabled": true,
        "order": 2
    },
    ...
}

Email notification frequencies

email_notification_frequencies

Lists all email notification frequencies available in the application. The key is the frequency code, whereas the value is a json object with, mainly, a translated name property.

Example

"email_notification_frequencies": {
    "default": {
        "name": "default",
        "enabled": true,
        "order": 0
    },
    "daily": {
        "name": "daily",
        "enabled": true,
        "order": 1
    },
    "weekly": {
        "name": "weekly",
        "enabled": true,
        "order": 2
    },
    ...
}

trending_email_notification_frequencies

Lists all trending email notification frequencies available in the application. The key is the frequency code, whereas the value is a json object with, mainly, a translated name property.

Example

"trending_email_notification_frequencies": {
    "default": {
        "name": "default",
        "enabled": true,
        "order": 0
    },
    "occasionally": {
        "name": "occasionally",
        "enabled": true,
        "order": 1
    },
    "often": {
        "name": "often",
        "enabled": true,
        "order": 2
    },
    ...
}

trending_sms_notification_frequencies

Lists all trending email notification frequencies via sms available in the application. The key is the frequency code, whereas the value is a json object with, mainly, a translated name property.

Example

"trending_sms_notification_frequencies": {
    "default": {
        "name": "default",
        "enabled": true,
        "order": 0
    },
    "occasionally": {
        "name": "occasionally",
        "enabled": true,
        "order": 1
    },
    "often": {
        "name": "often",
        "enabled": true,
        "order": 2
    },
    ...
}