<!DOCTYPE html><html><head><meta charset="utf-8"><title>ClanOfthecloud APIs</title><link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootswatch/3.1.1/flatly/bootstrap.min.css"><link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,700|Inconsolata|Raleway:200"><style>pre code{display:block;padding:.5em;color:#333}
/* Highlight.js Theme Tomorrow */
.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}</style><style>body,
h4,
h5 {
  font-family: 'Roboto' sans-serif !important;
}
h1,
h2,
h3,
.aglio {
  font-family: 'Raleway' sans-serif !important;
}
h1 a,
h2 a,
h3 a,
h4 a,
h5 a {
  display: none;
}
h1:hover a,
h2:hover a,
h3:hover a,
h4:hover a,
h5:hover a {
  display: inline;
}
code {
  color: #444;
  background-color: #ddd;
  font-family: 'Inconsolata' monospace !important;
}
a[data-target] {
  cursor: pointer;
}
h4 {
  font-size: 100%;
  font-weight: bold;
  text-transform: uppercase;
}
.back-to-top {
  position: fixed;
  z-index: 1;
  bottom: 0px;
  right: 24px;
  padding: 4px 8px;
  background-color: #eee;
  text-decoration: none !important;
  border-top: 1px solid rgba(0,0,0,0.1);
  border-left: 1px solid rgba(0,0,0,0.1);
  border-right: 1px solid rgba(0,0,0,0.1);
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}
.panel {
  overflow: hidden;
}
.panel-heading code {
  margin-left: 3px;
  background-color: rgba(255,255,255,0.7);
  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  white-space: -pre-wrap;
  white-space: -o-pre-wrap;
  word-wrap: break-word;
}
.panel-heading h3 {
  margin-top: 10px;
  margin-bottom: 10px;
}
a.list-group-item:hover {
  background-color: #f8f8f8;
  border-left: 2px solid #555;
  padding-left: 15px;
}
.indent {
  display: block;
  text-indent: 16px;
}
.list-group-item {
  padding-left: 16px;
}
.list-group-item .toggle .open {
  display: block;
}
.list-group-item .toggle .closed {
  display: none;
}
.list-group-item.collapsed .toggle .open {
  display: none;
}
.list-group-item.collapsed .toggle .closed {
  display: block;
}
a.list-group-item:hover {
  background-color: #f5f5f5;
  border-left-color: #555;
}
a.list-group-item {
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
a.list-group-item.heading {
  font-size: 15px;
  background-color: #ecf0f1;
}
a.list-group-item.heading:hover {
  background-color: #f5f5f5;
}
.list-group-item.collapse {
  display: none;
}
.list-group-item.collapse.in {
  display: block;
}
.list-group-item a span.closed {
  display: none;
}
.list-group-item a span.open {
  display: block;
}
.list-group-item a.collapsed span.closed {
  display: block;
}
.list-group-item a.collapsed span.open {
  display: none;
}
#nav {
  width: inherit;
  margin-top: 38px;
  max-width: 255px;
  top: 0;
  bottom: 0;
  padding-right: 12px;
  padding-bottom: 12px;
  overflow-y: auto;
}
@media (max-width: 1199px) {
  #nav {
    max-width: 212px;
  }
}
</style></head><body><a href="#top" class="text-muted back-to-top"><i class="fa fa-toggle-up"></i>&nbsp;Back to top</a><div class="container"><div class="row"><div class="col-md-3"><nav id="nav" class="hidden-sm hidden-xs affix nav"><div class="list-group"><a data-toggle="" data-target="#login-routes-menu" href="#login-routes" class="list-group-item heading collapsed">Login routes</a><div id="login-routes-menu"><a href="#login-routes-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/login</a><a href="#login-routes-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/login/anonymous</a><a href="#login-routes-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/logout</a><a href="#login-routes-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/unlink</a></div></div><div class="list-group"><a data-toggle="" data-target="#gamer-profile-menu" href="#gamer-profile" class="list-group-item heading collapsed">Gamer profile</a><div id="gamer-profile-menu"><a href="#gamer-profile-profile" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Profile</a><a href="#gamer-profile-profile-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set Profile</span></a><a href="#gamer-profile-profile-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get profile</span></a></div></div><div class="list-group"><a data-toggle="" data-target="#gamer-querying-menu" href="#gamer-querying" class="list-group-item heading collapsed">Gamer Querying</a><div id="gamer-querying-menu"><a href="#gamer-querying-find-users" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>Find Users</a><a href="#gamer-querying-validate-gamer_id" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>Validate gamer_id</a><a href="#gamer-querying-find-a-&quot;network&quot;-gamer_id" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>Find a &quot;Network&quot; gamer_id</a></div></div><div class="list-group"><a data-toggle="" data-target="#key-value-store-menu" href="#key-value-store" class="list-group-item heading collapsed">Key-Value Store</a><div id="key-value-store-menu"><a href="#key-value-store-gamer-vfs" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Gamer VFS</a><a href="#key-value-store-gamer-vfs-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get gamer's data</span></a><a href="#key-value-store-gamer-vfs-put" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-warning"><i class="fa fa-pencil"></i></span><span class="indent">Set gamer's data</span></a><a href="#key-value-store-gamer-vfs-delete" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span><span class="indent">Remove gamer's data</span></a><a href="#key-value-store-game-vfs" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>Game VFS</a></div></div><div class="list-group"><a data-toggle="" data-target="#transactions-menu" href="#transactions" class="list-group-item heading collapsed">Transactions</a><div id="transactions-menu"><a href="#transactions-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v2.2/gamer/tx/{domain}</a><a href="#transactions-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.4/gamer/tx/{domain}{?unit}{&amp;skip}{&amp;limit}</a><a href="#transactions-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/gamer/tx/{domain}/balance</a></div></div><div class="list-group"><a data-toggle="" data-target="#gamer-properties-menu" href="#gamer-properties" class="list-group-item heading collapsed">Gamer Properties</a><div id="gamer-properties-menu"><a href="#gamer-properties-properties" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Properties</a><a href="#gamer-properties-properties-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set properties</span></a><a href="#gamer-properties-properties-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get properties</span></a><a href="#gamer-properties-properties-delete" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span><span class="indent">delete properties</span></a><a href="#gamer-properties-property" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Property</a><a href="#gamer-properties-property-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set property</span></a><a href="#gamer-properties-property-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get property</span></a><a href="#gamer-properties-property-delete" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span><span class="indent">delete property</span></a></div></div><div class="list-group"><a data-toggle="" data-target="#social-features-menu" href="#social-features" class="list-group-item heading collapsed">Social features</a><div id="social-features-menu"><a href="#social-features-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.6/gamer/friends/{domain}/{?status}</a><a href="#social-features-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v2.6/gamer/friends/{domain}/{friendid}?{status}</a></div></div><div class="list-group"><a data-toggle="" data-target="#sponsoring-menu" href="#sponsoring" class="list-group-item heading collapsed">Sponsoring</a><div id="sponsoring-menu"><a href="#sponsoring-god-father" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">God father</a><a href="#sponsoring-god-father-put" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-warning"><i class="fa fa-pencil"></i></span><span class="indent">Get sponsoring code</span></a><a href="#sponsoring-god-father-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set godfather</span></a><a href="#sponsoring-god-father-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get godfather</span></a><a href="#sponsoring-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.6/gamer/godchidren/{domain}</a></div></div><div class="list-group"><a data-toggle="" data-target="#scores-and-leaderboards-menu" href="#scores-and-leaderboards" class="list-group-item heading collapsed">Scores and Leaderboards</a><div id="scores-and-leaderboards-menu"><a href="#scores-and-leaderboards-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v2.6/gamer/scores/{domain}/{leaderboard}{?order}{&amp;force}</a><a href="#scores-and-leaderboards-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.6/gamer/scores/{domain}/{leaderboard}{?order}{&amp;type}{&amp;page}{&amp;count}</a><a href="#scores-and-leaderboards-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.6/gamer/bestscores/{domain}</a></div></div><div class="list-group"><a data-toggle="" data-target="#events-menu" href="#events" class="list-group-item heading collapsed">Events</a><div id="events-menu"><a href="#events-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/event/{domain}/{gamer_id}</a><a href="#events-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/gamer/event/{domain}{?ack}{&amp;timeout}</a></div></div><div class="list-group"><a data-toggle="" data-target="#achievements-menu" href="#achievements" class="list-group-item heading collapsed">Achievements</a><div id="achievements-menu"><a href="#achievements-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/gamer/achievements/{domain}</a><a href="#achievements-custom-information-about-an-achievement" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Custom information about an achievement</a><a href="#achievements-custom-information-about-an-achievement-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set custom information about an achievement, for an user</span></a><a href="#achievements-custom-information-about-an-achievement-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Extract custom information about an achievement</span></a></div></div><div class="list-group"><a data-toggle="" data-target="#matches-menu" href="#matches" class="list-group-item heading collapsed">Matches</a><div id="matches-menu"><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches{?domain}</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/gamer/matches{?domain}{&amp;properties}{&amp;participating}{&amp;finished}{&amp;invited}</a><a href="#matches-working-with-a-match" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Working with a match</a><a href="#matches-working-with-a-match-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Fetching in-depth information about a match</span></a><a href="#matches-working-with-a-match-delete" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span><span class="indent">Deleting a match</span></a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/join</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/leave</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/invite/{gamer_id}</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span>DELETE /v1/gamer/matches/{id}/invitation</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/move{?lastEventId}</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/shoe/draw{?count}{&amp;lastEventId}</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/finish{?lastEventId}</a></div></div><div class="list-group"><a data-toggle="" data-target="#indexing-menu" href="#indexing" class="list-group-item heading collapsed">Indexing</a><div id="indexing-menu"><a href="#indexing-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/index/{domain}/{indexName}</a><a href="#indexing-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/index/{domain}/{indexName}/search?{q}&amp;{sort}&amp;{from}&amp;{max}</a><a href="#indexing-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/index/{domain}/{indexName}/{id}</a><a href="#indexing-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span>DELETE /v1/index/{domain}/{indexName}/{id}</a></div></div><p style="text-align: center; word-wrap: break-word;"><a href="https://sandbox-api01.clanofthecloud.mobi/">https://sandbox-api01.clanofthecloud.mobi/</a></p></nav></div><div class="col-md-8"><div><header><div class="page-header"><h1 id="top">ClanOfthecloud APIs</h1></div></header><div class="description"><p><a href="http://www.clanofthecloud.com">ClanOfTheCloud</a> is a Mobile Gaming Backend as a Service (Baas) Company. You can create an account on our website,
and try us with your next social game! We’re scalable, multiplateform and we offer a full API.</p>
<h2>Server’s addresses, load balancing and failover</h2>
<p>The Sandbox servers are:</p>
<ul>
<li><p><a href="https://sandbox-api01.clanofthecloud.mobi/">https://sandbox-api01.clanofthecloud.mobi/</a></p></li>
<li><p><a href="https://sandbox-api02.clanofthecloud.mobi/">https://sandbox-api02.clanofthecloud.mobi/</a></p></li>
<li><p>to api16…</p></li>
</ul>
<p>And the production servers are:</p>
<ul>
<li><p><a href="https://prod-api01.clanofthecloud.mobi/">https://prod-api01.clanofthecloud.mobi/</a></p></li>
<li><p><a href="https://prod-api02.clanofthecloud.mobi/">https://prod-api02.clanofthecloud.mobi/</a></p></li>
<li><p>to api16</p></li>
</ul>
<p>Each of these servers are load balancers… But if one of them goes down, you can failover to another load balancer.</p>
<h2>Token-based App Authentication</h2>
<p>Once you’ve created an account, you can provision a Game in the FrontOffice application in either sandbox or production mode.
We’re using a classic APIKEY / APISECRET couple to authenticate all requests.</p>
<p>Every request should have two headers set with your game credentials :</p>
<table>
<thead>
<tr><th>Header</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>x-apikey</td><td>Your API key</td></tr>
<tr><td>x-apisecret</td><td>Your API secret</td></tr>
</tbody>
</table>
<h2>After login</h2>
<p>After login has been called, HTTP Basic Authentication will be used to authenticate every request.</p>
<p>The 3 authentication headers will look like :</p>
<table>
<thead>
<tr><th>Header</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>x-apikey</td><td>Your API key</td></tr>
<tr><td>x-apisecret</td><td>Your API secret</td></tr>
<tr><td>Authorization</td><td>Basic <code>gamer_id:gamer_secret</code> <em>(base64 encoded)</em></td></tr>
</tbody>
</table>
<p>Both <code>gamer_id</code> and <code>gamer_secret</code> are returned by <code>/v1/gamer/login</code>.</p>
<p><strong>Note:</strong> It is your responsibility to store these to help the user log in later (in RAW mode).</p>
</div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="login-routes">Login routes&nbsp;<a href="#login-routes"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>In addition to the App Authentication above, gamers are authenticated too.
Before playing, the gamer needs an identity… Login provides such an identity.</p>
<p>The login route is used to authenticate a gamer, and get basic profile information about him.</p>
<p><strong>Note:</strong> If an existing gamer can’t be found, a new one is created and returned.</p>
<p>Login for authenticated gamers will use one of these authentication methods :</p>
<ul>
<li><p>Facebook Connect: use the <code>ID</code> and the <code>oauth token</code> from Facebook</p></li>
<li><p>Google+ Sign-in: use the <code>ID</code> and the <code>oauth token</code> from Google+</p></li>
<li><p>anonymous: use the <code>gamer_id</code> and the <code>gamer_secret</code> from a previous login</p></li>
</ul>
<h4 id="login-routes-">Resources&nbsp;<a href="#login-routes-"><i class="fa fa-link"></i></a></h4><section id="login-routes--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#login-routes--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/login</code></div></div><div class="panel-body"><h3>Body description</h3>
<p>A JSON object must be sent in the request body with the following structure.</p>
<table>
<thead>
<tr><th>Field</th><th>Description</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>network</td><td>string, required</td><td>can be one of [&quot;anonymous&quot;, &quot;facebook&quot;, “google”]</td></tr>
<tr><td>id</td><td>string, required</td><td>the user ID for this network</td></tr>
<tr><td>secret</td><td>string, required</td><td>the user secret/token for this network</td></tr>
</tbody>
</table>
<h3>Response description</h3>
<p><strong>Note:</strong> If a new gamer was created, the response code is <code>201</code>, <code>200</code> otherwise.</p>
<p>The response is a JSON object.</p>
<table>
<thead>
<tr><th>Field</th><th>Description</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>gamer_id</td><td>string</td><td>user_id used in basic authentication for gamer authenticated requests</td></tr>
<tr><td>gamer_secret</td><td>string</td><td>secret used in basic authentication for gamer authenticated requests</td></tr>
<tr><td>profile</td><td>json</td><td>gamer’s profile, including &quot;name&quot;, &quot;email&quot;, &quot;nickname&quot;, …</td></tr>
<tr><td>vfs</td><td>json</td><td>list of key/value associated to the app/game</td></tr>
<tr><td>gamervfs</td><td>json</td><td>list of key/value associated to the gamer</td></tr>
<tr><td>matches</td><td>json</td><td>array of match currently in open state of the gamer</td></tr>
</tbody>
</table>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c153bc5c245b1345579aaf68084e777f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c153bc5c245b1345579aaf68084e777f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">network</span>": <span class="hljs-value"><span class="hljs-string">"facebook"</span></span>,
    "<span class="hljs-attribute">id</span>" : <span class="hljs-value"><span class="hljs-string">"1000001010"</span></span>,
    "<span class="hljs-attribute">secret</span>" : <span class="hljs-value"><span class="hljs-string">"CAAIoRjU6xxYBAAy5Ymu...7XAehrcVQBUOG7oBVNatEUZD"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#18998983c34f079d0b58d37a2488a144" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="18998983c34f079d0b58d37a2488a144" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
    "<span class="hljs-attribute">gamer_secret</span>" : <span class="hljs-value"><span class="hljs-string">"dsfg5dgfs654ezrt321ds31gdfs654ert"</span></span>,
    "<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}</span>,
    "<span class="hljs-attribute">vfs</span>" : <span class="hljs-value">{}</span>,
    "<span class="hljs-attribute">gamervfs</span>" : <span class="hljs-value">{}
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c153bc5c245b1345579aaf68084e777f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c153bc5c245b1345579aaf68084e777f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">INVALID KEY</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">INVALID SECRET</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">network</span>": <span class="hljs-value"><span class="hljs-string">"facebook"</span></span>,
    "<span class="hljs-attribute">id</span>" : <span class="hljs-value"><span class="hljs-string">"1000001010"</span></span>,
    "<span class="hljs-attribute">secret</span>" : <span class="hljs-value"><span class="hljs-string">"CAAIoRjU6xxYBAAy5Ymu...7XAehrcVQBUOG7oBVNatEUZD"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>401</code></strong><a data-toggle="collapse" data-target="#fa105f0a99f3e6afa558e11ddfbfc9ca" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="fa105f0a99f3e6afa558e11ddfbfc9ca" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Invalid App Credentials"</span>
