Show / Hide Table of Contents

    SUGAR Engine REST API

    Account

    ApiAccountCreatePost

    Register a new account and creates an associated user. Requires the PlayGen.SUGAR.Contracts.AccountRequest.Name to be unique. Returns a JsonWebToken used for authorization in any further calls to the API.

    Example Usage: POST api/account/create

    Request
    POST /api/Account/create
    Parameters
    Name Type Value Notes
    accountRequest

    PlayGen.SUGAR.Contracts.AccountRequest object that contains the details of the new Account.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAccountByIdDelete

    Delete Account with the ID provided.

    Example Usage: DELETE api/account/1

    Request
    DELETE /api/Account/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Account ID.

    Responses
    Status Code Description Samples
    200

    Success

    AccountSource

    ApiAccountSourceListGet

    Get a list of all AccountSources.

    Example Usage: GET api/accountSource/list

    Request
    GET /api/AccountSource/list
    Responses
    Status Code Description Samples
    200

    Success

    ApiAccountSourceFindbyidByIdGet

    Get AccountSource that matches provided.

    Example Usage: GET api/accountSource/findbyid/1

    Request
    GET /api/AccountSource/findbyid/{id}
    Parameters
    Name Type Value Notes
    *id integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiAccountSourcePost

    Create a new AccountSource. Requires the PlayGen.SUGAR.Contracts.AccountSourceRequest.Token to be unique.

    Example Usage: POST api/accountSource

    Request
    POST /api/AccountSource
    Parameters
    Name Type Value Notes
    newAccountSource

    PlayGen.SUGAR.Contracts.AccountSourceRequest object that contains the details of the new AccountSource.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAccountSourceUpdateByIdPut

    Update an existing AccountSource.

    Example Usage: PUT api/accountSource/update/1

    Request
    PUT /api/AccountSource/update/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Id of the existing AccountSource.

    accountSource

    PlayGen.SUGAR.Contracts.AccountSourceRequest object that holds the details of the AccountSource.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAccountSourceByIdDelete

    Delete AccountSource with the ID provided.

    Example Usage: DELETE api/accountSource/1

    Request
    DELETE /api/AccountSource/{id}
    Parameters
    Name Type Value Notes
    *id integer

    AccountSource ID.

    Responses
    Status Code Description Samples
    200

    Success

    Achievements

    ApiAchievementsFindByTokenByGameIdGet

    Find an Achievement that matches and .

    Example Usage: GET api/achievements/find/ACHIEVEMENT_TOKEN/1

    Request
    GET /api/Achievements/find/{token}/{gameId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Achievement

    *gameId integer

    ID of the Game the Achievement is for

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsFindByTokenGlobalGet

    Find an Achievement that matches and .

    Example Usage: GET api/achievements/find/ACHIEVEMENT_TOKEN/1

    Request
    GET /api/Achievements/find/{token}/global
    Parameters
    Name Type Value Notes
    *token string

    Token of Achievement

    *gameId integer

    ID of the Game the Achievement is for

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsGlobalListGet

    Find a list of Achievements that match . If global is provided instead of a gameId, get all global achievements, ie. achievements that are not associated with a specific game.

    Example Usage: GET api/achievements/game/1/list

    Request
    GET /api/Achievements/global/list
    Parameters
    Name Type Value Notes
    *gameId integer

    Game ID

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsGameByGameIdListGet

    Find a list of Achievements that match . If global is provided instead of a gameId, get all global achievements, ie. achievements that are not associated with a specific game.

    Example Usage: GET api/achievements/game/1/list

    Request
    GET /api/Achievements/game/{gameId}/list
    Parameters
    Name Type Value Notes
    *gameId integer

    Game ID

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsGameByGameIdEvaluateByActorIdGet

    Find the current progress for all achievements for a for .

    Example Usage: GET api/achievements/game/1/evaluate/1

    Request
    GET /api/Achievements/game/{gameId}/evaluate/{actorId}
    Parameters
    Name Type Value Notes
    *gameId integer

    ID of Game

    *actorId integer

    ID of Group/User

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsGlobalEvaluateByActorIdGet

    Find the current progress for all achievements for a for .

    Example Usage: GET api/achievements/game/1/evaluate/1

    Request
    GET /api/Achievements/global/evaluate/{actorId}
    Parameters
    Name Type Value Notes
    *gameId integer

    ID of Game

    *actorId integer

    ID of Group/User

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsByTokenByGameIdEvaluateByActorIdGet

    Find the current progress for an Achievement for .

    Example Usage: GET api/achievements/ACHIEVEMENT_TOKEN/1/evaluate/1

    Request
    GET /api/Achievements/{token}/{gameId}/evaluate/{actorId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Achievement

    *gameId integer

    ID of the Game the Achievement is for

    *actorId integer

    ID of Group/User

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsByTokenGlobalEvaluateByActorIdGet

    Find the current progress for an Achievement for .

    Example Usage: GET api/achievements/ACHIEVEMENT_TOKEN/1/evaluate/1

    Request
    GET /api/Achievements/{token}/global/evaluate/{actorId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Achievement

    *gameId integer

    ID of the Game the Achievement is for

    *actorId integer

    ID of Group/User

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsCreatePost

    Create a new Achievement. Requires PlayGen.SUGAR.Contracts.EvaluationCreateRequest.Name to be unique to that PlayGen.SUGAR.Contracts.EvaluationCreateRequest.GameId.

    Example Usage: POST api/achievements/create

    Request
    POST /api/Achievements/create
    Parameters
    Name Type Value Notes
    newAchievement

    PlayGen.SUGAR.Contracts.EvaluationCreateRequest object that holds the details of the new Achievement.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsUpdatePut

    Update an existing Achievement.

    Example Usage: PUT api/achievements/update

    Request
    PUT /api/Achievements/update
    Parameters
    Name Type Value Notes
    achievement

    PlayGen.SUGAR.Contracts.EvaluationCreateRequest object that holds the details of the Achievement.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsByTokenGlobalDelete

    Delete Achievement with the and provided.

    Example Usage: DELETE api/achievements/ACHIEVEMENT_TOKEN/1

    Request
    DELETE /api/Achievements/{token}/global
    Parameters
    Name Type Value Notes
    *token string

    Token of Achievement

    *gameId integer

    ID of the Game the Achievement is for

    Responses
    Status Code Description Samples
    200

    Success

    ApiAchievementsByTokenByGameIdDelete

    Delete Achievement with the and provided.

    Example Usage: DELETE api/achievements/ACHIEVEMENT_TOKEN/1

    Request
    DELETE /api/Achievements/{token}/{gameId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Achievement

    *gameId integer

    ID of the Game the Achievement is for

    Responses
    Status Code Description Samples
    200

    Success

    ActorClaim

    ApiActorClaimClaimByClaimIdEntityByEntityIdGet

    Get a list of all Actors for this Claim and Entity.

    Example Usage: GET api/actorclaim/claim/1/entity/1

    Request
    GET /api/ActorClaim/claim/{claimId}/entity/{entityId}
    Parameters
    Name Type Value Notes
    *claimId integer
    *entityId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiActorClaimActorByIdGet

    Get a list of all Claims for this Actor.

    Example Usage: GET api/actorclaim/actor/1/

    Request
    GET /api/ActorClaim/actor/{id}
    Parameters
    Name Type Value Notes
    *id integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiActorClaimPost

    Create a new ActorClaim.

    Example Usage: POST api/actorclaim

    Request
    POST /api/ActorClaim
    Parameters
    Name Type Value Notes
    newClaim

    PlayGen.SUGAR.Contracts.ActorClaimRequest object that contains the details of the new ActorClaim.

    Responses
    Status Code Description Samples
    200

    Success

    ApiActorClaimByIdDelete

    Delete ActorClaim with the ID provided.

    Example Usage: DELETE api/actorclaim/1

    Request
    DELETE /api/ActorClaim/{id}
    Parameters
    Name Type Value Notes
    *id integer

    ActorClaim ID.

    Responses
    Status Code Description Samples
    200

    Success

    ActorData

    ApiActorDataGet

    Find a list of all ActorData that match the , and provided.

    Example Usage: GET api/actordata?actorId=1&gameId=1&key=key1&key=key2

    Request
    GET /api/ActorData[?actorId&gameId&key]
    Parameters
    Name Type Value Notes
    actorId integer

    ID of a User/Group.

    gameId integer

    ID of a Game.

    key array

    Array of Key names.

    Responses
    Status Code Description Samples
    200

    Success

    ApiActorDataPost

    Create a new ActorData record.

    Example Usage: POST api/actordata

    Request
    POST /api/ActorData
    Parameters
    Name Type Value Notes
    newData

    PlayGen.SUGAR.Contracts.EvaluationDataRequest object that holds the details of the new ActorData.

    Responses
    Status Code Description Samples
    200

    Success

    ActorRole

    ApiActorRoleRoleByRoleIdEntityByEntityIdGet

    Get a list of all Actors for this Role and Entity.

    Example Usage: GET api/actorrole/role/1/entity/1

    Request
    GET /api/ActorRole/role/{roleId}/entity/{entityId}
    Parameters
    Name Type Value Notes
    *roleId integer
    *entityId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiActorRoleActorByActorIdEntityByEntityIdClaimscopeByScopeNameGet

    Get a list of all Roles for this Actor, ClaimScope and Entity.

    Example Usage: GET api/actorrole/actor/1/entity/1/claimscope/game

    Request
    GET /api/ActorRole/actor/{actorId}/entity/{entityId}/claimscope/{scopeName}
    Parameters
    Name Type Value Notes
    *actorId integer
    *entityId integer
    *scopeName string
    Responses
    Status Code Description Samples
    200

    Success

    ApiActorRoleControlledGet

    Get a list of all Roles this Actor has control over.

    Example Usage: GET api/actorrole/controlled

    Request
    GET /api/ActorRole/controlled
    Responses
    Status Code Description Samples
    200

    Success

    ApiActorRolePost

    Create a new ActorRole.

    Example Usage: POST api/actorrole

    Request
    POST /api/ActorRole
    Parameters
    Name Type Value Notes
    newRole

    PlayGen.SUGAR.Contracts.ActorRoleRequest object that contains the details of the new ActorRole.

    Responses
    Status Code Description Samples
    200

    Success

    ApiActorRoleByIdDelete

    Delete ActorRole with the ID provided.

    Example Usage: DELETE api/actorrole/1

    Request
    DELETE /api/ActorRole/{id}
    Parameters
    Name Type Value Notes
    *id integer

    ActorRole ID.

    Responses
    Status Code Description Samples
    200

    Success

    Alliance

    ApiAllianceRequestsByGroupIdGet

    Get a list of all groups that have relationship requests for this .

    Example Usage: GET api/alliance/requests/1

    Request
    GET /api/Alliance/requests/{groupId}
    Parameters
    Name Type Value Notes
    *groupId integer

    ID of the group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAllianceSentrequestsByGroupIdGet

    Get a list of all Groups that have been sent relationship requests for this .

    Example Usage: GET api/alliance/sentrequests/1

    Request
    GET /api/Alliance/sentrequests/{groupId}
    Parameters
    Name Type Value Notes
    *groupId integer

    ID of the group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAllianceByGroupIdGet

    Get a list of all groups that have relationships with this .

    Example Usage: GET api/alliance/1

    Request
    GET /api/Alliance/{groupId}
    Parameters
    Name Type Value Notes
    *groupId integer

    ID of the group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAllianceCountByGroupIdGet

    Get a count of groups that have a relationship with this .

    Example Usage: GET api/alliances/count/1

    Request
    GET /api/Alliance/count/{groupId}
    Parameters
    Name Type Value Notes
    *groupId integer

    ID of the group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAlliancePut

    Update an existing relationship between and . Requires the relationship to already exist between the User and Group.

    Example Usage: PUT api/alliance

    Request
    PUT /api/Alliance
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipStatusUpdate object that holds the details of the relationship.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAlliancePost

    Create a new relationship request between a Group and Group. Requires a relationship between the User and Group to not already exist.

    Example Usage: POST api/alliance

    Request
    POST /api/Alliance
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipRequest object that holds the details of the new relationship request.

    Responses
    Status Code Description Samples
    200

    Success

    ApiAllianceRequestPut

    Update an existing relationship request between and . Requires the relationship request to already exist between a Group and Group.

    Example Usage: PUT api/alliancer/request

    Request
    PUT /api/Alliance/request
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipStatusUpdate object that holds the details of the relationship.

    Responses
    Status Code Description Samples
    200

    Success

    Game

    ApiGameListGet

    Get a list of all Games.

    Example Usage: GET api/game/list

    Request
    GET /api/Game/list
    Responses
    Status Code Description Samples
    200

    Success

    ApiGameControlledGet

    Get a list of all Games this Actor has control over.

    Example Usage: GET api/game/controlled

    Request
    GET /api/Game/controlled
    Responses
    Status Code Description Samples
    200

    Success

    ApiGameFindByNameGet

    Get a list of Games that match provided.

    Example Usage: GET api/game/find/game1

    Request
    GET /api/Game/find/{name}
    Parameters
    Name Type Value Notes
    *name string

    Game name

    Responses
    Status Code Description Samples
    200

    Success

    ApiGameFindbyidByIdGet

    Get Game that matches provided.

    Example Usage: GET api/game/findbyid/1

    Request
    GET /api/Game/findbyid/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Game id

    Responses
    Status Code Description Samples
    200

    Success

    ApiGamePost

    Create a new Game. Requires the PlayGen.SUGAR.Contracts.GameRequest.Name to be unique.

    Example Usage: POST api/game

    Request
    POST /api/Game
    Parameters
    Name Type Value Notes
    newGame

    PlayGen.SUGAR.Contracts.GameRequest object that contains the details of the new Game.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGameUpdateByIdPut

    Update an existing Game.

    Example Usage: PUT api/game/update/1

    Request
    PUT /api/Game/update/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Id of the existing Game.

    game

    PlayGen.SUGAR.Contracts.GameRequest object that holds the details of the Game.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGameByIdDelete

    Delete Game with the ID provided.

    Example Usage: DELETE api/game/1

    Request
    DELETE /api/Game/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Game ID.

    Responses
    Status Code Description Samples
    200

    Success

    GameData

    ApiGameDataGet

    Find a list of all GameData that match the , and provided.

    Example Usage: GET api/gamedata?actorId=1&gameId=1&key=key1&key=key2

    Request
    GET /api/GameData[?actorId&gameId&key]
    Parameters
    Name Type Value Notes
    actorId integer

    ID of a User/Group.

    gameId integer

    ID of a Game.

    key array

    Array of Key names.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGameDataPost

    Create a new GameData record.

    Example Usage: POST api/gamedata

    Request
    POST /api/GameData
    Parameters
    Name Type Value Notes
    newData

    PlayGen.SUGAR.Contracts.EvaluationDataRequest object that holds the details of the new GameData.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGameDataGameactorsByIdGet

    Find a list of all Actors that have data saved for the game provided.

    Example Usage: GET api/gamedata/gameactors/1

    Request
    GET /api/GameData/gameactors/{id}
    Parameters
    Name Type Value Notes
    *id integer

    ID of a Game.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGameDataGamekeysByIdGet

    Find a list of all GameData keys for the provided.

    Example Usage: GET api/gamedata/gamekeys/1

    Request
    GET /api/GameData/gamekeys/{id}
    Parameters
    Name Type Value Notes
    *id integer

    ID of a Game.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGameDataLeaderboardTypeByActorIdByGameIdByKeyByDataTypeBySortTypeGet

    Find GameData that matches the , , , and provided.

    Example Usage: GET api/gamedata/leaderboardType/1/1/datakey/long/highest

    Request
    GET /api/GameData/leaderboardType/{actorId}/{gameId}/{key}/{dataType}/{sortType}
    Parameters
    Name Type Value Notes
    *actorId integer

    ID of a User/Group.

    *gameId integer

    ID of a Game.

    *key string

    Array of Key names.

    *dataType string

    Data type of value

    *sortType string
    Responses
    Status Code Description Samples
    200

    Success

    Group

    ApiGroupListGet

    Get a list of all Groups.

    Example Usage: GET api/group/list

    Request
    GET /api/Group/list
    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupControlledGet

    Get a list of all Groups this Actor has control over.

    Example Usage: GET api/group/controlled

    Request
    GET /api/Group/controlled
    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupFindByNameGet

    Get a list of Groups that match provided.

    Example Usage: GET api/group/find/group1

    Request
    GET /api/Group/find/{name}
    Parameters
    Name Type Value Notes
    *name string

    Group name.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupFindbyidByIdGet

    Get Group that matches provided.

    Example Usage: GET api/group/findbyid/1

    Request
    GET /api/Group/findbyid/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Group id.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupPost

    Create a new Group. Requires the !:GroupRequest.Name to be unique for Groups.

    Example Usage: POST api/group

    Request
    POST /api/Group
    Parameters
    Name Type Value Notes
    actor

    PlayGen.SUGAR.Contracts.GroupRequest object that holds the details of the new Group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupUpdateByIdPut

    Update an existing Group.

    Example Usage: PUT api/group/update/1

    Request
    PUT /api/Group/update/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Id of the existing Group.

    group

    PlayGen.SUGAR.Contracts.GroupRequest object that holds the details of the Group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupByIdDelete

    Delete group with the provided.

    Example Usage: DELETE api/group/1

    Request
    DELETE /api/Group/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Group ID.

    Responses
    Status Code Description Samples
    200

    Success

    GroupMember

    ApiGroupMemberRequestsByGroupIdGet

    Get a list of all Users that have relationship requests for this .

    Example Usage: GET api/groupmember/requests/1

    Request
    GET /api/GroupMember/requests/{groupId}
    Parameters
    Name Type Value Notes
    *groupId integer

    ID of the group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupMemberSentrequestsByUserIdGet

    Get a list of all Groups that have been sent relationship requests for this .

    Example Usage: GET api/groupmember/sentrequests/1

    Request
    GET /api/GroupMember/sentrequests/{userId}
    Parameters
    Name Type Value Notes
    *userId integer

    ID of the user.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupMemberMembersByGroupIdGet

    Get a list of all Users that have relationships with this .

    Example Usage: GET api/groupmember/members/1

    Request
    GET /api/GroupMember/members/{groupId}
    Parameters
    Name Type Value Notes
    *groupId integer

    ID of the group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupMemberMembercountByGroupIdGet

    Get a count of users that have a relationship with this .

    Example Usage: GET api/groupmember/membercount/1

    Request
    GET /api/GroupMember/membercount/{groupId}
    Parameters
    Name Type Value Notes
    *groupId integer

    ID of the group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupMemberUsergroupsByUserIdGet

    Get a list of all Groups that have relationships with this .

    Example Usage: GET api/groupmember/usergroups/1

    Request
    GET /api/GroupMember/usergroups/{userId}
    Parameters
    Name Type Value Notes
    *userId integer

    ID of the User.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupMemberPut

    Update an existing relationship between and . Requires the relationship to already exist between the User and Group.

    Example Usage: PUT api/groupmember

    Request
    PUT /api/GroupMember
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipStatusUpdate object that holds the details of the relationship.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupMemberPost

    Create a new relationship request between the User and Group. Requires a relationship between the User and Group to not already exist.

    Example Usage: POST api/groupmember

    Request
    POST /api/GroupMember
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipRequest object that holds the details of the new relationship request.

    Responses
    Status Code Description Samples
    200

    Success

    ApiGroupMemberRequestPut

    Update an existing relationship request between and . Requires the relationship request to already exist between the User and Group.

    Example Usage: PUT api/groupmember/request

    Request
    PUT /api/GroupMember/request
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipStatusUpdate object that holds the details of the relationship.

    Responses
    Status Code Description Samples
    200

    Success

    Leaderboards

    ApiLeaderboardsGlobalListGet

    Find a list of leaderboards that match . If global is provided instead of a gameId, get all global leaderboards, ie. leaderboards that are not associated with a specific game.

    Example Usage: GET api/leaderboards/game/1/list

    Request
    GET /api/Leaderboards/global/list
    Parameters
    Name Type Value Notes
    *gameId integer

    Game ID

    Responses
    Status Code Description Samples
    200

    Success

    ApiLeaderboardsGameByGameIdListGet

    Find a list of leaderboards that match . If global is provided instead of a gameId, get all global leaderboards, ie. leaderboards that are not associated with a specific game.

    Example Usage: GET api/leaderboards/game/1/list

    Request
    GET /api/Leaderboards/game/{gameId}/list
    Parameters
    Name Type Value Notes
    *gameId integer

    Game ID

    Responses
    Status Code Description Samples
    200

    Success

    ApiLeaderboardsByTokenGlobalGet

    Find a single leaderboard matching the token and gameId.

    Example Usage: GET api/leaderboards/LEADERBOARD_TOKEN/1

    Request
    GET /api/Leaderboards/{token}/global
    Parameters
    Name Type Value Notes
    *token string

    Token

    *gameId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiLeaderboardsByTokenGlobalDelete

    Delete Leaderboard with the and provided.

    Example Usage: DELETE api/leaderboards/LEADERBOARD_TOKEN/1

    Request
    DELETE /api/Leaderboards/{token}/global
    Parameters
    Name Type Value Notes
    *token string

    Token of Leaderboard

    *gameId integer

    ID of the Game the Leaderboard is for

    Responses
    Status Code Description Samples
    200

    Success

    ApiLeaderboardsByTokenByGameIdGet

    Find a single leaderboard matching the token and gameId.

    Example Usage: GET api/leaderboards/LEADERBOARD_TOKEN/1

    Request
    GET /api/Leaderboards/{token}/{gameId}
    Parameters
    Name Type Value Notes
    *token string

    Token

    *gameId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiLeaderboardsByTokenByGameIdDelete

    Delete Leaderboard with the and provided.

    Example Usage: DELETE api/leaderboards/LEADERBOARD_TOKEN/1

    Request
    DELETE /api/Leaderboards/{token}/{gameId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Leaderboard

    *gameId integer

    ID of the Game the Leaderboard is for

    Responses
    Status Code Description Samples
    200

    Success

    ApiLeaderboardsCreatePost

    Create a new Leaderboard. Requires PlayGen.SUGAR.Contracts.LeaderboardRequest.Name and PlayGen.SUGAR.Contracts.LeaderboardRequest.Token to be unique to that PlayGen.SUGAR.Contracts.LeaderboardRequest.GameId.

    Example Usage: POST api/leaderboards/create

    Request
    POST /api/Leaderboards/create
    Parameters
    Name Type Value Notes
    newLeaderboard

    PlayGen.SUGAR.Contracts.LeaderboardRequest object that holds the details of the new Leaderboard.

    Responses
    Status Code Description Samples
    200

    Success

    ApiLeaderboardsStandingsPost

    Get the standings for a Leaderboard using a PlayGen.SUGAR.Contracts.LeaderboardStandingsRequest.

    Example Usage: POST api/leaderboards/standings

    Request
    POST /api/Leaderboards/standings
    Parameters
    Name Type Value Notes
    leaderboardDetails

    PlayGen.SUGAR.Contracts.LeaderboardStandingsRequest object that holds the details that are wanted from the Leaderboard.

    Responses
    Status Code Description Samples
    200

    Success

    ApiLeaderboardsUpdatePut

    Update an existing Leaderboard.

    Example Usage: PUT api/leaderboards/update

    Request
    PUT /api/Leaderboards/update
    Parameters
    Name Type Value Notes
    leaderboard

    PlayGen.SUGAR.Contracts.LeaderboardRequest object that holds the details of the Leaderboard.

    Responses
    Status Code Description Samples
    200

    Success

    Match

    ApiMatchCreateByGameIdGet

    Method for admins to creates a match for a game they are not logged into.

    Example Usage: GET api/match/create/1

    Request
    GET /api/Match/create/{gameId}
    Parameters
    Name Type Value Notes
    *gameId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchCreateGet

    Method to create a match for a game a user is currently logged into

    Example Usage: GET api/match/create

    Request
    GET /api/Match/create
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchCreateandstartGet

    Method to create a match for a game a user is currently logged into which is also started automatically.

    Example Usage: GET api/match/create

    Request
    GET /api/Match/createandstart
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchByMatchIdStartGet

    Start a match for the game the user is currently logged into.

    Example Usage: GET api/match/1/start

    Request
    GET /api/Match/{matchId}/start
    Parameters
    Name Type Value Notes
    *matchId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchByMatchIdEndGet

    Ends a match for the game that the user is currently logged in for.

    Example Usage: GET api/match/1/end

    Request
    GET /api/Match/{matchId}/end
    Parameters
    Name Type Value Notes
    *matchId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchByGameIdByMatchIdEndGet

    Method for admins to end a match for a game they are not logged into.

    Example Usage: GET api/match/1/end

    Request
    GET /api/Match/{gameId}/{matchId}/end
    Parameters
    Name Type Value Notes
    *gameId integer
    *matchId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchByStartByEndGet

    Get a list of matches filtered by a time range.

    Example Usage: GET api/match/2016-12-20T15:40:30/2016-12-20T16:50:40

    Request
    GET /api/Match/{start}/{end}
    Parameters
    Name Type Value Notes
    *start string
    *end string
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchGameByGameIdGet

    Get a list of matches for a specific game.

    Example Usage: GET api/match/game/1

    Request
    GET /api/Match/game/{gameId}
    Parameters
    Name Type Value Notes
    *gameId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchGameByGameIdByStartByEndGet

    Get a list of matches for a specific game, filtered by a time range.

    Example Usage: GET api/match/game/1/2016-12-20T15:40:30/2016-12-20T16:50:40

    Request
    GET /api/Match/game/{gameId}/{start}/{end}
    Parameters
    Name Type Value Notes
    *gameId integer
    *start string
    *end string
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchCreatorByCreatorIdGet

    Get a list of matches that were created by a specific actor.

    Example Usage: GET api/match/creator/1

    Request
    GET /api/Match/creator/{creatorId}
    Parameters
    Name Type Value Notes
    *creatorId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchCreatorByCreatorIdByStartByEndGet

    Get a list of matches that were created by a specific actor, filtered by a time range.

    Example Usage: GET api/match/creator/1/2016-12-20T15:40:30/2016-12-20T16:50:40

    Request
    GET /api/Match/creator/{creatorId}/{start}/{end}
    Parameters
    Name Type Value Notes
    *creatorId integer
    *start string
    *end string
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchGameByGameIdCreatorByCreatorIdGet

    Get a list of matches for a specific game created by a specific actor.

    Example Usage: GET api/match/game/1/creator/1

    Request
    GET /api/Match/game/{gameId}/creator/{creatorId}
    Parameters
    Name Type Value Notes
    *gameId integer
    *creatorId integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchGameByGameIdCreatorByCreatorIdByStartByEndGet

    Get a list of matches for a specific game created by a specific user, filtered by a time range.

    Example Usage: GET api/match/game/1/creator/1/2016-12-20T15:40:30/2016-12-20T16:50:40

    Request
    GET /api/Match/game/{gameId}/creator/{creatorId}/{start}/{end}
    Parameters
    Name Type Value Notes
    *gameId integer
    *creatorId integer
    *start string
    *end string
    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchGet

    Find a list of all MatchData that match the input parameters.

    Example Usage: GET api/match/1/data

    Request
    GET /api/Match?matchId[&keys]
    Parameters
    Name Type Value Notes
    *matchId integer

    Id of a User/Group.

    keys array

    Array of Key names.

    Responses
    Status Code Description Samples
    200

    Success

    ApiMatchPost

    Create a new GameData record.

    Example Usage: POST api/match/1/data

    Request
    POST /api/Match
    Parameters
    Name Type Value Notes
    newData

    PlayGen.SUGAR.Contracts.EvaluationDataRequest object that holds the details of the new Match Data.

    Responses
    Status Code Description Samples
    200

    Success

    Resource

    ApiResourceGet

    Find a list of all Resources filtered by the , and provided.

    Example Usage: GET api/resource?actorId=1&gameId=1&key=key1&key=key2

    Request
    GET /api/Resource[?gameId&actorId&keys]
    Parameters
    Name Type Value Notes
    gameId integer

    ID of a Game.

    actorId integer

    ID of a User/Group.

    keys array

    Optional array of Key names to filter results by.

    Responses
    Status Code Description Samples
    200

    Success

    ApiResourcePost

    Creates or updates a Resource record.

    Example Usage: POST api/resource

    Request
    POST /api/Resource
    Parameters
    Name Type Value Notes
    resourceRequest

    PlayGen.SUGAR.Contracts.ResourceAddRequest object that holds the details of the ResourceData.

    Responses
    Status Code Description Samples
    200

    Success

    ApiResourceTransferPost

    Transfers a quantity of a specific resource.

    Example Usage: Post api/resource/transfer

    Request
    POST /api/Resource/transfer
    Parameters
    Name Type Value Notes
    transferRequest

    PlayGen.SUGAR.Contracts.ResourceTransferRequest object that holds the details of the resoruce transfer.

    Responses
    Status Code Description Samples
    200

    Success

    Role

    ApiRoleListGet

    Get a list of all Roles.

    Example Usage: GET api/role/list

    Request
    GET /api/Role/list
    Responses
    Status Code Description Samples
    200

    Success

    ApiRoleScopeByNameGet

    Get a list of all Roles for the scope with this name.

    Example Usage: GET api/role/scope/game

    Request
    GET /api/Role/scope/{name}
    Parameters
    Name Type Value Notes
    *name string
    Responses
    Status Code Description Samples
    200

    Success

    ApiRoleScopedefaultByNameGet

    Get default Role for the scope with this name.

    Example Usage: GET api/role/scopedefault/game

    Request
    GET /api/Role/scopedefault/{name}
    Parameters
    Name Type Value Notes
    *name string
    Responses
    Status Code Description Samples
    200

    Success

    ApiRolePost

    Create a new Role. Requires the PlayGen.SUGAR.Contracts.RoleRequest.Name to be unique.

    Example Usage: POST api/role

    Request
    POST /api/Role
    Parameters
    Name Type Value Notes
    newRole

    PlayGen.SUGAR.Contracts.RoleRequest object that contains the details of the new Role.

    Responses
    Status Code Description Samples
    200

    Success

    ApiRoleByIdDelete

    Delete Role with the ID provided.

    Example Usage: DELETE api/role/1

    Request
    DELETE /api/Role/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Role ID.

    Responses
    Status Code Description Samples
    200

    Success

    RoleClaim

    ApiRoleClaimRoleByIdGet

    Get a list of all Claims for this Role.

    Example Usage: GET api/roleclaim/role/1

    Request
    GET /api/RoleClaim/role/{id}
    Parameters
    Name Type Value Notes
    *id integer
    Responses
    Status Code Description Samples
    200

    Success

    ApiRoleClaimPost

    Create a new RoleClaim.

    Example Usage: POST api/roleclaim

    Request
    POST /api/RoleClaim
    Parameters
    Name Type Value Notes
    newRoleClaim

    PlayGen.SUGAR.Contracts.RoleClaimRequest object that contains the details of the new RoleClaim.

    Responses
    Status Code Description Samples
    200

    Success

    ApiRoleClaimRoleByRoleIdClaimByClaimIdDelete

    Delete RoleClaim with the ID provided.

    Example Usage: DELETE api/roleclaim/role/1/claim/1

    Request
    DELETE /api/RoleClaim/role/{roleId}/claim/{claimId}
    Parameters
    Name Type Value Notes
    *roleId integer

    Role ID.

    *claimId integer

    Claim ID.

    Responses
    Status Code Description Samples
    200

    Success

    Session

    ApiLoginplatformPost

    Logs in an account based on the name and password combination. Returns a JsonWebToken used for authorization in any further calls to the API.

    Example Usage: POST api/loginplatform

    Request
    POST /api/loginplatform
    Parameters
    Name Type Value Notes
    accountRequest

    PlayGen.SUGAR.Contracts.AccountRequest object that contains the account details provided.

    Responses
    Status Code Description Samples
    200

    Success

    ApiByGameIdLogingamePost

    Logs in an account based on the name and password combination. Returns a JsonWebToken used for authorization in any further calls to the API.

    Example Usage: POST api/1/logingame

    Request
    POST /api/{gameId}/logingame
    Parameters
    Name Type Value Notes
    *gameId integer

    Optional Id of the game the account is logging in for.

    accountRequest

    PlayGen.SUGAR.Contracts.AccountRequest object that contains the account details provided.

    Responses
    Status Code Description Samples
    200

    Success

    ApiCreateandloginplatformPost

    Creates a new account and login that account.

    Example Usage: POST api/createandloginplatform

    Request
    POST /api/createandloginplatform
    Parameters
    Name Type Value Notes
    accountRequest

    PlayGen.SUGAR.Contracts.AccountRequest object that contains the account details provided.

    Responses
    Status Code Description Samples
    200

    Success

    ApiByGameIdCreateandlogingamePost

    Creates a new account and login that account.

    Example Usage: POST api/1/createandlogingame

    Request
    POST /api/{gameId}/createandlogingame
    Parameters
    Name Type Value Notes
    *gameId integer

    Optional Id of the game the account is logging in for.

    accountRequest

    PlayGen.SUGAR.Contracts.AccountRequest object that contains the account details provided.

    Responses
    Status Code Description Samples
    200

    Success

    ApiHeartbeatGet

    Heartbeat method to keep the specific session alive. Calling it within a server defined interval will notify the server that the session is still active.

    Request
    GET /api/heartbeat
    Responses
    Status Code Description Samples
    200

    Success

    ApiLogoutGet

    Logs out the currently logged in account, ending it's session and removing the authorization token.

    Request
    GET /api/logout
    Responses
    Status Code Description Samples
    200

    Success

    Skills

    ApiSkillsFindByTokenByGameIdGet

    Find a Skill that matches and .

    Example Usage: GET api/skills/find/SKILL_TOKEN/1

    Request
    GET /api/Skills/find/{token}/{gameId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Skill

    *gameId integer

    ID of the Game the Skill is for

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsFindByTokenGlobalGet

    Find a Skill that matches and .

    Example Usage: GET api/skills/find/SKILL_TOKEN/1

    Request
    GET /api/Skills/find/{token}/global
    Parameters
    Name Type Value Notes
    *token string

    Token of Skill

    *gameId integer

    ID of the Game the Skill is for

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsGlobalListGet

    Find a list of Skills that match . If global is provided instead of a gameId, get all global skills, ie. skills that are not associated with a specific game.

    Example Usage: GET api/skills/game/1/list

    Request
    GET /api/Skills/global/list
    Parameters
    Name Type Value Notes
    *gameId integer

    Game ID

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsGameByGameIdListGet

    Find a list of Skills that match . If global is provided instead of a gameId, get all global skills, ie. skills that are not associated with a specific game.

    Example Usage: GET api/skills/game/1/list

    Request
    GET /api/Skills/game/{gameId}/list
    Parameters
    Name Type Value Notes
    *gameId integer

    Game ID

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsGameByGameIdEvaluateByActorIdGet

    Find the current progress for all skills for a for .

    Example Usage: GET api/skills/game/1/evaluate/1

    Request
    GET /api/Skills/game/{gameId}/evaluate/{actorId}
    Parameters
    Name Type Value Notes
    *gameId integer

    ID of Game

    *actorId integer

    ID of Group/User

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsGlobalEvaluateByActorIdGet

    Find the current progress for all skills for a for .

    Example Usage: GET api/skills/game/1/evaluate/1

    Request
    GET /api/Skills/global/evaluate/{actorId}
    Parameters
    Name Type Value Notes
    *gameId integer

    ID of Game

    *actorId integer

    ID of Group/User

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsByTokenByGameIdEvaluateByActorIdGet

    Find the current progress for a Skill for .

    Example Usage: GET api/skills/SKILL_TOKEN/1/evaluate/1

    Request
    GET /api/Skills/{token}/{gameId}/evaluate/{actorId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Skill

    *gameId integer

    ID of the Game the Skill is for

    *actorId integer

    ID of Group/User

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsByTokenGlobalEvaluateByActorIdGet

    Find the current progress for a Skill for .

    Example Usage: GET api/skills/SKILL_TOKEN/1/evaluate/1

    Request
    GET /api/Skills/{token}/global/evaluate/{actorId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Skill

    *gameId integer

    ID of the Game the Skill is for

    *actorId integer

    ID of Group/User

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsCreatePost

    Create a new Skill. Requires PlayGen.SUGAR.Contracts.EvaluationCreateRequest.Name to be unique to that PlayGen.SUGAR.Contracts.EvaluationCreateRequest.GameId.

    Example Usage: POST api/skills/create

    Request
    POST /api/Skills/create
    Parameters
    Name Type Value Notes
    newSkill

    PlayGen.SUGAR.Contracts.EvaluationCreateRequest object that holds the details of the new Skill.

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsUpdatePut

    Update an existing Skill.

    Example Usage: PUT api/skills/update

    Request
    PUT /api/Skills/update
    Parameters
    Name Type Value Notes
    skill

    PlayGen.SUGAR.Contracts.EvaluationCreateRequest object that holds the details of the Skill.

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsByTokenGlobalDelete

    Delete Skill with the and provided.

    Example Usage: DELETE api/skills/SKILL_TOKEN/1

    Request
    DELETE /api/Skills/{token}/global
    Parameters
    Name Type Value Notes
    *token string

    Token of Skill

    *gameId integer

    ID of the Game the Skill is for

    Responses
    Status Code Description Samples
    200

    Success

    ApiSkillsByTokenByGameIdDelete

    Delete Skill with the and provided.

    Example Usage: DELETE api/skills/SKILL_TOKEN/1

    Request
    DELETE /api/Skills/{token}/{gameId}
    Parameters
    Name Type Value Notes
    *token string

    Token of Skill

    *gameId integer

    ID of the Game the Skill is for

    Responses
    Status Code Description Samples
    200

    Success

    User

    ApiUserListGet

    Get a list of all Users.

    Example Usage: GET api/user/list

    Request
    GET /api/User/list
    Responses
    Status Code Description Samples
    200

    Success

    ApiUserFindByNameGet

    Get a list of Users that match provided.

    Example Usage: GET api/user/find/user1

    Request
    GET /api/User/find/{name}?exactMatch
    Parameters
    Name Type Value Notes
    *name string

    User name.

    *exactMatch boolean

    Match the name exactly.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserFindByNameByExactMatchGet

    Get a list of Users that match provided.

    Example Usage: GET api/user/find/user1

    Request
    GET /api/User/find/{name}/{exactMatch}
    Parameters
    Name Type Value Notes
    *name string

    User name.

    *exactMatch boolean

    Match the name exactly.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserFindbyidByIdGet

    Get User that matches provided.

    Example Usage: GET api/user/findbyid/1

    Request
    GET /api/User/findbyid/{id}
    Parameters
    Name Type Value Notes
    *id integer

    User id.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserPost

    Create a new User. Requires the PlayGen.SUGAR.Contracts.UserRequest's Name to be unique for Users.

    Example Usage: POST api/user

    Request
    POST /api/User
    Parameters
    Name Type Value Notes
    actor

    PlayGen.SUGAR.Contracts.UserRequest object that holds the details of the new User.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserUpdateByIdPut

    Update an existing User.

    Example Usage: PUT api/user/update/1

    Request
    PUT /api/User/update/{id}
    Parameters
    Name Type Value Notes
    *id integer

    Id of the existing User.

    user

    PlayGen.SUGAR.Contracts.UserRequest object that holds the details of the User.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserByIdDelete

    Delete user with the provided.

    Example Usage: DELETE api/user/1

    Request
    DELETE /api/User/{id}
    Parameters
    Name Type Value Notes
    *id integer

    User ID.

    Responses
    Status Code Description Samples
    200

    Success

    UserFriend

    ApiUserFriendRequestsByUserIdGet

    Get a list of all Users that have relationship requests for this .

    Example Usage: GET api/userfriend/requests/1

    Request
    GET /api/UserFriend/requests/{userId}
    Parameters
    Name Type Value Notes
    *userId integer

    ID of the group.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserFriendSentrequestsByUserIdGet

    Get a list of all Users that have been sent relationship requests for this .

    Example Usage: GET api/userfriend/sentrequests/1

    Request
    GET /api/UserFriend/sentrequests/{userId}
    Parameters
    Name Type Value Notes
    *userId integer

    ID of the user.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserFriendFriendsByUserIdGet

    Get a list of all Users that have relationships with this .

    Example Usage: GET api/userfriend/friends/1

    Request
    GET /api/UserFriend/friends/{userId}
    Parameters
    Name Type Value Notes
    *userId integer

    ID of the user.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserFriendPut

    Update an existing relationship between and . Requires the relationship to already exist between the two Users.

    Example Usage: PUT api/userfriend

    Request
    PUT /api/UserFriend
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipStatusUpdate object that holds the details of the relationship.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserFriendPost

    Create a new relationship request between two Users. Requires a relationship between the two to not already exist.

    Example Usage: POST api/userfriend

    Request
    POST /api/UserFriend
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipRequest object that holds the details of the new relationship request.

    Responses
    Status Code Description Samples
    200

    Success

    ApiUserFriendRequestPut

    Update an existing relationship request between and . Requires the relationship request to already exist between the two Users.

    Example Usage: PUT api/userfriend/request

    Request
    PUT /api/UserFriend/request
    Parameters
    Name Type Value Notes
    relationship

    PlayGen.SUGAR.Contracts.RelationshipStatusUpdate object that holds the details of the relationship.

    Responses
    Status Code Description Samples
    200

    Success

    Version

    ApiVersionGet

    Request
    GET /api/Version
    Responses
    Status Code Description Samples
    200

    Success

    Back to top Copyright © 2016 PlayGen