API Documentation

All example results are live, if you'd like to see an example of how to call these APIs this page is a sample.

OAuth2 API Documentation
URL: http://xim.schucreations.com/api/login
Method: POST
Description: Logs the user in returning an access_token and a refresh_token.
Basic Auth:
Authorization: Basic client:client_secret
Parameters:
username (required): The username that you are logging in as.
password (required): The user's password.
Example URL: http://xim.schucreations.com/api/login
Example Result:

{"access_token":"7c3dbc760dc417264425a1500f4fef6c69731866","expires_in":30,"token_type":"Bearer","scope":null,"refresh_token":"34502c16569c08d224c5435f3ccdf5efff7d3885"}
                        

URL: http://xim.schucreations.com/api/refresh
Method: POST
Description: Gets a new access_token if the token has expired.
Parameters:
refresh_token (required): The refresh_token you received from logging the user in.
Example URL: http://xim.schucreations.com/api/refresh
Example Result:

{"access_token":"0bc673d478eff1fec78d83e5a2b9840b674b589f","expires_in":30,"token_type":"Bearer","scope":null}
                        
User API Documentation
URL: http://xim.schucreations.com/api/users
Method: GET
Description: A list of all users
Example Result:

                        

URL: http://xim.schucreations.com/api/users/:name
Method: GET
Description: Returns the user with the specified name
Example Result:

                                    

URL: http://xim.schucreations.com/api/users/search/:query
Method: GET
Description: Searches for users with the given query
Example Result:

                                    
Devices API Documentation
URL: http://xim.schucreations.com/api/devices
Method: GET
Description: Returns all devices
Example Result:

                                    
Games API Documentation
URL: http://xim.schucreations.com/api/games
Method: GET
Description: Returns all games
Example Result:

                                    
Systems API Documentation
URL: http://xim.schucreations.com/api/systems
Method: GET
Description: Returns all systems
Example Result:

                                    
Configuration API Documentation
URL: http://xim.schucreations.com/api/configurations
Method: GET
Parameters:
count (optional): The number of results to return. default = 50, range = 1 - 50
page (optional): The page to return, allowing for pagination. default = 1
Description: Returns all configurations
Example Result:

                                    

URL: http://xim.schucreations.com/api/configurations/device/:device
Method: GET
Description: Returns all configurations for the specified Device, get device from the Devices API.
Example Result:

                                    

URL: http://xim.schucreations.com/api/configurations/user/:user
Method: GET
Description: Returns all configurations for the specified user
Example Result:

                                    

URL: http://xim.schucreations.com/api/configurations
Method: POST
Description: Creates a new configuration as the logged in user.
Parameters:
access_token (required): The access_token that you got using the OAuth2 API methods.
device (required): The configuration's device. Example: XIM 4
value (required): The configuration's value. Example: {'HIP': 'test, 'ADS': 'test'}
system (optional): The configuration's system. Example: Xbox One/PS3
game (optional): The configuration's game. Example: Battlefield 3
Example URL: http://xim.schucreations.com/api/configuration
Example Result:

{"success":true,"configuration_id":"52","user":"abc123"}
                        

URL: http://xim.schucreations.com/api/configurations/favorite/:id
Method: POST
Description: Favorites a configuration as the logged in user.
Parameters:
access_token (required): The access_token that you got using the OAuth2 API methods.
Example URL: http://xim.schucreations.com/api/configuration/favorite/10
Example Result:

{"success":true,"user":"abc123"}