</span>}
</code></pre></li></ul></section><h4 id="login-routes-">Resources&nbsp;<a href="#login-routes-"><i class="fa fa-link"></i></a></h4><section id="login-routes--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#login-routes--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/login/anonymous</code></div></div><div class="panel-body"><p>The login/anonymous route is used to create a new gamer without any informations.</p>
<h3>Response description</h3>
<p><strong>Note:</strong> same response as for login route.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#9efc23a62d9530df54bfad107314e7af" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="9efc23a62d9530df54bfad107314e7af" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#18998983c34f079d0b58d37a2488a144" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="18998983c34f079d0b58d37a2488a144" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
    "<span class="hljs-attribute">gamer_secret</span>" : <span class="hljs-value"><span class="hljs-string">"dsfg5dgfs654ezrt321ds31gdfs654ert"</span></span>,
    "<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}</span>,
    "<span class="hljs-attribute">vfs</span>" : <span class="hljs-value">{}</span>,
    "<span class="hljs-attribute">gamervfs</span>" : <span class="hljs-value">{}
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#9efc23a62d9530df54bfad107314e7af" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="9efc23a62d9530df54bfad107314e7af" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">INVALID KEY</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">INVALID SECRET</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>401</code></strong><a data-toggle="collapse" data-target="#fa105f0a99f3e6afa558e11ddfbfc9ca" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="fa105f0a99f3e6afa558e11ddfbfc9ca" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Invalid App Credentials"</span>
</span>}
</code></pre></li></ul></section><h4 id="login-routes-">Resources&nbsp;<a href="#login-routes-"><i class="fa fa-link"></i></a></h4><section id="login-routes--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#login-routes--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/logout</code></div></div><div class="panel-body"><p>Log a gamer out</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#d348da54a4570b81b9f762966acf2db0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d348da54a4570b81b9f762966acf2db0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#72eea5f70490a6e7d8d9530e955b4604" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="72eea5f70490a6e7d8d9530e955b4604" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#d348da54a4570b81b9f762966acf2db0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d348da54a4570b81b9f762966acf2db0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic INVALID GAMER IDENTITY</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>401</code></strong><a data-toggle="collapse" data-target="#e6e8f0cbb04b397113d9788f1754c1b2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="e6e8f0cbb04b397113d9788f1754c1b2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Invalid Gamer Credentials"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#d348da54a4570b81b9f762966acf2db0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d348da54a4570b81b9f762966acf2db0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">INVALID API KEY</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">INVALID API SECRET</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>401</code></strong><a data-toggle="collapse" data-target="#fa105f0a99f3e6afa558e11ddfbfc9ca" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="fa105f0a99f3e6afa558e11ddfbfc9ca" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Invalid App Credentials"</span>
</span>}
</code></pre></li></ul></section><h4 id="login-routes-">Resources&nbsp;<a href="#login-routes-"><i class="fa fa-link"></i></a></h4><section id="login-routes--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#login-routes--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/unlink</code></div></div><div class="panel-body"><p>Used to unlink a user account from Facebook or Google+ credentials.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#de8bf4613d167fb10d834cf769b85099" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="de8bf4613d167fb10d834cf769b85099" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">network</span>": <span class="hljs-value"><span class="hljs-string">"facebook"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#72eea5f70490a6e7d8d9530e955b4604" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="72eea5f70490a6e7d8d9530e955b4604" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="gamer-profile">Gamer profile&nbsp;<a href="#gamer-profile"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="gamer-profile-profile">Profile&nbsp;<a href="#gamer-profile-profile"><i class="fa fa-link"></i></a></h4><p>Profile are data related to the user (globally)</p>
<section id="gamer-profile-profile-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set Profile</span></div><div style="float:left"><a href="#gamer-profile-profile-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/profile</code></div></div><div class="panel-body"><p>Fields can be added one be one, data are merged.
The following fields can be set :
[&quot;displayName&quot;, &quot;lang&quot;, &quot;firstName&quot;, &quot;lastName&quot;, &quot;addr1&quot;, &quot;addr2&quot;, &quot;addr3&quot;, “avatar”]</p>
<p><strong>note</strong> : avatar must be an URL, lang is the ISO-639-1 country code (<a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes</a>)</p>
<p>i.e when executing POST /v1/gamer/profile {&quot;displayName&quot;: &quot;Wonder Mike&quot;}
if the current profile is
“profile” : {
“email” : “<a href="mailto:michael@cotc.com">michael@cotc.com</a>”
}
then the result will be
“profile” : {
&quot;displayName&quot;: &quot;Wonder Mike&quot;,
“email” : “<a href="mailto:michael@cotc.com">michael@cotc.com</a>”
}</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#2ffadfedba96d7fc69ab286a53c55114" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="2ffadfedba96d7fc69ab286a53c55114" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Wonder Mike"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#4d76352997131adb3dbef5002e77a182" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4d76352997131adb3dbef5002e77a182" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{
        "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Wonder Mike"</span></span>,
        "<span class="hljs-attribute">email</span>" : <span class="hljs-value"><span class="hljs-string">"michael@cotc.com"</span>
    </span>}</span>,
    "<span class="hljs-attribute">updated</span>" : <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section><section id="gamer-profile-profile-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get profile</span></div><div style="float:left"><a href="#gamer-profile-profile-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/profile</code></div></div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#2d1fbf9e4d1b6ae1736338db5ac80cd4" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="2d1fbf9e4d1b6ae1736338db5ac80cd4" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#7c9c76fc1601e0e1af53f3d760ceed1b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="7c9c76fc1601e0e1af53f3d760ceed1b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">properties</span>" : <span class="hljs-value">{
        "<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
        "<span class="hljs-attribute">Level</span>" : <span class="hljs-value"><span class="hljs-number">20</span>
        <span class="hljs-string">"Expert"</span> : <span class="hljs-literal">false</span>
    </span>}
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="gamer-querying">Gamer Querying&nbsp;<a href="#gamer-querying"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="gamer-querying-find-users">Find Users&nbsp;<a href="#gamer-querying-find-users"><i class="fa fa-link"></i></a></h4><section id="gamer-querying-find-users-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">search</span></div><div style="float:left"><a href="#gamer-querying-find-users-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer{?q}{&amp;limit}{&amp;skip}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>q</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the value to match with</p>
</dd><dt>limit</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>10</span></span>&nbsp;<p>number of desired responses</p>
</dd><dt>skip</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>0</span></span>&nbsp;<p>skip the <code>skip</code> firsts responses</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#edb70febdf8c6f143638ca9c58e5f3f0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="edb70febdf8c6f143638ca9c58e5f3f0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#61fa603dc88cb9192d843e1ab593387a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="61fa603dc88cb9192d843e1ab593387a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">count</span>" : <span class="hljs-value"><span class="hljs-number">10</span></span>,
    "<span class="hljs-attribute">result</span>" : <span class="hljs-value">[
        { 
        "<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
        "<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}
        </span>}
    ]
</span>}
</code></pre></li></ul></section><h4 id="gamer-querying-validate-gamer_id">Validate gamer_id&nbsp;<a href="#gamer-querying-validate-gamer_id"><i class="fa fa-link"></i></a></h4><section id="gamer-querying-validate-gamer_id-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">check</span></div><div style="float:left"><a href="#gamer-querying-validate-gamer_id-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/gamer_id/{id}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the id to check</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#b61dbdc0b7c96a1863f865f130bedfaf" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b61dbdc0b7c96a1863f865f130bedfaf" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#00aa64f8b54fbcb8b5bae416471976ae" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="00aa64f8b54fbcb8b5bae416471976ae" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
    "<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}
</span>}
</code></pre></li></ul></section><h4 id="gamer-querying-find-a-&quot;network&quot;-gamer_id">Find a &quot;Network&quot; gamer_id&nbsp;<a href="#gamer-querying-find-a-&quot;network&quot;-gamer_id"><i class="fa fa-link"></i></a></h4><section id="gamer-querying-find-a-&quot;network&quot;-gamer_id-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">check</span></div><div style="float:left"><a href="#gamer-querying-find-a-&quot;network&quot;-gamer_id-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/{network}/{id}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>network</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the network on which to search &quot;facebook&quot;, “google”</p>
</dd><dt>id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the id in the network referential to check</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#b3ac059729802b80c55201c2d8fc0250" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b3ac059729802b80c55201c2d8fc0250" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#ffa5600da023c52a77c2a8f6e16be903" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="ffa5600da023c52a77c2a8f6e16be903" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
    "<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="key-value-store">Key-Value Store&nbsp;<a href="#key-value-store"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="key-value-store-gamer-vfs">Gamer VFS&nbsp;<a href="#key-value-store-gamer-vfs"><i class="fa fa-link"></i></a></h4><p>Gamer VFS is a key-value store you can use to associate data with a user.</p>
<p>Use it to store state, preferences… any data your user would like to share among devices.</p>
<h3>Domains</h3>
<p>Because you might want to share Gamer VFS data between games you (or other companies) wrote,
you can define so called “domains” which protect your data and let use share it securely.</p>
<p>A Domain is a namespace, but you must know the Domain-Key for this domain to have access to it. So to share
data stored in a domain, you just have to share the Domain-Key.</p>
<p>Your game has its own private Domain (see in FrontOffice dashboard) which you probably don’t want to share
but you can create other domains to share data between apps, or even between app-developers.</p>
<section id="key-value-store-gamer-vfs-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get gamer's data</span></div><div style="float:left"><a href="#key-value-store-gamer-vfs-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/vfs/{domain}/{key}{?binary}</code></div></div><div class="panel-body"><h6>Possible values for error 404</h6>
<ul>
<li><p><code>Key not found</code> … the specified key doesn’t exist</p></li>
<li><p><code>Domain not found</code> … the specified domain doesn’t exist</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain where to retreive the key/value</p>
</dd><dt>key</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<p>the desired key, if omited all keys and values of the domains will be returned</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#0cafeecd14c9e73a87b24c93f6b471e2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0cafeecd14c9e73a87b24c93f6b471e2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#a8326a4f5d4918ed7969acf86770655c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a8326a4f5d4918ed7969acf86770655c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">key</span>" : <span class="hljs-value"><span class="hljs-string">"data which could be a json"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#0cafeecd14c9e73a87b24c93f6b471e2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0cafeecd14c9e73a87b24c93f6b471e2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#bc0e4978ccac71b62d79cb8eafb14f02" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="bc0e4978ccac71b62d79cb8eafb14f02" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">key1</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key1"</span></span>,
    "<span class="hljs-attribute">key2</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key2"</span></span>,
    "<span class="hljs-attribute">key3</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key3"</span></span>,
    "<span class="hljs-attribute">key4</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key4"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>401</code></strong><a data-toggle="collapse" data-target="#0b6b0b824c77ef3bab17c110f191e48f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0b6b0b824c77ef3bab17c110f191e48f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the gamer token is no longer available, call login again!"</span></span>, 
    "<span class="hljs-attribute">data</span>" : <span class="hljs-value"><span class="hljs-string">"optional error data"</span> 
