/match

List Matches

get

Lists all matches available. Under most circumstances, this will requires that a profile be made available to the request. The server may choose to return an error if no suitable profile can be determined.

Authorizations
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
searchanyOptional
Responses
400Error
application/json
get
GET /api/rest/match HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Creates a Match

post

This method accepts an instance of Match, effectively requesting that the server find a suitable opponent for a game. As other suitable players create matches the created match object may be updated as a suitable opponent is found. The client must poll matches for updates and react accordingly.

Authorizations
Body

Represents a single one-on-one match between the current player and an opponent. Once matched, the player will will be able to create a game against the supplied opposing player. The server may modify or delete matches based on a variety of circumstances.

idanyOptional

The unique ID of the match.

schemeanyRequired

The scheme to use when matching with other players.

scopeanyOptional

An optional scope for the match. For example, if the match were part of a tournament, it could be scoped to the unique ID of the tournament.

lastUpdatedTimestampanyOptional

The time of the last modification of the match.

gameIdanyOptional

The system-assigned game ID of the match. Null until the match is successfully made.

metadataanyOptional

Additional arbitrary metadata that is attached to the match.

Responses
400Error
application/json
post
POST /api/rest/match HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 2560

{
  "id": null,
  "scheme": null,
  "scope": null,
  "player": {
    "id": null,
    "user": {
      "id": null,
      "name": null,
      "firstName": null,
      "lastName": null,
      "email": null,
      "primaryPhoneNb": null,
      "level": "UNPRIVILEGED"
    },
    "application": {
      "id": null,
      "name": null,
      "description": null,
      "gitBranch": null,
      "scriptRepoUrl": null,
      "httpDocumentationUrl": null,
      "httpDocumentationUiUrl": null,
      "httpTunnelEndpointUrl": null,
      "attributes": null,
      "applicationConfiguration": {
        "id": null,
        "category": "MATCHMAKING",
        "uniqueIdentifier": null,
        "parent": {
          "id": null,
          "name": null,
          "description": null,
          "gitBranch": null,
          "scriptRepoUrl": null,
          "httpDocumentationUrl": null,
          "httpDocumentationUiUrl": null,
          "httpTunnelEndpointUrl": null,
          "attributes": null,
          "applicationConfiguration": {
            "id": null,
            "category": "MATCHMAKING",
            "uniqueIdentifier": null,
            "parent": "[Circular Reference]",
            "productBundles": [
              {
                "productId": null,
                "displayName": null,
                "description": null,
                "productBundleRewards": [
                  {
                    "itemId": null,
                    "quantity": null
                  }
                ],
                "metadata": null,
                "display": null
              }
            ]
          }
        },
        "productBundles": [
          {
            "productId": null,
            "displayName": null,
            "description": null,
            "productBundleRewards": [
              {
                "itemId": null,
                "quantity": null
              }
            ],
            "metadata": null,
            "display": null
          }
        ]
      }
    },
    "imageUrl": null,
    "imageObject": {
      "id": null,
      "url": null,
      "mimeType": null,
      "state": "EMPTY",
      "lastModified": null
    },
    "displayName": null,
    "metadata": null,
    "lastLogin": null
  },
  "opponent": {
    "id": null,
    "user": {
      "id": null,
      "name": null,
      "firstName": null,
      "lastName": null,
      "email": null,
      "primaryPhoneNb": null,
      "level": "UNPRIVILEGED"
    },
    "application": {
      "id": null,
      "name": null,
      "description": null,
      "gitBranch": null,
      "scriptRepoUrl": null,
      "httpDocumentationUrl": null,
      "httpDocumentationUiUrl": null,
      "httpTunnelEndpointUrl": null,
      "attributes": null,
      "applicationConfiguration": {
        "id": null,
        "category": "MATCHMAKING",
        "uniqueIdentifier": null,
        "parent": {
          "id": null,
          "name": null,
          "description": null,
          "gitBranch": null,
          "scriptRepoUrl": null,
          "httpDocumentationUrl": null,
          "httpDocumentationUiUrl": null,
          "httpTunnelEndpointUrl": null,
          "attributes": null,
          "applicationConfiguration": {
            "id": null,
            "category": "MATCHMAKING",
            "uniqueIdentifier": null,
            "parent": "[Circular Reference]",
            "productBundles": [
              {
                "productId": null,
                "displayName": null,
                "description": null,
                "productBundleRewards": [
                  {
                    "itemId": null,
                    "quantity": null
                  }
                ],
                "metadata": null,
                "display": null
              }
            ]
          }
        },
        "productBundles": [
          {
            "productId": null,
            "displayName": null,
            "description": null,
            "productBundleRewards": [
              {
                "itemId": null,
                "quantity": null
              }
            ],
            "metadata": null,
            "display": null
          }
        ]
      }
    },
    "imageUrl": null,
    "imageObject": {
      "id": null,
      "url": null,
      "mimeType": null,
      "state": "EMPTY",
      "lastModified": null
    },
    "displayName": null,
    "metadata": null,
    "lastLogin": null
  },
  "lastUpdatedTimestamp": null,
  "gameId": null,
  "metadata": null
}
{
  "code": "text",
  "message": "text"
}

Gets a Specific Match

get

Gets a specific match given the match's unique ID. Additionally, it is possible to instruct the API to wait for a period of time before sending the response. The request will intentionally hang until the requested Match with ID has been updated in the database.

Authorizations
Path parameters
matchIdanyRequired
Header parameters
SocialEngine-LongPoll-TimeoutanyOptional

The maximum amount time the server will wait until a request returns a default set of data for long polling. Specifying a zero will request that the server wait indefinitely until responding. Though, the server may enforce a practical upper limit on the amount of time it takes to return. Omitting this header will prompt the server to treat the request as a normal request.

Responses
400Error
application/json
get
GET /api/rest/match/{matchId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Deletes a Match

delete

Deletes and permanently removes the Match fromt he server. This effectively will cancel any pending request for a match. If a game is currently being played agaist the match, the server may reject the request to delete the match until the game concludes.

Authorizations
Path parameters
matchIdanyRequired
Responses
400Error
application/json
delete
DELETE /api/rest/match/{matchId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Last updated