Getting Started Edit
Welcome to our API.
This API document is designed for those interested in developing for our platform.
This API is still under development and will evolve.
You’ll succeed if you do this.
Here’s some useful information.
Something may not happen if you try and do this.
Something bad will happen if you do this.
Authentication Edit
You need to be authenticated for all API requests. You can generate an API key in your developer dashboard.
Add the API key to all requests as a GET parameter.
Nothing will work unless you include this API key
const request = require('request');
request('https://admin.gomoodly.com/api-go-moodly?token=YOUR_APP_KEY', (error, response, body) => {
if (!error && response.statusCode == 200) {
console.log(body);
}
})
curl https://admin.gomoodly.com/api-go-moodly?token=YOUR_APP_KEY
Errors Edit
| Code | Name | Description |
|---|---|---|
| 200 | OK | Success |
| 403 | Forbidden | We couldn’t authenticate you |
All errors will return JSON in the following format:
{
"error": true,
"message": "error message here"
}
/users Edit
List all users
const request = require('request');
request('https://admin.gomoodly.com/api-go-moodly?token=YOUR_APP_KEY', (error, response, body) => {
if (!error && response.statusCode == 200) {
console.log(body);
}
});
curl https://admin.gomoodly.com/api-go-moodly/users?token=YOUR_APP_KEY
[
{
"id": "UDWRCG6NQ",
"real_name": "Go Moodley",
"name": "admin",
"color": "9f69e7",
"image_24": "https://secure.gravatar.com/avatar/4967fa84b6d5c8cd2f223b74a8e02932.jpg?s=24&d=https%3A%2F%2Fa.slack-edge.com%2F00b63%2Fimg%2Favatars%2Fava_0019-24.png",
"image_32": "https://secure.gravatar.com/avatar/4967fa84b6d5c8cd2f223b74a8e02932.jpg?s=32&d=https%3A%2F%2Fa.slack-edge.com%2F00b63%2Fimg%2Favatars%2Fava_0019-32.png",
"image_48": "https://secure.gravatar.com/avatar/4967fa84b6d5c8cd2f223b74a8e02932.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2F00b63%2Fimg%2Favatars%2Fava_0019-48.png",
"image_72": "https://secure.gravatar.com/avatar/4967fa84b6d5c8cd2f223b74a8e02932.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2F00b63%2Fimg%2Favatars%2Fava_0019-72.png",
"image_192": "https://secure.gravatar.com/avatar/4967fa84b6d5c8cd2f223b74a8e02932.jpg?s=192&d=https%3A%2F%2Fa.slack-edge.com%2F00b63%2Fimg%2Favatars%2Fava_0019-192.png",
"image_512": "https://secure.gravatar.com/avatar/4967fa84b6d5c8cd2f223b74a8e02932.jpg?s=512&d=https%3A%2F%2Fa.slack-edge.com%2F00b63%2Fimg%2Favatars%2Fava_0019-512.png"
},
{
"id": "UDWRK17HH",
"real_name": "Pablo Rodriguez",
"name": "pablo.rodriguez",
"color": "e7392d",
"image_24": "https://avatars.slack-edge.com/2018-11-05/471430932000_1b72cdf2e2946503703f_24.png",
"image_32": "https://avatars.slack-edge.com/2018-11-05/471430932000_1b72cdf2e2946503703f_32.png",
"image_48": "https://avatars.slack-edge.com/2018-11-05/471430932000_1b72cdf2e2946503703f_48.png",
"image_72": "https://avatars.slack-edge.com/2018-11-05/471430932000_1b72cdf2e2946503703f_72.png",
"image_192": "https://avatars.slack-edge.com/2018-11-05/471430932000_1b72cdf2e2946503703f_192.png",
"image_512": "https://avatars.slack-edge.com/2018-11-05/471430932000_1b72cdf2e2946503703f_512.png"
}
]
/reports Edit
Get Reports
Parameters
- fromDate
- From date Format DD/MM/YYYY (Default first day of the current the month)
- toDate
- To date Format DD/MM/YYYY (Default last day of the current the month)
- page
- Number of the page (Default 1)
- limit
- Limit per page (Default 15, Max. 100)
- sort
- Order by createdAt (Default -1, Values 1 or -1)
- label (Optional)
- Filter by the label of the report
Returns a list of reports
const request = require('request');
const options = {
uri: 'https://admin.gomoodly.com/api-go-moodly/reports',
method: 'GET',
token: 'YOUR_APP_KEY',
fromDate: '01/01/2019',
toDate: '31/01/2019',
page: 3,
limit: 10,
sort: 1
};
request(options, (error, response, body) => {
if (!error && response.statusCode == 200) {
console.log(body);
}
});
curl 'https://admin.gomoodly.com/api-go-moodly/reports?token=YOUR_APP_KEY&fromDate=21/03/1999&toDate=22/02/2019&limit=20&sort=1'
{
"docs": [
{
"team": {
"id": "TDVALS751",
"domain": "gomoodly"
},
"user": {
"id": "UDVAN4QDR",
"name": "ramon.pena.rodriguez"
},
"_id": "5c6b00289e2b6d22c6450c93",
"mood": 7.5,
"body": {
"yesterday": "tupi",
"today": "nuki",
"obstacles": "cauchi",
"interest": null
},
"createdAt": "2019-02-18T18:57:44.504Z",
"updatedAt": "2019-02-18T18:57:44.504Z",
"__v": 0
},
{
"team": {
"id": "TDVALS751",
"domain": "gomoodly"
},
"user": {
"id": "UDVAN4QDR",
"name": "ramon.pena.rodriguez"
},
"_id": "5c6afc858410cb21c851e873",
"mood": 5,
"body": {
"yesterday": "tupies",
"today": "today",
"obstacles": "obst",
"interest": "no"
},
"createdAt": "2019-02-18T18:42:13.481Z",
"updatedAt": "2019-02-18T18:42:13.481Z",
"__v": 0
},
{
"team": {
"id": "TDVALS751",
"domain": "gomoodly"
},
"user": {
"id": "UDVAN4QDR",
"name": "ramon.pena.rodriguez"
},
"_id": "5c66df793f0aa31d70de36c2",
"mood": 3,
"body": {
"yesterday": "meme",
"today": "ddje",
"obstacles": "eje",
"interest": null
},
"createdAt": "2019-02-15T15:49:13.724Z",
"updatedAt": "2019-02-15T15:49:13.724Z",
"__v": 0
}
],
"totalDocs": 3,
"limit": 20,
"hasPrevPage": false,
"hasNextPage": false,
"page": 1,
"totalPages": 1,
"pagingCounter": 1,
"prevPage": null,
"nextPage": null
}
{
"error": true,
"message": "Book doesn't exist"
}