</span>}        
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#c96a2c9ffc1af0416fe85b42cbfc2460" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c96a2c9ffc1af0416fe85b42cbfc2460" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Key not found"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the specified key is not found"</span>
    <span class="hljs-string">"data"</span> : <span class="hljs-string">"optional error data"</span> 
</span>}  
</code></pre></li></ul></section><section id="key-value-store-gamer-vfs-put" class="panel panel-warning"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set gamer's data</span></div><div style="float:left"><a href="#key-value-store-gamer-vfs-put" class="btn btn-xs btn-warning">PUT</a></div><div style="overflow:hidden"><code>/v1/gamer/vfs/{domain}/{key}{?binary}</code></div></div><div class="panel-body"><p>You can store data easily. Simply send the data to be stored, as a JSON object, in the body of the request. Note that simple strings are not allowed. Arrays and objects are.</p>
<p><strong>if the key doesn’t exist, it’s dynamically created</strong></p>
<h4>Optional Binary storage</h4>
<p>You can opt to store your data in Amazon S3 storage. It’s the recommended option for values weighting more than 100ko.
With the <code>binary</code> option, the API will reply with two URLs: one to upload the file to, and the other with the URL to access the value on the internet.</p>
<p>So uploading a binary value becomes a two steps process:</p>
<ul>
<li><p>first call <code>PUT</code> to pre-authorize storage,</p></li>
<li><p>then upload the contents directly to Amazon S3’s preauthorized URL.</p></li>
<li><p>calling <code>GET</code> will then return the URL of the value on Amazon S3.</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain where to store the key/value</p>
</dd><dt>key</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the desired key</p>
</dd><dt>binary</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<p>use S3 storage</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#98faf9004ab287eb4a1e71bcaad696ed" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="98faf9004ab287eb4a1e71bcaad696ed" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{"<span class="hljs-attribute">whatever</span>": <span class="hljs-value"><span class="hljs-string">"your JSON value"</span></span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#b35d65ff7a0a2ead9e2d77af2887c78e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b35d65ff7a0a2ead9e2d77af2887c78e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{"<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>401</code></strong><a data-toggle="collapse" data-target="#ae03ed9797146dfc86941a9dbdabaac5" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="ae03ed9797146dfc86941a9dbdabaac5" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the gamer token is no longer available, call signin!"</span></span>, 
    "<span class="hljs-attribute">data</span>" : <span class="hljs-value"><span class="hljs-string">"optional error data"</span> 
</span>}        
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#bad0f7fb38d8d03b22dc7f58906ab6a9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="bad0f7fb38d8d03b22dc7f58906ab6a9" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>parameters
binary : true</li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#5e428ed278a1fa2f5a56454069a87924" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5e428ed278a1fa2f5a56454069a87924" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
    "<span class="hljs-attribute">getURL</span>": <span class="hljs-value">url</span>,
    "<span class="hljs-attribute">putURL</span>": <span class="hljs-value">url
</span>}
</code></pre></li></ul></section><section id="key-value-store-gamer-vfs-delete" class="panel panel-danger"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Remove gamer's data</span></div><div style="float:left"><a href="#key-value-store-gamer-vfs-delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v1/gamer/vfs/{domain}/{key}{?binary}</code></div></div><div class="panel-body"><pre><code>NOTE : we can't yet distinguish a missing key from an incorrect domain...
</code></pre>
<h6>Possible reasons for error 404</h6>
<ul>
<li><p><code>Key not found</code> … the specified key doesn’t exist</p></li>
<li><p><code>Domain not found</code> … the specified domain doesn’t exist</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain from where to get the key/value</p>
</dd><dt>key</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<p>the key to be removed (all if not specified)</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#e535976b79cac5cd68f4cef75e127389" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="e535976b79cac5cd68f4cef75e127389" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#d95dbb40bfaa4b059f250bbb4cbf2f85" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d95dbb40bfaa4b059f250bbb4cbf2f85" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>1
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>401</code></strong><a data-toggle="collapse" data-target="#8938cfba6f8d6095e8b543fee300bc88" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8938cfba6f8d6095e8b543fee300bc88" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the gamer token is no longer available, call signin!"</span></span>, 
    "<span class="hljs-attribute">data</span>" : <span class="hljs-value"><span class="hljs-string">"optional error data"</span> 
</span>}  
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#039ccd417f399da3f4ce1dd6bf4aed8b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="039ccd417f399da3f4ce1dd6bf4aed8b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Key not found"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the specified key is not found"</span>
    <span class="hljs-string">"data"</span> : <span class="hljs-string">"optional error data"</span> 
</span>}  
</code></pre></li></ul></section><h4 id="key-value-store-game-vfs">Game VFS&nbsp;<a href="#key-value-store-game-vfs"><i class="fa fa-link"></i></a></h4><p>Game VFS is a key-value store you can use to associate data with a game.</p>
<p>Use it to store level, booard… any data your game would like to share among users.</p>
<section id="key-value-store-game-vfs-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get game's data</span></div><div style="float:left"><a href="#key-value-store-game-vfs-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/vfs/{domain}/{key}</code></div></div><div class="panel-body"><h6>Possible values for error 404</h6>
<ul>
<li><p><code>Key not found</code> … the specified key doesn’t exist</p></li>
<li><p><code>Domain not found</code> … the specified domain doesn’t exist</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain where to retreive the key/value</p>
</dd><dt>key</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<p>the desired key, if omited all keys and values of the domains will be returned</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#f3ec42df568caef3bb0440230f43bf6a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="f3ec42df568caef3bb0440230f43bf6a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#c740fdabeac66411232a3c2c404eccc1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c740fdabeac66411232a3c2c404eccc1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">key</span>" : <span class="hljs-value"><span class="hljs-string">"data which could be a json"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#f3ec42df568caef3bb0440230f43bf6a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="f3ec42df568caef3bb0440230f43bf6a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#60dc26c294158b0bf03b944986a62a87" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="60dc26c294158b0bf03b944986a62a87" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">key1</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key1"</span></span>,
    "<span class="hljs-attribute">key2</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key2"</span></span>,
    "<span class="hljs-attribute">key3</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key3"</span></span>,
    "<span class="hljs-attribute">key4</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key4"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#1b829b95cc048e4ec1b1e0c22a46c63f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1b829b95cc048e4ec1b1e0c22a46c63f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Key not found"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the specified key is not found"</span>
    <span class="hljs-string">"data"</span> : <span class="hljs-string">"optional error data"</span> 
</span>}  
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="transactions">Transactions&nbsp;<a href="#transactions"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>Transactions are used to keep track of any inventory or portfolio or wallet… It’s basic functionality
can be used in various contexts.</p>
<p>In the case of an inventory, transactions will add or remove units from it.
When used as a portfolio (for virtual currency), transactions add or remove units too.
And feel free to invent new uses!</p>
<h2>How domains work with transactions</h2>
<p>Transactions/portfolios/inventories can be shared between games with domains. The <em>private</em> domain is private to the game
but you can create other domains shared between games.</p>
<p>This feature can be used to share a virtual currency between all your games, or to team up with other game developers
to implement cross-marketing or any incentive…</p>
<h4 id="transactions-">Resources&nbsp;<a href="#transactions-"><i class="fa fa-link"></i></a></h4><section id="transactions--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#transactions--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.2/gamer/tx/{domain}</code></div></div><div class="panel-body"><p>A transaction is a Hash where the key is the unit, and the value is a positive (credit) or negative (debit) amount.
So a single transaction can both credit and debit different units.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain used in the transaction</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#1dfc1863252bca7c70552da5925fc5d2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1dfc1863252bca7c70552da5925fc5d2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code><span class="hljs-collection">{
    transaction: <span class="hljs-collection">{ 
        <span class="hljs-string">"Gold"</span>: <span class="hljs-number">100</span>,
        <span class="hljs-string">"Silver"</span>: <span class="hljs-number">-2.5</span>,
        <span class="hljs-string">"Arrows"</span>: <span class="hljs-number">20</span>
    }</span>,
    description: <span class="hljs-string">"This is an example transaction"</span>
}</span>
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#bde53a5f42ac064282d799b1e5020780" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="bde53a5f42ac064282d799b1e5020780" class="list-group-item panel-collapse collapse"><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">balance</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">Gold</span>": <span class="hljs-value"><span class="hljs-number">130</span></span>,
        "<span class="hljs-attribute">Silver</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,
        "<span class="hljs-attribute">Arrows</span>": <span class="hljs-value"><span class="hljs-number">20</span>
    </span>}</span>,
    "<span class="hljs-attribute">achievements</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">achievementName</span>":     <span class="hljs-value">{
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"limit"</span></span>,
            "<span class="hljs-attribute">config</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">maxValue</span>": <span class="hljs-value"><span class="hljs-number">1000</span></span>,
                "<span class="hljs-attribute">unit</span>": <span class="hljs-value"><span class="hljs-string">"score"</span>
            </span>}</span>,
            "<span class="hljs-attribute">gameData</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">hidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
            </span>}</span>,
            "<span class="hljs-attribute">progress</span>": <span class="hljs-value"><span class="hljs-number">1</span>
        </span>}
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#baf08e9aaeca9c7b27340b65c08dffb3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="baf08e9aaeca9c7b27340b65c08dffb3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">transaction</span>": <span class="hljs-value">{ "<span class="hljs-attribute">Gold</span>": <span class="hljs-value">-<span class="hljs-number">1000000</span></span>}</span>,
    "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Excessive transaction"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>549</code></strong></li></ul></section><h4 id="transactions-">Resources&nbsp;<a href="#transactions-"><i class="fa fa-link"></i></a></h4><section id="transactions--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#transactions--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.4/gamer/tx/{domain}{?unit}{&amp;skip}{&amp;limit}</code></div></div><div class="panel-body"><p>Use this API to list the transactions of the current gamer. You can specify an optional
<code>?unit=xxx</code> parameter where <code>xxx</code> is the unit (Silver, Gold or Arrows in our example). If
<code>unit</code> is specified, the result will only contain transactions about this unit.
Use <code>?skip</code> and <code>?limit</code> to page through transactions.</p>
<p>Note: the <code>count</code> returned is the total number of transactions (useful whith paging)</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain used in the transaction</p>
</dd><dt>unit</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>Gold</span></span><p>To restrict the history to a single Unit</p>
</dd><dt>skip</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>30</span></span><p>The number of rows to skip</p>
</dd><dt>limit</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>10</span></span><p>The number of rows to return</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#97868a24957fa4ae454cd0ba52f3be42" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="97868a24957fa4ae454cd0ba52f3be42" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#0ccbb7bcfb361adc0fe28919efa6b2de" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0ccbb7bcfb361adc0fe28919efa6b2de" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{   "<span class="hljs-attribute">history</span>" : <span class="hljs-value">[
    { "<span class="hljs-attribute">ts</span>": <span class="hljs-value"><span class="hljs-string">"2014-08-27T16:44:17.796Z"</span></span>, "<span class="hljs-attribute">tx</span>": <span class="hljs-value">{ "<span class="hljs-attribute">Gold</span>": <span class="hljs-value"><span class="hljs-number">100</span> </span>}</span>, "<span class="hljs-attribute">desc</span>": <span class="hljs-value"><span class="hljs-string">"jsclient test"</span> </span>},
    { "<span class="hljs-attribute">ts</span>": <span class="hljs-value"><span class="hljs-string">"2014-08-27T16:02:22.645Z"</span></span>, "<span class="hljs-attribute">tx</span>": <span class="hljs-value">{ "<span class="hljs-attribute">Gold</span>": <span class="hljs-value">-<span class="hljs-number">100</span></span>, "<span class="hljs-attribute">Silver</span>": <span class="hljs-value"><span class="hljs-number">1</span> </span>}</span>, "<span class="hljs-attribute">desc</span>": <span class="hljs-value"><span class="hljs-string">"jsclient test"</span> </span>},
    { "<span class="hljs-attribute">ts</span>": <span class="hljs-value"><span class="hljs-string">"2014-08-27T16:02:22.371Z"</span></span>, "<span class="hljs-attribute">tx</span>": <span class="hljs-value">{ "<span class="hljs-attribute">Gold</span>": <span class="hljs-value"><span class="hljs-number">100</span> </span>}</span>, "<span class="hljs-attribute">desc</span>": <span class="hljs-value"><span class="hljs-string">"jsclient test"</span> </span>}
    ]</span>,
    "<span class="hljs-attribute">count</span>": <span class="hljs-value"><span class="hljs-number">3</span>
