(No one else wrote anything up about it so I just went through the source code to figure out the API myself)
All requests to the API are sent to this path:
[Server URL]/api/v1/
Looking through the code, the only version of the API that appears is v1, so I'm assuming this is the only version the API actually supports. Perhaps it was developed this way so that revisions to the API could be made in the future.
GET /statistics
Returns a JSON with various pieces of information about the lighthouse instance in question, such as the playercount, the number of published levels, the number of registered users, the total number of "Team Picks" levels, and the number of photos uploaded.
Field | Type | Description |
---|---|---|
recentMatches | integer | The number of concurrent players on the Lighthouse instance |
slots | integer | The number of published levels on an instance, including hidden levels for some reason |
users | integer | The total number of users registered on an instance |
teamPicks | integer | The number of total "Team Picks" levels on an instance |
photos | integer | The total number of photos uploaded to an instance |
GET /playerCount
Returns a JSON with information regarding the concurrent player count of an instance. The JSON includes both the total player count for the instance, and a breakdown of which games players are playing.
Field | Type | Description |
---|---|---|
totalPlayerCount | integer | The total number of concurrent players on the Lighthouse instance |
games | array | An array containing 5 items that show the number of players in each LBP game |
Field | Type | Description |
---|---|---|
game | string | The game being played. Possible values are "LittleBigPlanet1", "LittleBigPlanet2", "LittleBigPlanet3", "LittleBigPlanetVita", and "LittleBigPlanetPSP" |
playerCount | integer | The concurrent playercount of the game in question |
GET /slots
Returns an array of JSONs that give basic info about levels on the Lighthouse instance, going in order of newest uploaded. Does not show hidden levels. Also takes URL parameters that let you skip through the list, or specify how many entries should be shown (the hard maximum being 20 levels)
Parameter | Type | Description |
---|---|---|
skip | integer | Skip through the level list by X amount of entries |
limit | integer | Limits how many levels this endpoint returns. The hard limit for this is 20, and setting the number to anything higher will still just result in 20 levels. |
Note: This object returns a few more items than are actually listed here, and the reason for that is because they do absolutely nothing and always return as either null or as 0.
Field | Type | Description |
---|---|---|
slotId | integer | The ID of the level in question. |
internalSlotId | integer | I think this has something to do with developer slots according to me looking at the source code, but i could be completely wrong about this |
name | string | The name of the level in question |
iconHash | string | The hash for the level icon. Using this hash, the level icon can be accessed by going to [Lighthouse URL]/gameAssets/[hash]. Hashes that start with the letter "g" and/or are 6 characters long means that an icon was not assinged to the level. (ex. g12345) |
location | JSON | The location of the level on a player's Earth. The JSON is formatted as follows: {x: 12345, y: 45678} |
initiallyLocked | boolean | Specifies whether or not the level is locked behind a level key |
subLevel | boolean | I think this means whether or not a level is only accessible via level link, but don't quote me on that |
lbp1Only | boolean | Wheter or not an LBP1 level can't be played in other games. Only Applies to levels made in LBP1. |
shareable | integer | Wheter or not a level can be copied. Possible values are 0 for no, and 1 for yes |
moveRequired | boolean | Whether or not a move controller is needed to play a level |
firstUploaded | integer | The UNIX timestamp of when the level was uploaded |
lastUpdated | integer | The UNIX timestamp of when the level was last updated |
teamPick | boolean | Whether or not the level is labelled as a "team pick" |
gameVersion | integer | Specifies which game the level was made in, with 0 meaning LBP1, 1 meaning LBP2, 2 meaning LBP3, 3 meaning LBP Vita, and 4 meaning LBP PSP |
plays | integer | The number of plays the level has |
playsUnique | integer | The number of unique players that have played the level |
playsComplete | integer | The number of times players have completed the level |
averageRating | integer | The average star rating level. Defaults to 3. Only applicable for LBP1 levels. |
GET /slot/[Slot ID]
Returns more detailed information about one individual level, which is specified in the URL.
Field | Type | Description |
---|---|---|
slotId | integer | The ID of the level in question. You already specify this in the URL, so I'm not sure why this is here. |
internalSlotId | integer | I think this has something to do with developer slots according to me looking at the source code, but i could be completely wrong about this |
name | string | The name of the level in question |
description | string | The level description |
iconHash | string | The hash for the level icon. Using this hash, the level icon can be accessed by going to [Lighthouse URL]/gameAssets/[hash]. Hashes that start with the letter "g" and/or are 6 characters long means that an icon was not assinged to the level. (ex. g12345) |
location | JSON | The location of the level on a player's Earth. The JSON is formatted as follows: {x: 12345, y: 45678} |
creatorId | integer | The ID of the level creator |
initiallyLocked | boolean | Specifies whether or not the level is locked behind a level key |
subLevel | boolean | I think this means whether or not a level is only accessible via level link, but don't quote me on that |
lbp1Only | boolean | Wheter or not an LBP1 level can't be played in other games. Only Applies to levels made in LBP1. |
shareable | integer | Wheter or not a level can be copied. Possible values are 0 for no, and 1 for yes |
authorLabels | string | Lists the labels the level author has given the level. Each label is seperated by a single comma (,). A list of possible labels will be written at some point cus I can't be bothered right now |
levelTags | array | An array of all of the player-given tags a level has. |
minimumPlayers | integer | The specified reccomended minimum of players for a level. |
maximumPlayers | integer | The specified maximum of players for a level. |
moveRequired | boolean | Whether or not a move controller is needed to play a level |
firstUploaded | integer | The UNIX timestamp of when the level was uploaded |
lastUpdated | integer | The UNIX timestamp of when the level was last updated |
teamPick | boolean | Whether or not the level is labelled as a "team pick" |
gameVersion | integer | Specifies which game the level was made in, with 0 meaning LBP1, 1 meaning LBP2, 2 meaning LBP3, 3 meaning LBP Vita, and 4 meaning LBP PSP |
plays | integer | The number of plays the level has |
playsUnique | integer | The number of unique players that have played the level |
playsComplete | integer | The number of times players have completed the level |
averageRating | integer | The average star rating level. Defaults to 3. Only applicable for LBP1 levels. |
levelType | string | gives info on the type of level a level is. Usually blank, but can have something like "versus" in it. Need to look into this a bit more. |
GET /user/[User ID]
GET /username/[User's ingame name]
Returns information about a user. This endpoint essentially has two different ways of accessing it with each method returning an identical reponse.
GET /search/user?query=[Search query]
There's also a slightly different third way to access this endpoint, only this method returns an array of results rather than just one.
Field | Type | Description |
---|---|---|
userId | integer | The ID of the user in question |
username | string | The name of the user in question |
emailAddressVerified | boolean | Whether or not the user has a verified email |
iconHash | string | The hash for the user's profile picture. Using this hash, the profile picture can be accessed by going to [Lighthouse URL]/gameAssets/[hash]. Hashes that start with the letter "g" and/or are 6 characters long means that an icon was not assinged to that user, somehow. (ex. g12345) |
biography | string | The text that the user set their bio to. |
location | JSON | The location of the players profile badge on their Earth. The JSON is formatted as follows: {x: 12345, y: 45678} |
yayHash | string | Similar to the iconHash, but instead gives the hash for an image of how the users in-game head looks on a positive review |
mehHash | string | Same as above, except the player has a neutral expression |
mehHash | string | Same as above, except the player has a frowning expression |
lastLogin | string | The UNIX timestamp of when the user has last logged into a game |
lastLogout | string | The UNIX timestamp of when the user has last logged out of a game |
levelVisibility | integer | Unimplemented feature that has to do with privacy settings for whether or not your levels show up on the website. My guess is that 2 means public, 1 means only friends can see it, and 0 means your levels are only visible ingame. |
profileVisibility | integer | Same as above, but with your profile instead of levels I think |
commentsEnabled | boolean | Whether or not comments are enabled |
GET /user/[User ID]/status
Returns information about a user's online status.
Field | Type | Description |
---|---|---|
working on it | working on it | working on it |