Are you really sure you want to delete this course?
API Key
What is the API Key used for?
The API Key is used to identify which client wants to use the API. Some API calls require identification of the client, some do not.
Where can I find my API Key?
Just go to your profile and select "Show API Key".
I am a developer and want to use the API. What must I do?
To use functions of the API that do not require an API Key, you don't have to do anything. If your application should use API calls that require user identification like starring/completing courses, you have to prompt the user of your application to input his API Key in your application. This API Key should only be visible to the client.
How can I download courses?
First find out the ID of the course that you want to download by doing an API call. Then open the URL
http://smmdb.ddns.net/courses/<course-id>
What is the thumbnail URL?
Images are either jpeg or png.
http://smmdb.ddns.net/img/courses/thumbnails/<course-id>.pic
Making an API Call
Make a HTTP GET request of the form
http://smmdb.ddns.net/api/<request>?<option1>=<value1>&<option2>=<value2>...
or make a HTTP POST request to
http://smmdb.ddns.net/api
and include "request": <request>, options and values inside HTTP header.
Available API Calls
Request:
getcourses
Protocol:
HTTP GET
Description:
Receives filter and order data. Returns matching courses as JSON.
Options / Values / Description (default values are red):
apikey <api-key> (optional) used for user identification
order lastmodified | uploaded | title | stars | downloads | completed Changes the "order" argument in the response
dir asc | desc Changes the "order" argument in the response. Direction of ordering (ascending or descending)
ispackage 0 | 1 Show single courses or packages. 0=No; 1=Yes
lastmodifiedfrom <unix timestamp in seconds from Jan 01 1970 (UTC)> Only receive courses with specific time of last modification
lastmodifiedto <unix timestamp in seconds from Jan 01 1970 (UTC)> Only receive courses with specific time of last modification
uploadedfrom <unix timestamp in seconds from Jan 01 1970 (UTC)> Only receive courses with specific time of upload
uploadedto <unix timestamp in seconds from Jan 01 1970 (UTC)> Only receive courses with specific time of upload
coursetype 0 | 1 | 2 Filter for specific course type. 0=Own Creation; 1=Recreation; 2=Wii U Dump
title <partial or full title of upload> Filter for specific title. Can be a substring. Not case sensitive
owner <full username of uploader> Filter for specific uploader. Must contain full name. Not case sensitive
leveltype 0 | 1 | 2 | 3 | 4 Filter for specific level type. 0=NSMBU; 1=SMW; 2=SMB3; 3=SMB; 4=Mixed
difficultyfrom 0 | 1 | 2 | 3 | 4 Filter for specific difficulty. 0=Easy; 1=Normal; 2=Expert; 3=Super Expert; 4=Mixed
difficultyto 0 | 1 | 2 | 3 | 4 Filter for specific difficulty. 0=Easy; 1=Normal; 2=Expert; 3=Super Expert; 4=Mixed
updatereq 0 | 1 Should SMM be updated to run the course. 0=No; 1=Yes
hasthumbnail 0 | 1 Should the course contain an ingame thumbnail. 0=No; 1=Yes
Response:
{
  "courses": {
    "<course-id>": {
      "id": <course-id>,
      "title": <course-title>,
      "owner": <owner-id>,
      "coursetype": <course-type (0=own creation, 1=recreation, 2=dump)>,
      "nintendoid": <original Nintendo ID if recreation or dump>,
      "leveltype": <level-type (0=NSMBU, 1=SMW, 2=SMB3, 3=SMB, 4=Mixed)>,
      "difficulty": <difficulty (0=Easy, 1=Normal, 2=Expert, 3=Super Expert, 4=Mixed)>,
      "updatereq": <update requirement (0=No, 1=Yes)>,
      "hasthumbnail": <ingame thumbnail availability (0=No, 1=Yes)>,
      "hasimage": <website thumbnail availabilty (0=No, 1=Yes)>,
      "ispackage": <is upload a single course or package (0=No, 1=Yes)>,
      "downloadpath": internally used so ignore this one,
      "videoid": <youtube video id>,
      "lastmodified": <unix timestamp in seconds of last modification>,
      "uploaded": <unix timestamp in seconds of upload date/time>,
      "completed": <amount of completions>,
      "downloads": <amount of downloads>,
      "stars": <amount of stars>,
      "completedself": <api key required. has user with api key completed this course (0=No, 1=Yes)>,
      "starredself": <api key required. has user with api key starred this course (0=No, 1=Yes)>,
      "ownername": <owner-name>,
      "points": <owner-reputation>,
      "originalauthor": <original author name if recreation or dump>,
      "originalauthorurl": <SMM bookmarks link to original author>,
      "originalauthormii": <link to original author's mii image>,
      "clearrate": <wii u clear rate in %>,
      "likedcount": <wii u stars>,
      "triedcount": <wii u tries>
    },
    "<course-id>": {
      ...
    }, ...
  },
  "order": [array of course ids in demanded order]
}