</span>}
</code></pre></li></ul></section><h4 id="transactions-">Resources&nbsp;<a href="#transactions-"><i class="fa fa-link"></i></a></h4><section id="transactions--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#transactions--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/tx/{domain}/balance</code></div></div><div class="panel-body"><p>Use this API to get the current balance. It will return a Hash of each unit and the amount held by the gamer.
The balance is also returned each time you create a new transaction</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain used in the transaction</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#97868a24957fa4ae454cd0ba52f3be42" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="97868a24957fa4ae454cd0ba52f3be42" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#a9ad6b04ed72051501060304be6c4c40" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a9ad6b04ed72051501060304be6c4c40" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">Gold</span>": <span class="hljs-value"><span class="hljs-number">130</span></span>,
    "<span class="hljs-attribute">Silver</span>": <span class="hljs-value"><span class="hljs-number">1.5</span></span>,
    "<span class="hljs-attribute">Arrows</span>": <span class="hljs-value"><span class="hljs-number">20</span>
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="gamer-properties">Gamer Properties&nbsp;<a href="#gamer-properties"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="gamer-properties-properties">Properties&nbsp;<a href="#gamer-properties-properties"><i class="fa fa-link"></i></a></h4><section id="gamer-properties-properties-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set properties</span></div><div style="float:left"><a href="#gamer-properties-properties-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}</code></div></div><div class="panel-body"><p>Properties are basic type (number, stringn boolean) json</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#68ed9969e407416e85d456d48615bceb" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="68ed9969e407416e85d456d48615bceb" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
    "<span class="hljs-attribute">Level</span>": <span class="hljs-value"><span class="hljs-number">20</span>
    <span class="hljs-string">"Expert"</span>: <span class="hljs-literal">false</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#4de2a43c688732a5198bdea2d6e88fcb" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4de2a43c688732a5198bdea2d6e88fcb" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">properties</span>" : <span class="hljs-value">{
        "<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
        "<span class="hljs-attribute">Level</span>": <span class="hljs-value"><span class="hljs-number">20</span>
        <span class="hljs-string">"Expert"</span>: <span class="hljs-literal">false</span>
    </span>}</span>,
    "<span class="hljs-attribute">updated</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section><section id="gamer-properties-properties-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get properties</span></div><div style="float:left"><a href="#gamer-properties-properties-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#053e775954bce88a174e1cf1ecc3f328" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="053e775954bce88a174e1cf1ecc3f328" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#c58aa24e06d0d7e6b2a5c449cb1e42fb" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c58aa24e06d0d7e6b2a5c449cb1e42fb" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">properties</span>" : <span class="hljs-value">{
        "<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
        "<span class="hljs-attribute">Level</span>" : <span class="hljs-value"><span class="hljs-number">20</span>
        <span class="hljs-string">"Expert"</span> : <span class="hljs-literal">false</span>
    </span>}
</span>}
</code></pre></li></ul></section><section id="gamer-properties-properties-delete" class="panel panel-danger"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">delete properties</span></div><div style="float:left"><a href="#gamer-properties-properties-delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#525c0f90496d93dfd12f8e4903ff5a7c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="525c0f90496d93dfd12f8e4903ff5a7c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#5db9c1248a197f355dd39a6364d127a2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5db9c1248a197f355dd39a6364d127a2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section><h4 id="gamer-properties-property">Property&nbsp;<a href="#gamer-properties-property"><i class="fa fa-link"></i></a></h4><p>Properties are used to allow match making…
They are related to a game.</p>
<section id="gamer-properties-property-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set property</span></div><div style="float:left"><a href="#gamer-properties-property-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}/{key}</code></div></div><div class="panel-body"><p>Properties are basic type (number, string, boolean) or array of basic type</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain</p>
</dd><dt>key</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>name of the property</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c4554e4b2b70c316c2c4fa328663f79f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c4554e4b2b70c316c2c4fa328663f79f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">value</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#b45edb6c26e4d11b50937e1562d651f1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b45edb6c26e4d11b50937e1562d651f1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">done</span>" : <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section><section id="gamer-properties-property-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get property</span></div><div style="float:left"><a href="#gamer-properties-property-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}/{key}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain</p>
</dd><dt>key</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>name of the property</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c1cb412ef48be16db18b51259171e0a0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c1cb412ef48be16db18b51259171e0a0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#8bd459444db5a44de97033e2f3ab3864" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8bd459444db5a44de97033e2f3ab3864" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span>
</span>}
</code></pre></li></ul></section><section id="gamer-properties-property-delete" class="panel panel-danger"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">delete property</span></div><div style="float:left"><a href="#gamer-properties-property-delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}/{key}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain</p>
</dd><dt>key</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>name of the property</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#5ccd80b9bada13d21b273b188d3161a9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5ccd80b9bada13d21b273b188d3161a9" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#50dcd938d608f878f36cdca12492e20e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="50dcd938d608f878f36cdca12492e20e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="social-features">Social features&nbsp;<a href="#social-features"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h2>Friends</h2>
<h4 id="social-features-">Resources&nbsp;<a href="#social-features-"><i class="fa fa-link"></i></a></h4><section id="social-features--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#social-features--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/friends/{domain}/{?status}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain handling relations</p>
</dd><dt>status</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<p>“blacklist” to retrieve the blacklisted gamer’s</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#328ced4ebada0cc0ef525bac8a847639" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="328ced4ebada0cc0ef525bac8a847639" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#e2a21a3104cad68968e258d0da108231" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="e2a21a3104cad68968e258d0da108231" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code><span class="hljs-collection">{ <span class="hljs-string">"friends|blacklisted"</span> : <span class="hljs-collection">[
    <span class="hljs-collection">{ <span class="hljs-string">"&lt;gamer_id_1&gt;"</span> : <span class="hljs-collection">{ displayName : <span class="hljs-string">"gamer1"</span>, lang : <span class="hljs-string">"en"</span> }</span> }</span>,
    <span class="hljs-collection">{<span class="hljs-string">"&lt;gamer_id_2&gt;"</span> : <span class="hljs-collection">{ displayName : <span class="hljs-string">"gamer2"</span>, lang : <span class="hljs-string">"fr"</span> }</span> }</span>
]</span> }</span>
</code></pre></li></ul></section><h4 id="social-features-">Resources&nbsp;<a href="#social-features-"><i class="fa fa-link"></i></a></h4><section id="social-features--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#social-features--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/friends/{domain}/{friendid}?{status}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain handling relations</p>
</dd><dt>friendid</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>a gamer id</p>
</dd><dt>status</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>must be one of [<code>add</code> | <code>forget</code> | <code>blacklist</code>]</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#3f14c9c6a657ef2dd2aa7135fe58fb9c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="3f14c9c6a657ef2dd2aa7135fe58fb9c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#d8089033fc8b4f193f2e52c52a6167a1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d8089033fc8b4f193f2e52c52a6167a1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">&lt;gamer_id&gt;</span>" : <span class="hljs-value"><span class="hljs-string">"&lt;status&gt;"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#c6384bae7985f0546b4733ca2903b431" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c6384bae7985f0546b4733ca2903b431" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"GamerIdNotFound"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#3f14c9c6a657ef2dd2aa7135fe58fb9c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="3f14c9c6a657ef2dd2aa7135fe58fb9c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#d8089033fc8b4f193f2e52c52a6167a1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d8089033fc8b4f193f2e52c52a6167a1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">&lt;gamer_id&gt;</span>" : <span class="hljs-value"><span class="hljs-string">"&lt;status&gt;"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#32a1cb00666aa67fcaae64f1efe5581e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="32a1cb00666aa67fcaae64f1efe5581e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"StatusNotFound"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>501</code></strong><a data-toggle="collapse" data-target="#1033efe221638046ec4e0f9928a9a431" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1033efe221638046ec4e0f9928a9a431" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"StatusNotSupported"</span>
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="sponsoring">Sponsoring&nbsp;<a href="#sponsoring"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="sponsoring-god-father">God father&nbsp;<a href="#sponsoring-god-father"><i class="fa fa-link"></i></a></h4><section id="sponsoring-god-father-put" class="panel panel-warning"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get sponsoring code</span></div><div style="float:left"><a href="#sponsoring-god-father-put" class="btn btn-xs btn-warning">PUT</a></div><div style="overflow:hidden"><code>/v2.6/gamer/godfather/{domain}</code></div></div><div class="panel-body"><p>Obtains a code for sponsoring. The code is different for each game</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain handling relations</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#4530c5da1e1d066060bbbff8a011c9ef" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4530c5da1e1d066060bbbff8a011c9ef" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#6960d67b7875bd0accc0b0c2a1dceb4a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6960d67b7875bd0accc0b0c2a1dceb4a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ "<span class="hljs-attribute">godfathercode</span>" : <span class="hljs-value"><span class="hljs-string">"wSde2dF"</span> </span>}
</code></pre></li></ul></section><section id="sponsoring-god-father-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set godfather</span></div><div style="float:left"><a href="#sponsoring-god-father-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/godfather/{domain}</code></div></div><div class="panel-body"><p>Set the godfather of the current user and give a reward to the godfather.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain handling relations</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#00252814d2b44673174d2394437a54a5" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="00252814d2b44673174d2394437a54a5" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code><span class="hljs-collection">{
    <span class="hljs-string">"godfather"</span>: <span class="hljs-string">"wSde2dF"</span>,
    <span class="hljs-string">"maturity"</span> : <span class="hljs-number">100</span>,
    <span class="hljs-string">"reward"</span> : <span class="hljs-collection">{
        transaction : <span class="hljs-collection">{ <span class="hljs-string">"gold"</span> : <span class="hljs-number">10</span>}</span>,
        description : <span class="hljs-string">"this is a reward tx"</span>,
        domain : <span class="hljs-string">"private"</span>
    }</span>
}</span>
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#3ad00d229a4f2f09d313811dd8c7fbaa" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="3ad00d229a4f2f09d313811dd8c7fbaa" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    <span class="hljs-string">"done"</span> : <span class="hljs-number">1</span>,
    <span class="hljs-string">"balance"</span> : {},
    <span class="hljs-string">"achievements : {}</span>
}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>438</code></strong><a data-toggle="collapse" data-target="#419612ab883c4851fd61b16d439ca880" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="419612ab883c4851fd61b16d439ca880" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"alreadyGodchild"</span>
</span>}
</code></pre></li></ul></section><section id="sponsoring-god-father-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get godfather</span></div><div style="float:left"><a href="#sponsoring-god-father-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/godfather/{domain}</code></div></div><div class="panel-body"><p>Retreive the godfather of the current user.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain handling relations</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c8bc79dfe022a0a3a1d2ce6ffcc3876c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c8bc79dfe022a0a3a1d2ce6ffcc3876c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#f5c7685d9b0578e4ccbc940a9fd7bdf7" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="f5c7685d9b0578e4ccbc940a9fd7bdf7" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">&lt;gamer_id&gt;</span>" : <span class="hljs-value"><span class="hljs-string">"..."</span>
</span>}
</code></pre></li></ul></section><h4 id="sponsoring-">Resources&nbsp;<a href="#sponsoring-"><i class="fa fa-link"></i></a></h4><section id="sponsoring--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#sponsoring--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/godchidren/{domain}</code></div></div><div class="panel-body"><p>Get every godchildren for the current user.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>the domain handling relations</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#49eb77d6113d1287d970af2247c9d831" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="49eb77d6113d1287d970af2247c9d831" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#a24bbc58b6685b5232e4dc93134fd791" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a24bbc58b6685b5232e4dc93134fd791" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">godchildren</span>" : <span class="hljs-value">[ { "<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"..."</span></span>}]
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="scores-and-leaderboards">Scores and Leaderboards&nbsp;<a href="#scores-and-leaderboards"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h2>Scores</h2>
<h4 id="scores-and-leaderboards-">Resources&nbsp;<a href="#scores-and-leaderboards-"><i class="fa fa-link"></i></a></h4><section id="scores-and-leaderboards--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#scores-and-leaderboards--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/scores/{domain}/{leaderboard}{?order}{&amp;force}</code></div></div><div class="panel-body"><p>This is not necessarily the highest score, but only the highest is stored.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain used for this leaderboard</p>
</dd><dt>leaderboard</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the board where the gamer score in</p>
</dd><dt>order</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>hightolow</span></span>&nbsp;<p>the order to sort the board <code>hightolow</code> or <code>lowtohigh</code></p>
</dd><dt>force</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>false</span></span>&nbsp;<p>if true, override any previous score</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#df7394d3b498bdff2cad1a3b0fdbb555" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="df7394d3b498bdff2cad1a3b0fdbb555" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">score</span>": <span class="hljs-value"><span class="hljs-number">100</span></span>,
    "<span class="hljs-attribute">info</span>" : <span class="hljs-value"><span class="hljs-string">"whatever json"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#5c2868a3b3079d16b89c6cf5e17415f7" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5c2868a3b3079d16b89c6cf5e17415f7" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ 
    "<span class="hljs-attribute">rank</span>" : <span class="hljs-value"><span class="hljs-number">1</span>
</span>}
</code></pre></li></ul></section><h4 id="scores-and-leaderboards-">Resources&nbsp;<a href="#scores-and-leaderboards-"><i class="fa fa-link"></i></a></h4><section id="scores-and-leaderboards--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#scores-and-leaderboards--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/scores/{domain}/{leaderboard}{?order}{&amp;type}{&amp;page}{&amp;count}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain used for this leaderboard</p>
</dd><dt>leaderboard</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the board where the gamer score in</p>
</dd><dt>order</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>hightolow</span></span>&nbsp;<p>deprecated, defaults to leaderboard’s ordering</p>
</dd><dt>type</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>highscore</span></span>&nbsp;<p>one of [&quot;highscore&quot;, “friendscore”]</p>
</dd><dt>page</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>1</span></span>&nbsp;<p>th epage number or a special “me” for centered scores</p>
</dd><dt>count</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>10</span></span>&nbsp;<p>the max returned rows</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#293c93547ad82288a5579db70fd53646" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="293c93547ad82288a5579db70fd53646" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#c9862fa65c714ada6b7edd22c8a2db1a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c9862fa65c714ada6b7edd22c8a2db1a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    <span class="hljs-string">"&lt;leaderboard&gt;"</span> : {
        <span class="hljs-string">"page"</span> : <span class="hljs-number">2</span>,
        <span class="hljs-string">"maxpage"</span> : <span class="hljs-number">100</span>,
        <span class="hljs-string">"rankOfFirst"</span> : <span class="hljs-number">10</span>,
