Mission Data API Documentation
Disclaimer
By using the Agents of Discovery API, you agree that Agents of Discovery is not liable for any downtime, loss of data or any and all other damages that may occur as a result of using the API. Agents of Discovery Inc. makes no warranties or representations of any kind with respect to its API, including but not limited to its accuracy, completeness, timeliness or reliability. You agree to indemnify and hold Agents of Discovery Inc. harmless from any claims arising out of your use of the API.
These instructions assume the reader has at least an intermediate knowledge of web development and APIs.
Request
Authentication
Before making a web request, you will need an API key. Your unique API key can be obtained from your Agents of Discovery contact person.
Sending the Request
Once you have your API key, you can send a web request to the following endpoint to access data about all publicly available Missions:
https://data.mm.agentsofdiscovery.com/v1/MissionData?api_key={YOUR_API_KEY}
Organization Missions
If you only wish to access data from Missions associated with a specific Organization, you will need an Organization ID. Your unique Organization ID can be requested from your Agents of Discovery contact person. Once you have received your Organization ID, you can send a web request to the following endpoint:
https://data.mm.agentsofdiscovery.com/v1/MissionData?api_key={YOUR_API_KEY}&organization_id={YOUR_ORGANIZATION_ID}
Response
The API will respond with an array of objects in JSON format, where each object represents data for a specific Mission. Each Mission object’s data is defined as follows:
Object Variable | Description |
country* | The country where the Mission is located. |
stateProvince* | The state or province where the Mission is located. |
city* | The city where the Mission is located. |
location* | A local landmark within or near the Mission (this field often returns an empty string). |
type |
Returns “playAtHome” if the Mission can be played from home. Returns “playOnSite” if the Mission has to be played at a specific location. |
isFormal | Returns true if the Mission is intended to be used by formal institutions (schools, etc.). Returns false if the Mission can be played by anyone in the public. |
isPreview |
Returns true if the Mission is only available for internal testers. Returns false if the Mission can be played by anyone in the public. |
displayPanorama** | If the Mission Maker has indicated that they want to display a 360 degree Google Street View Panorama of their Mission site, the returned value will be true. If not, the returned value will be false. |
welcomeMessage** | If the Mission Maker has made the Mission’s Welcome Message text available, it will appear here. If not, the returned value will be null. |
safetyInformation** | If the Mission Maker has made the Mission’s Safety Information available, it will appear here. If not, the returned value will be null. |
directions** | If the Mission Maker has made the Mission’s Directions available, they will appear here. If not, the returned value will be null. |
id | The unique identifier for the Mission. |
partnerId | A unique identifier for the Partner associated with the Mission. |
organizationId | A unique identifier for the Organization associated with the Mission. |
name | The name of the Mission. |
partnerName | The name of the Partner associated with the Mission. |
websiteLink | A link to the website associated with the Mission. |
startLatitude | The latitude value of the Mission’s starting point. |
startLongitude | The longitude value of the Mission’s starting point. |
* These values are pulled from Google’s Reverse Geocoding API using the Mission’s startLatitude and startLongitude values.
** Mission Makers choose whether or not they want to showcase these details when filling out the Mission Promotion section at the bottom of the Edit Mission form.
Use Cases
It is recommended that Missions whose type is “playOnSite” be placed on a Map, and that Missions whose type is “playAtHome” be placed in a separate table, list or graphic. An example of this can be viewed on the Agents of Discovery Missions page.