or
{
  "err": <error message>
}
Example:
HTTP GET to
http://smmdb.ddns.net/api/getcourses?order=stars&dir=desc&coursetype=0&difficultyfrom=2&difficultyto=2
Receive courses in descending star order that are own creations and have difficulty "expert".




Request: NEEDS TESTING
uploadcourse
Protocol:
HTTP POST
Description:
Used for uploading new courses
Options / Values / Description (default values are red):
apikey <api-key> (required) used for user identification
Response:
{
  "course": {
    "id": <course-id>,
    "title": <course-title>,
    "owner": <owner-id>,
    "coursetype": <course-type (0=own creation, 1=recreation, 2=dump)>,
    "nintendoid": <original Nintendo ID if recreation or dump>,
    "hasimage": <website thumbnail availabilty (0=No, 1=Yes)>,
    "ispackage": <is upload a single course or package (0=No, 1=Yes)>,
    "downloadpath": internally used so ignore this one,
    "uploaded": <unix timestamp in seconds of upload date/time>,
    "lastmodified": <unix timestamp in seconds of last modification>,
    "completed": <amount of completions>,
    "downloads": <amount of downloads>,
    "stars": <amount of stars>,
    "ownername": <owner-name>,
    "points": <owner-reputation>,
  }
}

or
{
  "err": <error message>
}
Example:
HTTP POST to
http://smmdb.ddns.net/api
containing your compressed file data (MIME type "zip-compressed" or "octet-stream") with header data
{
  "request": uploadcourse,
  "apikey": <api-key>
}




Request:
starcourse
Protocol:
HTTP GET
Description:
Used for starring and unstarring courses
Options / Values / Description (default values are red):
apikey <api-key> (required) used for user identification
dostar 0 | 1 Should course be starred or unstarred (0=unstar, 1=star)
courseid <course id> Course ID to star/unstar
Response:
{
  "user": <user-id>,
  "username": <user-name>,
  "owner": <owner-id>,
  "ownername": <owner-name>,
  "points": <owner-reputation>,
  "courseid": <course-id>,
  "starredself": <has user starred this course (0=No, 1=Yes)>,
}

or
{
  "err": <error message>
}
Example:
HTTP GET to
http://smmdb.ddns.net/api/starcourse?apikey=<api-key>&dostar=1&courseid=42
Star course with Course ID 42.




Request:
completecourse
Protocol:
HTTP GET
Description:
Used for completing and uncompleting courses
Options / Values / Description (default values are red):
apikey <api-key> (required) used for user identification
docomplete 0 | 1 Should course be completed or uncompleted (0=uncomplete, 1=complete)
courseid <course id> Course ID to star/unstar
Response:
{
  "user": <user-id>,
  "username": <user-name>,
  "owner": <owner-id>,
  "ownername": <owner-name>,
  "points": <owner-reputation>,
  "courseid": <course-id>,
  "completedself": <has user completed this course (0=No, 1=Yes)>,
}

or
{
  "err": <error message>
}
Example:
HTTP GET to
http://smmdb.ddns.net/api/completecourse?apikey=<api-key>&docomplete=1&courseid=42
Complete course with Course ID 42.