<span class="hljs-label">        scores :</span> [ 
                { <span class="hljs-string">"gamer_id_1"</span>: 
<span class="hljs-label">                    { score : 100, info:</span> <span class="hljs-string">"whatever"</span>, , timestamp : <span class="hljs-string">""</span>, profile: {} } 
                }
                { <span class="hljs-string">"gamer_id_2"</span>: 
<span class="hljs-label">                    { score : 90, info:</span> <span class="hljs-string">"whatever"</span>, , timestamp : <span class="hljs-string">""</span>, profile: {} } 
                }
            ]
    }
}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#8d7ac2dfb9cd8957cc19c0427bd1a04e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8d7ac2dfb9cd8957cc19c0427bd1a04e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"LeaderboardNotFound"</span></span>,
}  
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>402</code></strong><a data-toggle="collapse" data-target="#7fb898f92f2f8b3f425a4205e4ff9a32" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="7fb898f92f2f8b3f425a4205e4ff9a32" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"NoScoreYet"</span></span>,
    "<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Asked for centered scores on a gamer who never scores"</span>
</span>}  
</code></pre></li></ul></section><h4 id="scores-and-leaderboards-">Resources&nbsp;<a href="#scores-and-leaderboards-"><i class="fa fa-link"></i></a></h4><section id="scores-and-leaderboards--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#scores-and-leaderboards--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/bestscores/{domain}</code></div></div><div class="panel-body"><h3>Get all the gamer’s bestscores</h3>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain used for this leaderboard</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#293c93547ad82288a5579db70fd53646" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="293c93547ad82288a5579db70fd53646" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#48073d00432b457e0d2b8eb6b4d0cff3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="48073d00432b457e0d2b8eb6b4d0cff3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    <span class="hljs-string">"easy"</span> : { <span class="hljs-string">score:</span><span class="hljs-number">100</span>, <span class="hljs-string">info :</span> <span class="hljs-string">"desc"</span> , <span class="hljs-string">timestamp :</span> <span class="hljs-string">""</span>}
    <span class="hljs-string">"meduim"</span> : { <span class="hljs-string">score:</span><span class="hljs-number">20</span>, <span class="hljs-string">info :</span> <span class="hljs-string">"desc"</span>, <span class="hljs-string">timestamp :</span> <span class="hljs-string">""</span> }
    <span class="hljs-string">"hard"</span> : { <span class="hljs-string">score:</span><span class="hljs-number">10</span>, <span class="hljs-string">info :</span> <span class="hljs-string">"desc"</span>, <span class="hljs-string">timestamp :</span> <span class="hljs-string">""</span> }
}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="events">Events&nbsp;<a href="#events"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>Clan of the Cloud let’s you send and receive messages between gamers.</p>
<p>You can use this feature for inter-application messaging too, and use it to send any kind of json message.</p>
<p>Ordered delivery is guaranteed, and acknowledgement (or auto-acknowledgement) of each message is required.</p>
<h4 id="events-">Resources&nbsp;<a href="#events-"><i class="fa fa-link"></i></a></h4><section id="events--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#events--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/event/{domain}/{gamer_id}</code></div></div><div class="panel-body"><h4>Send a message</h4>
<p>Use this API to send a message to another user from your game. Messages are sent to a specific user, in a specific domain.
You can use domains to send messages accross games (or use <code>private</code> for messages sent to your game only).</p>
<p>Messages are <strong>always</strong> JSON objects (not strings nor binary data).</p>
<p>The response body will contain a copy of the message just sent, with an added <code>id</code> field.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain</p>
</dd><dt>gamer_id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>5402cf700530df4fa7ed3629</span></span><p>The recepient for the message</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#99a0235302a097c79224d0561a3b345a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="99a0235302a097c79224d0561a3b345a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">key</span>": <span class="hljs-value"><span class="hljs-string">"value"</span></span>,
    "<span class="hljs-attribute">anotherKey</span>" : <span class="hljs-value"><span class="hljs-string">"another value"</span></span>,
    "<span class="hljs-attribute">data</span>" : <span class="hljs-value">[{
        "<span class="hljs-attribute">any</span>": <span class="hljs-value"><span class="hljs-string">"data"</span>
    </span>}]
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#8e363e60bce7fbc2c2a93256c7e9fa5e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8e363e60bce7fbc2c2a93256c7e9fa5e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>    {
        "<span class="hljs-attribute">id</span>" : <span class="hljs-value"><span class="hljs-string">"5cf3baf5-742c-4c3c-ad88-d12d84b01574"</span></span>,
        "<span class="hljs-attribute">key</span>": <span class="hljs-value"><span class="hljs-string">"value"</span></span>,
        "<span class="hljs-attribute">anotherKey</span>" : <span class="hljs-value"><span class="hljs-string">"another value"</span></span>,
        "<span class="hljs-attribute">data</span>" : <span class="hljs-value">[{
            "<span class="hljs-attribute">any</span>": <span class="hljs-value"><span class="hljs-string">"data"</span>
        </span>}]
    </span>}
</code></pre></li></ul></section><h4 id="events-">Resources&nbsp;<a href="#events-"><i class="fa fa-link"></i></a></h4><section id="events--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#events--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/event/{domain}{?ack}{&amp;timeout}</code></div></div><div class="panel-body"><h4>Receive messages</h4>
<p>This route uses long polling to deliver messages, one at a time. If more than one message was queued, you will have to call <code>receive</code> more than once.
Normally, you’d setup a loop to call <code>receive</code> and deliver messages to your game asynchronously.</p>
<p><code>Receive</code> will block for a specified amount of time (with <code>?timeout=ms</code>) or 50 seconds (the default), and will be unblocked if a message is received, or if the call times out.
When a message is received, the HTTP status code is <code>200</code>. If it returns because of the timeout, the response code is <code>204</code>.</p>
<p>To guarantee delivery, acknowledgement is necessary, but you can use automatic acknowledgement (<code>?ack=auto</code>).
If you want to ack messages, pass <code>?ack=&lt;messageId&gt;</code> where <code>messageID</code> is the ID of the latest received message.
If you don’t specify an <code>?ack</code> parameter, the message is received with no ackowledgement (to bootstrap the loop).</p>
<p>Choose if you want auto or acknowlegement as it can get hairy to mix both.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain</p>
</dd><dt>ack</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>auto</span></span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>5cf3baf5-742c-4c3c-ad88-d12d84b01574</span></span><p>The message ID to acknowledge</p>
</dd><dt>timeout</dt><dd><code>integer</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>50000</span></span>&nbsp;<p>The long polling timeout, in milliseconds</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#d43b969b80bcde352fe5619b6703987e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d43b969b80bcde352fe5619b6703987e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#1aeb965db3bb6dffb4b66fb7a4601f8d" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1aeb965db3bb6dffb4b66fb7a4601f8d" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>    {
        "<span class="hljs-attribute">id</span>" : <span class="hljs-value"><span class="hljs-string">"5cf3baf5-742c-4c3c-ad88-d12d84b01574"</span></span>,
        "<span class="hljs-attribute">key</span>": <span class="hljs-value"><span class="hljs-string">"value"</span></span>,
        "<span class="hljs-attribute">anotherKey</span>" : <span class="hljs-value"><span class="hljs-string">"another value"</span></span>,
        "<span class="hljs-attribute">data</span>" : <span class="hljs-value">[{
            "<span class="hljs-attribute">any</span>": <span class="hljs-value"><span class="hljs-string">"data"</span>
        </span>}]
    </span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>204</code></strong></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="achievements">Achievements&nbsp;<a href="#achievements"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>Clan of the Cloud provides functionality allowing to save the progress of the player and triggering Achievements, like on most popular platforms. This system is device independent and provides the tools required to notify Clan of the Cloud from progress and querying the status of achievements.</p>
<p>Achievements share functionality with the Transaction system. This is because the key/value storage affected by transactions are used to trigger achievements.</p>
<h4 id="achievements-">Resources&nbsp;<a href="#achievements-"><i class="fa fa-link"></i></a></h4><section id="achievements--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#achievements--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/achievements/{domain}</code></div></div><div class="panel-body"><h4>List achievements</h4>
<p>Use this API to list the achievements available for your game, along with, for each of them, the progress of the gamer logged in.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain, use <code>private</code> to return the default achievemens created for your game in the Front Office</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#9ff467287dfe45a5758aa2ff22602409" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="9ff467287dfe45a5758aa2ff22602409" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#ed1ab3c62d88aee40f112b103f0c880a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="ed1ab3c62d88aee40f112b103f0c880a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">achievements</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">highScore</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"limit"</span></span>,
            "<span class="hljs-attribute">config</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">maxValue</span>": <span class="hljs-value"><span class="hljs-number">1000</span></span>,
                "<span class="hljs-attribute">unit</span>": <span class="hljs-value"><span class="hljs-string">"score"</span>
            </span>}</span>,
            "<span class="hljs-attribute">gameData</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">initiallyHidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
            </span>}</span>,
            "<span class="hljs-attribute">gamerData</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">unhidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
            </span>}</span>,
            "<span class="hljs-attribute">progress</span>": <span class="hljs-value"><span class="hljs-number">0.06</span>
        </span>}
    </span>}
</span>}
</code></pre></li></ul></section><h4 id="achievements-custom-information-about-an-achievement">Custom information about an achievement&nbsp;<a href="#achievements-custom-information-about-an-achievement"><i class="fa fa-link"></i></a></h4><section id="achievements-custom-information-about-an-achievement-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set custom information about an achievement, for an user</span></div><div style="float:left"><a href="#achievements-custom-information-about-an-achievement-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/achievements/{domain}/{achievement}/gamerdata</code></div></div><div class="panel-body"><p>Use this API to set the custom data associated with a gamer for a given achievement. This data is associated between a gamer and an achievement, so you might for instance store data on how the achievement was performed.
The whole achievement, as modified is returned.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain, use <code>private</code> to return the default achievemens created for your game in the Front Office</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#a90f10421690c2d46f72d772494a845c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a90f10421690c2d46f72d772494a845c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">unhidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#86466e39ad1773f63e696915c90bb7cc" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="86466e39ad1773f63e696915c90bb7cc" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">achievement</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"limit"</span></span>,
        "<span class="hljs-attribute">config</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">maxValue</span>": <span class="hljs-value"><span class="hljs-number">1000</span></span>,
            "<span class="hljs-attribute">unit</span>": <span class="hljs-value"><span class="hljs-string">"score"</span>
        </span>}</span>,
        "<span class="hljs-attribute">gameData</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">initiallyHidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
        </span>}</span>,
        "<span class="hljs-attribute">gamerData</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">unhidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
        </span>}</span>,
        "<span class="hljs-attribute">progress</span>": <span class="hljs-value"><span class="hljs-number">0.06</span>
    </span>}
</span>}
</code></pre></li></ul></section><section id="achievements-custom-information-about-an-achievement-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Extract custom information about an achievement</span></div><div style="float:left"><a href="#achievements-custom-information-about-an-achievement-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/achievements/{domain}/{achievement}/gamerdata</code></div></div><div class="panel-body"><p>Use this API to fetch the custom data associated with a gamer for a given achievement.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain, use <code>private</code> to return the default achievemens created for your game in the Front Office</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#0dafd93344d8bbec7eb7b21090481554" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0dafd93344d8bbec7eb7b21090481554" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#d3daa42cfff1c589defe7bb6e18671fa" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d3daa42cfff1c589defe7bb6e18671fa" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">gamerData</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">unhidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
    </span>}</span>,
}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="matches">Matches&nbsp;<a href="#matches"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>Clan of the Cloud provides a simple way to run matches between a set of gamers using on the network. The match system is designed around a centralized game state stored on Clan of the Cloud servers, with gamers participating to the match making a move, updating the global game state and notifying the other players on an asynchronous basis.</p>
<p>This means that this match system is better suited to turn by turn game, rather than real time game such as an MMORPG, which may require a more sophisticated system handled on your servers.</p>
<p>As with other functionality, matches are scoped by domain, allowing to share data amongst multiple games. For more information, please take a look at the section <a href="#keyvaluestore">Key-Value Store</a>.</p>
<h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches{?domain}</code></div></div><div class="panel-body"><p>Creates a new match, automatically attached to your gamer ID. Only the <code>maxPlayers</code> node is required.</p>
<h3>Description of a match</h3>
<table>
<thead>
<tr><th>Field</th><th>Description</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>_id</td><td>string</td><td>ID of the match, keep it safe to allow for joining it or fetching it later (read only)</td></tr>
<tr><td>creator</td><td>string</td><td>ID of the gamer who created the game (read only)</td></tr>
<tr><td>customProperties</td><td>json</td><td>JSON containing the user properties of the match (only one level, with numbers or strings as values)</td></tr>
<tr><td>domain</td><td>string</td><td>domain to which the match belongs; used for scoping purposes (read only)</td></tr>
<tr><td>description</td><td>string</td><td>description of the game (non localized)</td></tr>
<tr><td>globalState</td><td>json</td><td>global state of the match, which may be used to reconstruct the game locally (read only)</td></tr>
<tr><td>lastEventId</td><td>string</td><td>ID of the last event, which must be passed by any player who wishes to make a move (read only)</td></tr>
<tr><td>maxPlayers</td><td>number</td><td>maximum number of players who can join this game</td></tr>
<tr><td>events</td><td>json</td><td>list of pending events, cleared whenever a globalState is posted along with a move by one of the players (read only)</td></tr>
<tr><td>players</td><td>array</td><td>list of IDs of players participating to the match (read only)</td></tr>
<tr><td>seed</td><td>31-bit integer</td><td>a random number generated upon match creation, to be used by players</td></tr>
<tr><td>shoe</td><td>array</td><td>an array of objects that are shuffled when the match starts. You can put anything you want inside and use it as values for your next game.</td></tr>
<tr><td>status</td><td>string</td><td>either “running” (meaning that the match is running), either “finished” (meaning that nobody can join the match anymore) (read only)</td></tr>
</tbody>
</table>
<p>The response of most calls only include basic properties. To get all properties, including the global state and event list, you must either create, join or fetch a single match.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain on which to place the match (use private by default for a domain that is scoped for your game)</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#092f1aa54484d66251d53d8091e851c9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="092f1aa54484d66251d53d8091e851c9" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
    "<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span>
    <span class="hljs-string">"customProperties"</span>: {
        "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
    </span>}</span>,
    "<span class="hljs-attribute">globalState</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">startup</span>": <span class="hljs-value"><span class="hljs-string">"globalState"</span>
    </span>}</span>,
    "<span class="hljs-attribute">shoe</span>": <span class="hljs-value">[<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>, <span class="hljs-number">5</span>, <span class="hljs-number">6</span>, <span class="hljs-number">7</span>, <span class="hljs-number">8</span>, <span class="hljs-number">9</span>, <span class="hljs-number">10</span>]
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#10ed7cc09c9db3f2905ec4c4763185c3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="10ed7cc09c9db3f2905ec4c4763185c3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"54919c51f8d8690000fe5f6c"</span></span>,
        "<span class="hljs-attribute">creator</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"54919c510bfa2100001bd548"</span></span>,
            "<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
                "<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
            </span>}
        </span>}</span>,
        "<span class="hljs-attribute">customProperties</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">other</span>": <span class="hljs-value"><span class="hljs-string">"property"</span></span>,
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
        </span>}</span>,
        "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
        "<span class="hljs-attribute">domain</span>": <span class="hljs-value"><span class="hljs-string">"private"</span></span>,
        "<span class="hljs-attribute">events</span>": <span class="hljs-value">[]</span>,
        "<span class="hljs-attribute">globalState</span>": <span class="hljs-value">{}</span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"54919c51f8d8690000fe5f6b"</span></span>,
        "<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span></span>,
        "<span class="hljs-attribute">players</span>": <span class="hljs-value">[
            {
                "<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"54919c510bfa2100001bd548"</span></span>,
                "<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
                    "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
                    "<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
                </span>}
            </span>}
        ]</span>,
        "<span class="hljs-attribute">seed</span>": <span class="hljs-value"><span class="hljs-number">1089745184</span></span>,
        "<span class="hljs-attribute">shoe</span>":<span class="hljs-value">[<span class="hljs-number">2</span>,<span class="hljs-number">3</span>,<span class="hljs-number">4</span>,<span class="hljs-number">1</span>,<span class="hljs-number">10</span>,<span class="hljs-number">9</span>,<span class="hljs-number">7</span>,<span class="hljs-number">6</span>,<span class="hljs-number">5</span>,<span class="hljs-number">8</span>]</span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
    </span>}
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#matches--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/matches{?domain}{&amp;properties}{&amp;participating}{&amp;finished}{&amp;invited}</code></div></div><div class="panel-body"><p>Lists the matches available for join, using a query to filter the results.</p>
<h3>Filtering by properties</h3>
<p>Matches contain an user defined field named <code>customProperties</code>, which can be used by developers to store and fetch additional details about a game. In the example of a card-based game, one of these properties could store the minimum bet. This information could also be used to help players to join games best suited to their willing. A filter is specified as an URL-encoded JSON containing attributes and the corresponding expected value. No comparison operators are available for now, now is it possible to customize the implementation : when there are more than one attributes, all conditions specified must be met in order for the match to qualify.</p>
<p>The following will return the matches which have a property named type with value being &quot;coop&quot;.
<code>GET /v1/gamer/matches?domain=private&amp;properties={&quot;type&quot;: &quot;coop&quot;}</code></p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the domain on which to look for matches (use private by default for a domain that is scoped for your game)</p>
</dd><dt>properties</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>a JSON string specifying the properties that need to be present in order to return a match. The JSON uses the filtering syntax as documented above.</p>
</dd><dt>participating</dt><dd><code></code>&nbsp;<span>(optional)</span>&nbsp;<p>pass this parameter to only list matches to which you are participating.</p>
</dd><dt>finished</dt><dd><code></code>&nbsp;<span>(optional)</span>&nbsp;<p>pass this to include finished matches in the result. Not recommended but can be used with the <code>participating</code> filter to gather info about your past games.</p>
</dd><dt>invited</dt><dd><code></code>&nbsp;<span>(optional)</span>&nbsp;<p>pass this to filter by matches to which you are currently invited. You are only marked as invited to a match until you join it.</p>
</dd><dt>limit</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<p>the maximum number of matches to return. Used for pagination. Defaults to 30.</p>
</dd><dt>skip</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<p>the index of the first item to return. Used for pagination. Zero-based, defaults to 0.</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#10a9b310e3a8551dac0933c4b23beab1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="10a9b310e3a8551dac0933c4b23beab1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#6d03de4c01eb6e777c4c1a8c0a3011e2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6d03de4c01eb6e777c4c1a8c0a3011e2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">count</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
    "<span class="hljs-attribute">matches</span>": <span class="hljs-value">[
        {
            "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"548721c15b06a5fec3315a97"</span></span>,
            "<span class="hljs-attribute">creator</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"548721c15b06a5fec3315a95"</span></span>,
                "<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
                    "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
                    "<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
                </span>}
            </span>}</span>,
            "<span class="hljs-attribute">customProperties</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">other</span>": <span class="hljs-value"><span class="hljs-string">"property"</span></span>,
                "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
            </span>}</span>,
            "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
            "<span class="hljs-attribute">domain</span>": <span class="hljs-value"><span class="hljs-string">"private"</span></span>,
            "<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span></span>,
            "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
        </span>},
    ]
</span>}
</code></pre></li></ul></section><h4 id="matches-working-with-a-match">Working with a match&nbsp;<a href="#matches-working-with-a-match"><i class="fa fa-link"></i></a></h4><section id="matches-working-with-a-match-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Fetching in-depth information about a match</span></div><div style="float:left"><a href="#matches-working-with-a-match-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{match_id}</code></div></div><div class="panel-body"><p>Fetches a given match. The response looks slightly different from that of a list of matches, but the data reported for the match is the same.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>match_id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the ID of the match as previously returned.</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#896a57dbf56d73232a2549f27ebf466b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="896a57dbf56d73232a2549f27ebf466b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#6a2ca8501ca7eb3a9a32bfc096ff099c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6a2ca8501ca7eb3a9a32bfc096ff099c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"548724abfe4ce589c6f81d22"</span></span>,
        "<span class="hljs-attribute">creator</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"548724abfe4ce589c6f81d20"</span></span>,
            "<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
                "<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
            </span>}
        </span>}</span>,
        "<span class="hljs-attribute">customProperties</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">other</span>": <span class="hljs-value"><span class="hljs-string">"property"</span></span>,
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
        </span>}</span>,
        "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
        "<span class="hljs-attribute">domain</span>": <span class="hljs-value"><span class="hljs-string">"private"</span></span>,
        "<span class="hljs-attribute">events</span>": <span class="hljs-value">[]</span>,
        "<span class="hljs-attribute">globalState</span>": <span class="hljs-value">{}</span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"548724ab612bff89c680e179"</span></span>,
        "<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span></span>,
        "<span class="hljs-attribute">players</span>": <span class="hljs-value">[
            {
                "<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"548724abfe4ce589c6f81d20"</span></span>,
                "<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
                    "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
                    "<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
                </span>}
            </span>}
        ]</span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#d954b980157ebb0564bf8214428f63d7" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d954b980157ebb0564bf8214428f63d7" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"InvalidMatch"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"The match does not exist"</span></span>,
    "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-number">404</span>
</span>}
</code></pre></li></ul></section><section id="matches-working-with-a-match-delete" class="panel panel-danger"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Deleting a match</span></div><div style="float:left"><a href="#matches-working-with-a-match-delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{match_id}</code></div></div><div class="panel-body"><p>Deletes a match, erasing it along with its history. You need to be the creator of the match to perform this operation.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>match_id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<p>the ID of the match to delete.</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#153e5d3886c580e034403e8433369678" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="153e5d3886c580e034403e8433369678" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#cdf3d6716b538376a9cf74298f9f5557" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="cdf3d6716b538376a9cf74298f9f5557" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-number">1</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>431</code></strong><a data-toggle="collapse" data-target="#dff96fa0d0c3e33b237be86e54adc642" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="dff96fa0d0c3e33b237be86e54adc642" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"MatchNotFinished"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This match needs to be finished in order to perform this operation"</span>
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{id}/join</code></div></div><div class="panel-body"><p>Join an existing match.</p>
<p>A field named <code>osn</code> can be passed as shown in the sample request to send a push notification to the users who are not active at the moment.</p>
<h3>Events related to matches</h3>
<p>Any player who has joined the match will automatically receive events indicating changes made to the match. These events happen when a player joins the match, leaves it or posts a move.</p>
<p>These events must be processed by each player prior to issuing additional commands. To do so, there is a parameter, called <code>lastEventId</code> that is required on some resources and must be set to the ID of the last event from the match. Among other things, this allows to detect race conditions and guarantee the integrity of the game.</p>
<p>This last event comes in two forms: either as a result of a match operation (in which case you can simply pick the <code>lastEventId</code> field within the server response) if you were the one initating it, or as the <code>event._id</code> field of the last received event.</p>
<p>In case a player joins the match, the following event will be received by other players:</p>
<pre><code>{
    &quot;type&quot;: &quot;match.join&quot;,
    &quot;event&quot;: {
        &quot;_id&quot;: &quot;548866edba0ec600005e1941&quot;,
        &quot;match_id&quot;: &quot;548866ed74c2e0000098db95&quot;,
        &quot;playersJoined&quot;: [
            {
                &quot;gamer_id&quot;: &quot;548866ed74c2e0000098db94&quot;,
                &quot;profile&quot;: {
                    &quot;displayName&quot;: &quot;Guest&quot;,
                    &quot;lang&quot;: &quot;en&quot;
                }
            }
        ]
    },
    &quot;id&quot;: &quot;9155987d-6322-46d4-9403-e90ab4ba5fa3&quot;
}
</code></pre>
<p>In case a player leaves the match, similarly the following event will be received by others:</p>
<pre><code>{
    &quot;type&quot;: &quot;match.leave&quot;,
    &quot;event&quot;: {
        &quot;_id&quot;: &quot;548866eeba0ec600005e1948&quot;,
        &quot;match_id&quot;: &quot;548866ed74c2e0000098db95&quot;,
        &quot;playersLeft&quot;: [
            {
                &quot;gamer_id&quot;: &quot;548866ed74c2e0000098db94&quot;,
                &quot;profile&quot;: {
                    &quot;displayName&quot;: &quot;Guest&quot;,
                    &quot;lang&quot;: &quot;en&quot;
                }
            }
        ]
    },
    &quot;id&quot;: &quot;5007fd0a-1365-4e87-aba8-5d916731e684&quot;
}
</code></pre>
<p>In case the match is marked as finished, the following event will be broadcasted to all players except the one who initiated it.</p>
<pre><code>{
    &quot;type&quot;: &quot;match.finish&quot;,
    &quot;event&quot;: {
        &quot;_id&quot;: &quot;54784d07a0fcf2000086457d&quot;,
        &quot;finished&quot;: 1,
        &quot;match_id&quot;: &quot;54784d07f10c190000cb96e3&quot;
    },
    &quot;id&quot;: &quot;d2f908d1-40d8-4f73-802e-fe0086bb6cd5&quot;
}
</code></pre>
<p>In case an element was drawn from the shoe, an event like this is fired:</p>
<pre><code>{
    &quot;type&quot;: &quot;match.shoedraw&quot;,
    &quot;event&quot;: {
        &quot;_id&quot;: &quot;5492a7c7a6725f0000b59e4f&quot;,
        &quot;count&quot;: 2,
        &quot;match_id&quot;: &quot;5492a7c6a6725f0000b59e46&quot;
    },
    &quot;id&quot;: &quot;5e4e82c1-d728-4a4b-be40-e4abec320440&quot;
}
</code></pre>
<p>Events are broadcasted in other situations, such as moves, but they are described within the related call documentation.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#1d918285618502023bf9baea3b1c5041" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1d918285618502023bf9baea3b1c5041" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>Parameters
<ul>
<li>id (required, string) … the ID of the match to join.</li>
</ul></li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">osn</span>": <span class="hljs-value">{"<span class="hljs-attribute">en</span>": <span class="hljs-value"><span class="hljs-string">"I just joined!"</span></span>, "<span class="hljs-attribute">ja</span>": <span class="hljs-value"><span class="hljs-string">"tadaima!"</span></span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#ba320ca5c2db4917895936bb5b979eb1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="ba320ca5c2db4917895936bb5b979eb1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"5487260cf45e5f84c7cd7225"</span></span>,
        "<span class="hljs-attribute">creator</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"5487260cf45e5f84c7cd7223"</span></span>,
            "<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
                "<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
            </span>}
        </span>}</span>,
        "<span class="hljs-attribute">customProperties</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">other</span>": <span class="hljs-value"><span class="hljs-string">"property"</span></span>,
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
        </span>}</span>,
        "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
        "<span class="hljs-attribute">domain</span>": <span class="hljs-value"><span class="hljs-string">"private"</span></span>,
        "<span class="hljs-attribute">events</span>": <span class="hljs-value">[
            {
                "<span class="hljs-attribute">event</span>": <span class="hljs-value">{
                    "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"5487260c1d449b84c728d956"</span></span>,
                    "<span class="hljs-attribute">playersJoined</span>": <span class="hljs-value">[
                        <span class="hljs-string">"5487260cf45e5f84c7cd7224"</span>
                    ]
                </span>}</span>,
                "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"match.join"</span>
            </span>}
        ]</span>,
        "<span class="hljs-attribute">globalState</span>": <span class="hljs-value">{}</span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"5487260c1d449b84c728d956"</span></span>,
        "<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span></span>,
        "<span class="hljs-attribute">players</span>": <span class="hljs-value">[
            {
                "<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"5487260cf45e5f84c7cd7223"</span></span>,
                "<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
                    "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
                    "<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
                </span>}
            </span>},
            {
                "<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"5487260cf45e5f84c7cd7224"</span></span>,
                "<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
                    "<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
                    "<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
                </span>}
            </span>}
        ]</span>,
        "<span class="hljs-attribute">seed</span>": <span class="hljs-value"><span class="hljs-number">1089745184</span></span>,
        "<span class="hljs-attribute">shoe</span>":<span class="hljs-value">[<span class="hljs-number">2</span>,<span class="hljs-number">3</span>,<span class="hljs-number">4</span>,<span class="hljs-number">1</span>,<span class="hljs-number">10</span>,<span class="hljs-number">9</span>,<span class="hljs-number">7</span>,<span class="hljs-number">6</span>,<span class="hljs-number">5</span>,<span class="hljs-number">8</span>]</span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#6111a59496d79ca45fcf0f0fe288f71b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6111a59496d79ca45fcf0f0fe288f71b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"InvalidMatch"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"The match does not exist"</span></span>,
    "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-number">404</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>431</code></strong><a data-toggle="collapse" data-target="#6ea07e15a2468098acd88caefc1fcf69" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6ea07e15a2468098acd88caefc1fcf69" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"AlreadyJoinedMatch"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"You are already being part of this match"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>431</code></strong><a data-toggle="collapse" data-target="#4428272586d8cef51b47042e09be0cc3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4428272586d8cef51b47042e09be0cc3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"MaximumNumberOfPlayersReached"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This match can not accept any additional player"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>433</code></strong><a data-toggle="collapse" data-target="#4dc3e965b2440ade6c1d89c96a97480b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4dc3e965b2440ade6c1d89c96a97480b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"BadMatchID"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This match does not exist or is not active"</span>
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{id}/leave</code></div></div><div class="panel-body"><p>Leave a match. This only works if you are currently part of the match, or you will get an HTTP 433.</p>
<p>A field named <code>osn</code> can be passed as shown in the sample request to send a push notification to the users who are not active at the moment.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#5eb73f07d8529dd41aed910b1a4170f3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5eb73f07d8529dd41aed910b1a4170f3" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>Parameters
<ul>
<li>match_id (required, string) … the ID of the match to operate on.</li>
</ul></li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">osn</span>": <span class="hljs-value">{"<span class="hljs-attribute">en</span>": <span class="hljs-value"><span class="hljs-string">"Bye bye!"</span></span>, "<span class="hljs-attribute">fi</span>": <span class="hljs-value"><span class="hljs-string">"Näkemiin!"</span></span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#0e3d66cf82e418b41f5ee2ffa0a5c3c9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0e3d66cf82e418b41f5ee2ffa0a5c3c9" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"548726461c4158b4c73d43fa"</span></span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"5487264710de0db4c71fe752"</span></span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"finished"</span>
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#6111a59496d79ca45fcf0f0fe288f71b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6111a59496d79ca45fcf0f0fe288f71b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"InvalidMatch"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"The match does not exist"</span></span>,
    "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-number">404</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>433</code></strong><a data-toggle="collapse" data-target="#4dc3e965b2440ade6c1d89c96a97480b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4dc3e965b2440ade6c1d89c96a97480b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"BadMatchID"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This match does not exist or is not active"</span>
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{id}/invite/{gamer_id}</code></div></div><div class="panel-body"><p>Allows to invite another person to a match. Should be used with private matches. Matches can be made private by using a filter when listing matches. For instance, you may require a property to be present in the match, such as <code>customProperties: {&quot;public&quot;: 1}</code> and filter out by <code>?properties={&quot;public&quot;: 1}</code> when listing the matches available. In that case, if you want to play against a given set of opponents, you may simply limit the maximum number of players, and invite each of your opponents.</p>
<p>When someone is invited, a message as follows will be received:</p>
<pre><code>{
    &quot;type&quot;: &quot;match.invite&quot;,
    &quot;event&quot;: {
        &quot;_id&quot;: &quot;54784d07a0fcf2000086457d&quot;,
        &quot;match_id&quot;: &quot;54784d07f10c190000cb96e3&quot;
        &quot;inviter&quot;: {
            &quot;gamer_id&quot;: &quot;5487260cf45e5f84c7cd7223&quot;,
            &quot;profile&quot;: {
                &quot;displayName&quot;: &quot;Guest&quot;,
                &quot;lang&quot;: &quot;en&quot;
            }
        }
    },
    &quot;id&quot;: &quot;d2f908d1-40d8-4f73-802e-fe0086bb6cd9&quot;
}
</code></pre>
<p>A field named <code>osn</code> can be passed as shown in the sample request to send a push notification to the users who are not active at the moment.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c70c91326d268be40011a2b1fcc83fb6" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c70c91326d268be40011a2b1fcc83fb6" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>Parameters
<ul>
<li>id (required, string) … the ID of the match to operate on.</li>
<li>gamer_id (required, string) … the ID of the gamer to invite on this match.</li>
</ul></li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">osn</span>": <span class="hljs-value">{"<span class="hljs-attribute">en</span>": <span class="hljs-value"><span class="hljs-string">"Please join my super duper game!"</span></span>, "<span class="hljs-attribute">it</span>": <span class="hljs-value"><span class="hljs-string">"Sei invitato!"</span></span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#436066066fb5e2ff028f22b339277008" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="436066066fb5e2ff028f22b339277008" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"5488121cebc67955fb8f42e2"</span></span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"5488121c4d95f055fbadde9a"</span></span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>431</code></strong><a data-toggle="collapse" data-target="#b8f8148d3c6acd4c174b67524f34ce78" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b8f8148d3c6acd4c174b67524f34ce78" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"The player is already invited to the match"</span></span>,
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"AlreadyInvitedToMatch"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>433</code></strong><a data-toggle="collapse" data-target="#b53bdc09fafef162526f5fa102d803c9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b53bdc09fafef162526f5fa102d803c9" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"A passed gamer ID is invalid"</span></span>,
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"BadGamerID"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>433</code></strong><a data-toggle="collapse" data-target="#4dc3e965b2440ade6c1d89c96a97480b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4dc3e965b2440ade6c1d89c96a97480b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"BadMatchID"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This match does not exist or is not active"</span>
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--delete" class="panel panel-danger"><div class="panel-heading"><div style="float:left"><a href="#matches--delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{id}/invitation</code></div></div><div class="panel-body"><p>Allows to dismiss an invitation to a match. Works for the authenticated gamer and only if the gamer has been invited previously.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#a3656c83b8fb19d3d27142f2888f63ea" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a3656c83b8fb19d3d27142f2888f63ea" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>Parameters
<ul>
<li>id (required, string) … the ID of the match to operate on.</li>
</ul></li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#bb63e0bca091009aefb8cb2a69e49061" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="bb63e0bca091009aefb8cb2a69e49061" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"5488121cebc67955fb8f42e2"</span></span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"5488121c4d95f055fbadde9a"</span></span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>433</code></strong><a data-toggle="collapse" data-target="#16e358d1b6fa189a9d6c83fcc112d1c3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="16e358d1b6fa189a9d6c83fcc112d1c3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"BadMatchID"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This match does not exist or is not active"</span>
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{id}/move{?lastEventId}</code></div></div><div class="panel-body"><p>Posts a move. This will notify a progress in the match. Note that the <code>globalState</code> is updated incrementally, according to the passed attributes. This means that attributes not passed do not get modified or deleted from the <code>globalState</code> stored for this game.
This only works if you are currently part of the match, or you will get an HTTP 433.</p>
<p>A field named <code>osn</code> can be passed as shown in the sample request to send a push notification to the users who are not active at the moment.</p>
<h3>Making moves</h3>
<p>Once a match has been started, any player currently belonging to the game is allowed to make moves. It is up to the game itself to determine which players may play and when.</p>
<p>However, one is only allowed to post a move if he is synchronized with the current state of the game. This is done with a parameter named <code>lastEventId</code>. Every move made by one of the players, this value changes and is returned in the message posted to the other players. The next player must post this value along with his next move, else he will receive an error indicating that he needs to be resynchronized.</p>
<p>A move is made of a <code>move</code> object (which is basically freeform, and represents a message that will be sent to other players indicating what changed) and an optional game state labelled <code>globalState</code>. A global game state sould be enough for any player who joins the game to restore the game locally. Thus, when a global state is posted, the list of moves is cleared on the server: only the moves made since the last global state are kept and posted to people who join the game. As such, one can reconstruct the current game by starting from the global state and applying the pending moves.</p>
<p>When a move is posted, all players get notified in the form of an event, looking as follows:</p>
<pre><code>{
    &quot;type&quot;: &quot;match.move&quot;,
    &quot;event&quot;: {
        &quot;_id&quot;: &quot;54784176a8df72000049340e&quot;,
        &quot;player_id&quot;: &quot;547841755e4cfe0000bf6907&quot;,
        &quot;move&quot;: {
            &quot;what&quot;: &quot;changed&quot;
        }
    },
    &quot;id&quot;: &quot;d0fb71c1-3cd0-4bbd-a9ec-29cb46cf9203&quot;
}
</code></pre>
<p>Important thing: the <code>globalState</code> node only includes what has changed, not the whole global state of the match.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#98173a21126c3efca3eaccc8516acd3c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="98173a21126c3efca3eaccc8516acd3c" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>Parameters
<ul>
<li>lastEventId (required, string) … the ID of the last move, as received in the body of the match received when joining, or the value received in the last event. Allows to make sure that you are synchronized with the match before making a move.</li>
<li>id (required, string) … the ID of the match to operate on.</li>
</ul></li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">move</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">what</span>": <span class="hljs-value"><span class="hljs-string">"changed"</span>
    </span>}</span>,
    "<span class="hljs-attribute">globalState</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">full</span>": <span class="hljs-value"><span class="hljs-string">"game_state"</span>
    </span>}</span>,
    "<span class="hljs-attribute">osn</span>": <span class="hljs-value">{"<span class="hljs-attribute">en</span>": <span class="hljs-value"><span class="hljs-string">"It is now your turn!"</span></span>, "<span class="hljs-attribute">de</span>": <span class="hljs-value"><span class="hljs-string">"Spielen Sie jetzt!"</span></span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#0e3d66cf82e418b41f5ee2ffa0a5c3c9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0e3d66cf82e418b41f5ee2ffa0a5c3c9" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"548726461c4158b4c73d43fa"</span></span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"5487264710de0db4c71fe752"</span></span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"finished"</span>
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>400</code></strong><a data-toggle="collapse" data-target="#d37feba02ec8b0a96f8bb6d425490834" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d37feba02ec8b0a96f8bb6d425490834" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"MissingParameter"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"The parameter is invalid or absent: lastEventId"</span></span>,
    "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-number">400</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>431</code></strong><a data-toggle="collapse" data-target="#f190d9ece33808f8e73487c19305c46c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="f190d9ece33808f8e73487c19305c46c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"InvalidLastMoveId"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This move ID is invalid, please resynchronize"</span>
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{id}/shoe/draw{?count}{&amp;lastEventId}</code></div></div><div class="panel-body"><p>Draws an element from the shoe. Works if an array has been posted as shoe when creating the match.</p>
<p>A field named <code>osn</code> can be passed as shown in the sample request to send a push notification to the users who are not active at the moment.</p>
<h3>Working with the shoe</h3>
<p>Along with the seed element that is returned with the detailed version of the match (i.e. when joining or fetching it), the shoe is another element that helps building random generator-based games.</p>
<p>A shoe, as in Casino, is basically a container of possible values that are returned in a random order as they are poked. It could represent the values of the cards for instance. It is possible to have more than once the same element in the shoe (as when having two card sets). The shoe is posted by the person who creates the game and then shuffled. The shoe will remain hidden, with no one having access to it, until the match is finished.</p>
<p>Players can draw one or more elements off the shoe by posting a request to this resource. The shoe is shared with all players, meaning that any element from the shoe is returned only once to a player having requested it.</p>
<p>When all items have been drawn from the shoe and more items are requested, the existing serie is duplicated, shuffled and appended to the current shoe, meaning an endless play can be considered.</p>
<p>Drawing items from the shoe will trigger one event of type <code>match.shoedraw</code> per request, sent to players except the caller. When the match finishes, fetching detailed info about the match will return the shoe. It can be used by all players to check that the game has been fair: should one player have hacked the game, it is possible to detect it by comparing the shoe to the actual moves.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#a234abcc3b656e332929bcda90bd4d1f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a234abcc3b656e332929bcda90bd4d1f" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>Parameters
<ul>
<li>lastEventId (required, string) … the ID of the last move, as received in the body of the match received when joining, or the value received in the last event. Allows to make sure that you are synchronized with the match before making a move.</li>
<li>count (required, integer) … the number of items to draw from the shoe.</li>
<li>id (required, string) … the ID of the match to operate on.</li>
</ul></li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">osn</span>": <span class="hljs-value">{"<span class="hljs-attribute">en</span>": <span class="hljs-value"><span class="hljs-string">"I just drew something from the shoe!"</span></span>, "<span class="hljs-attribute">fr</span>": <span class="hljs-value"><span class="hljs-string">"J'ai récupéré un objet du sabot!"</span></span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#80e05b8b8873c97c733820e9ace8e3cd" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="80e05b8b8873c97c733820e9ace8e3cd" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">drawnItems</span>": <span class="hljs-value">[
        {
            "<span class="hljs-attribute">prop4</span>": <span class="hljs-value"><span class="hljs-string">"value4"</span>
        </span>},
        {
            "<span class="hljs-attribute">prop3</span>": <span class="hljs-value"><span class="hljs-string">"value3"</span>
        </span>}
    ]</span>,
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"5492a7c6a6725f0000b59e46"</span></span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"5492a7c7a6725f0000b59e4f"</span></span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>400</code></strong><a data-toggle="collapse" data-target="#8b8ac8b69cfcbacb36beaaef6e7785f4" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8b8ac8b69cfcbacb36beaaef6e7785f4" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"MissingParameter"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"The parameter is invalid or absent: count"</span></span>,
    "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-number">400</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>431</code></strong><a data-toggle="collapse" data-target="#f190d9ece33808f8e73487c19305c46c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="f190d9ece33808f8e73487c19305c46c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"InvalidLastMoveId"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This move ID is invalid, please resynchronize"</span>
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources&nbsp;<a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{id}/finish{?lastEventId}</code></div></div><div class="panel-body"><p>Marks a match as finished, meaning that no other player will be able to join, post moves or even leave the match: consider it frozen and “archived” after this operation.
This only works if you are currently part of the match, or you will get an HTTP 433.</p>
<p>A field named <code>osn</code> can be passed as shown in the sample request to send a push notification to the users who are not active at the moment.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#9a5d41b88d5d35a35c40ba13d0525a02" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="9a5d41b88d5d35a35c40ba13d0525a02" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>Parameters
<ul>
<li>lastEventId (required, string) … the ID of the last move, as received in the body of the match received when joining, or the value received in the last event. Allows to make sure that you are synchronized with the match before making a move.</li>
<li>id (required, string) … the ID of the match to operate on.</li>
</ul></li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">osn</span>": <span class="hljs-value">{"<span class="hljs-attribute">en</span>": <span class="hljs-value"><span class="hljs-string">"The match is finished."</span></span>, "<span class="hljs-attribute">es</span>": <span class="hljs-value"><span class="hljs-string">"El partido ha terminado."</span></span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#0e3d66cf82e418b41f5ee2ffa0a5c3c9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0e3d66cf82e418b41f5ee2ffa0a5c3c9" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">match</span>": <span class="hljs-value">{
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"548726461c4158b4c73d43fa"</span></span>,
        "<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"5487264710de0db4c71fe752"</span></span>,
        "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"finished"</span>
    </span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>404</code></strong><a data-toggle="collapse" data-target="#6111a59496d79ca45fcf0f0fe288f71b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6111a59496d79ca45fcf0f0fe288f71b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"InvalidMatch"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"The match does not exist"</span></span>,
    "<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-number">404</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>433</code></strong><a data-toggle="collapse" data-target="#4dc3e965b2440ade6c1d89c96a97480b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4dc3e965b2440ade6c1d89c96a97480b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"BadMatchID"</span></span>,
    "<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This match does not exist or is not active"</span>
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="indexing">Indexing&nbsp;<a href="#indexing"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>If you want to search for something, you probably want to use the indexing API.
You can use it to index gamers (for match making), or matches, or anything. It’s free-form, so it can apply to every use case.</p>
<p>It works in parallel to other APIs. For instance, you could create a match, then index it to allow searching matches.
Or you could index gamer’s properties for fast retrieval.</p>
<p>So the API is very simple and quite generic.</p>
<p>*Note: * the indexing API is an unauthenticated API: you don’t have to be logged in as a user to use it. You don’t need an
<code>Authorization</code> HTTP header.</p>
<h4 id="indexing-">Resources&nbsp;<a href="#indexing-"><i class="fa fa-link"></i></a></h4><section id="indexing--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#indexing--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/index/{domain}/{indexName}</code></div></div><div class="panel-body"><h4>Index a new object</h4>
<p>Use this API to add or update an object in an index. You can have as many indexes as you need: one for gamers’ properties,
one for matches, one for finished matches… It only depends on what you want to search.</p>
<p>The Request body must have three mandatory attribues: id, properties and payload.</p>
<ul>
<li><p><code>id</code> is the id of the object you’re indexing. It can be a MatchId, a GamerId, or anyother unique Id.</p></li>
<li><p><code>properties</code> is an object. It’s attributes will be indexed and searchable. These are the “indexed fields” of the object. These
properties are typed! So if <code>age</code> is an int, it must always be an int, or an error will be thrown upon insertion.</p></li>
<li><p><code>payload</code> is also an object. It’s not indexed, but its contents are returned in searches.</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain</p>
</dd><dt>indexName</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>matchIndex</span></span><p>The index Name</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#14500202a75b15d344d45e8519d336cf" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="14500202a75b15d344d45e8519d336cf" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre><h5>Body</h5><pre><code>    {
        "<span class="hljs-attribute">_id</span>": <span class="hljs-value">'<span class="hljs-number">55706319</span>d11b8125d58c8abe'</span>,
        "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">rank</span>": <span class="hljs-value"><span class="hljs-string">"captain"</span></span>,
            "<span class="hljs-attribute">age</span>": <span class="hljs-value"><span class="hljs-number">28</span></span>,
            "<span class="hljs-attribute">world</span>": <span class="hljs-value"><span class="hljs-string">"utopia"</span>
        </span>}</span>,
        "<span class="hljs-attribute">payload</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Captain America"</span></span>,
            "<span class="hljs-attribute">lastPlayed</span>": <span class="hljs-value"><span class="hljs-number">1433428652427</span>
        </span>}
    </span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#35faaf1df06ee915e4e9420c331bc7c8" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="35faaf1df06ee915e4e9420c331bc7c8" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>    { <span class="hljs-attribute">_index</span>: <span class="hljs-string">'com.clanofthecloud.cloudbuilder.m3nsd85gnqd3'</span>,
      <span class="hljs-attribute">_type</span>: <span class="hljs-string">'matchIndex'</span>,
      <span class="hljs-attribute">_id</span>: <span class="hljs-string">'55706319d11b8125d58c8abe'</span>,
      <span class="hljs-attribute">_version</span>: <span class="hljs-number">1</span>,
      <span class="hljs-attribute">created</span>: true
    }
</code></pre></li></ul></section><h4 id="indexing-">Resources&nbsp;<a href="#indexing-"><i class="fa fa-link"></i></a></h4><section id="indexing--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#indexing--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/index/{domain}/{indexName}/search?{q}&amp;{sort}&amp;{from}&amp;{max}</code></div></div><div class="panel-body"><h4>Search the index</h4>
<p>You can search documents in the index with this API. It allows you to make complex queries.
See <a href="http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html">the Elastic documentation</a>
to learn the full syntax for the <code>q</code> parameter. It’s easy and quite powerful.</p>
<p>You can also use the full Elastic search capabilities with full <em>query DSL</em> search. In this case, you’ll send a json document instead of
using the <code>q</code> and <code>sort</code> parameters. Please refer to <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html">the Elastic full-body search documentation</a>.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain</p>
</dd><dt>indexName</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>matchIndex</span></span><p>The index Name</p>
</dd><dt>q</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>rank:captain</span></span><p>The query string</p>
</dd><dt>sort</dt><dd><code>string</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>[&quot;age&quot;]</span></span><p>a JSON array of properties names for sorting</p>
</dd><dt>from</dt><dd><code>int</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>0</span></span><p>The first result index</p>
</dd><dt>max</dt><dd><code>int</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>10</span></span><p>The number of results to return</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#7eb10c240dbe4f0158d7720d24b99e85" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="7eb10c240dbe4f0158d7720d24b99e85" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#88a907ff5e4734efea7d4132b5bbb451" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="88a907ff5e4734efea7d4132b5bbb451" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>    { total: <span class="hljs-number">1</span>,
      max_score: <span class="hljs-number">1</span>,
      hits:
       [ { _index: <span class="hljs-string">'com.clanofthecloud.cloudbuilder.m3nsd85gnqd3'</span>,
           _<span class="hljs-built_in">type</span>: <span class="hljs-string">'matchIndex'</span>,
           _id: <span class="hljs-string">'55706319d11b8125d58c8abe'</span>,
           _score: <span class="hljs-number">1</span>,
           _<span class="hljs-built_in">source</span>: {
                <span class="hljs-string">"rank"</span>: <span class="hljs-string">"captain"</span>,
                <span class="hljs-string">"age"</span>: <span class="hljs-number">28</span>,
                <span class="hljs-string">"world"</span>: <span class="hljs-string">"utopia"</span>,
                <span class="hljs-string">"payload"</span>: {
                    <span class="hljs-string">"name"</span>: <span class="hljs-string">"Captain America"</span>,
                    <span class="hljs-string">"lastPlayed"</span>: <span class="hljs-number">1433428652427</span>
                }
           }
         }
       ]
    }
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#716ed7804b8a67435e647e68caea0986" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="716ed7804b8a67435e647e68caea0986" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre><h5>Body</h5><pre><code>    {
        "<span class="hljs-attribute">query</span>": <span class="hljs-value">{
            "<span class="hljs-attribute">term</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">rank</span>": <span class="hljs-value"><span class="hljs-string">"captain"</span>
            </span>}
        </span>}
    </span>}
</code></pre></li><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#88a907ff5e4734efea7d4132b5bbb451" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="88a907ff5e4734efea7d4132b5bbb451" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>    { total: <span class="hljs-number">1</span>,
      max_score: <span class="hljs-number">1</span>,
      hits:
       [ { _index: <span class="hljs-string">'com.clanofthecloud.cloudbuilder.m3nsd85gnqd3'</span>,
           _<span class="hljs-built_in">type</span>: <span class="hljs-string">'matchIndex'</span>,
           _id: <span class="hljs-string">'55706319d11b8125d58c8abe'</span>,
           _score: <span class="hljs-number">1</span>,
           _<span class="hljs-built_in">source</span>: {
                <span class="hljs-string">"rank"</span>: <span class="hljs-string">"captain"</span>,
                <span class="hljs-string">"age"</span>: <span class="hljs-number">28</span>,
                <span class="hljs-string">"world"</span>: <span class="hljs-string">"utopia"</span>,
                <span class="hljs-string">"payload"</span>: {
                    <span class="hljs-string">"name"</span>: <span class="hljs-string">"Captain America"</span>,
                    <span class="hljs-string">"lastPlayed"</span>: <span class="hljs-number">1433428652427</span>
                }
           }
         }
       ]
    }
</code></pre></li></ul></section><h4 id="indexing-">Resources&nbsp;<a href="#indexing-"><i class="fa fa-link"></i></a></h4><section id="indexing--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#indexing--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/index/{domain}/{indexName}/{id}</code></div></div><div class="panel-body"><h4>Get an index element</h4>
<p>Use this API if you want to GET a single index entry, by id. Of course, you should use the search API instead if you want to
find more than one element.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain</p>
</dd><dt>indexName</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>matchIndex</span></span><p>The index Name</p>
</dd><dt>id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>55706319d11b8125d58c8abe</span></span><p>The object Id you’re looking for</p>
</dd><dt>Headers</dt><dd><code></code>&nbsp;<span class="required">(required)</span>&nbsp;<pre><code>x-apikey : testgame-key
x-apisecret : testgame-secret
</code></pre>
</dd><dt>Body</dt><dd><code></code>&nbsp;<span class="required">(required)</span>&nbsp;</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Response&nbsp;&nbsp;<code>200</code></strong><a data-toggle="collapse" data-target="#24f80affba3d1d866f0e61f6d3b7c4c3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="24f80affba3d1d866f0e61f6d3b7c4c3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>    { _index: <span class="hljs-string">'com.clanofthecloud.cloudbuilder.m3nsd85gnqd3'</span>,
      _<span class="hljs-built_in">type</span>: <span class="hljs-string">'matchIndex'</span>,
      _id: <span class="hljs-string">'55706319d11b8125d58c8abe'</span>,
      _version: <span class="hljs-number">1</span>,
      found: <span class="hljs-literal">true</span>,
      _<span class="hljs-built_in">source</span>:
       {
           <span class="hljs-string">"rank"</span>: <span class="hljs-string">"captain"</span>,
           <span class="hljs-string">"age"</span>: <span class="hljs-number">28</span>,
           <span class="hljs-string">"world"</span>: <span class="hljs-string">"utopia"</span>,
           <span class="hljs-string">"payload"</span>: {
               <span class="hljs-string">"name"</span>: <span class="hljs-string">"Captain America"</span>,
               <span class="hljs-string">"lastPlayed"</span>: <span class="hljs-number">1433428652427</span>
           }
         }
        }
    }
</code></pre></li></ul></section><h4 id="indexing-">Resources&nbsp;<a href="#indexing-"><i class="fa fa-link"></i></a></h4><section id="indexing--delete" class="panel panel-danger"><div class="panel-heading"><div style="float:left"><a href="#indexing--delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v1/index/{domain}/{indexName}/{id}</code></div></div><div class="panel-body"><h4>Delete an element of the index</h4>
<p>When you want to remove an index entry, use this API. If you just want to update an entry, just use POST instead.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>private</span></span><p>The domain</p>
</dd><dt>indexName</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>matchIndex</span></span><p>The index Name</p>
</dd><dt>id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>55706319d11b8125d58c8abe</span></span><p>The object Id you’re looking for</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#9e4e9c1266739dc56e803c7c8704cf28" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="9e4e9c1266739dc56e803c7c8704cf28" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre></li></ul></section></div></div></div></div></div></div><p style="text-align: center;" class="text-muted">Generated by&nbsp;<a href="https://github.com/danielgtaylor/aglio" class="aglio">aglio</a>&nbsp;on 28 Jun 2015</p><div id="localFile" style="display: none; position: absolute; top: 0; left: 0; width: 100%; color: white; background: red; font-size: 150%; text-align: center; padding: 1em;">This page may not display correctly when opened as a local file. Instead, view it from a web server.

</div></body><script src="//code.jquery.com/jquery-1.11.0.min.js"></script><script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script><script>(function() {
  if (location.protocol === 'file:') {
    document.getElementById('localFile').style.display = 'block';
  }

}).call(this);
</script><script>(function() {
  $('table').addClass('table');

}).call(this);
</script></html>