Set Matchmaking Queue
SDK support is limited to C# and Java for this API. Create or update a matchmaking queue configuration.
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| MatchmakingQueueConfigInvalid | 2031 |
| MatchmakingQueueLimitExceeded | 2057 |
curl --request POST \
--url https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue \
--header 'Content-Type: application/json' \
--header 'X-EntityToken: <api-key>' \
--data '
{
"MatchmakingQueue": {
"Name": "ExampleQueueName",
"MinMatchSize": 7,
"MaxMatchSize": 8,
"MaxTicketSize": 2,
"ServerAllocationEnabled": true,
"BuildId": "065a3208-39af-4691-8794-5f774c367ac2",
"DifferenceRules": [
{
"Difference": 10,
"MergeFunction": "Average",
"DefaultAttributeValue": 0,
"LinearExpansion": {
"Delta": 0.5,
"Limit": 20,
"SecondsBetweenExpansions": 5
},
"Attribute": {
"Path": "ExampleAttributeDifference"
},
"Weight": 1,
"Name": "ExampleNameDifference",
"SecondsUntilOptional": 50
}
],
"StringEqualityRules": [
{
"DefaultAttributeValue": "ExampleDefault",
"Expansion": {
"EnabledOverrides": [
false,
true,
true,
false
],
"SecondsBetweenExpansions": 5
},
"Attribute": {
"Path": "ExampleAttributeStringEquality"
},
"Weight": 1,
"Name": "ExampleNameStringEquality",
"SecondsUntilOptional": 50
}
],
"MatchTotalRules": [
{
"Attribute": {
"Path": "ExampleAttribute"
},
"Min": 2,
"Weight": 1,
"Expansion": {
"MaxOverrides": [
{
"Value": 4
},
{
"Value": 4
},
null
],
"SecondsBetweenExpansions": 5
},
"Name": "MatchTotalRule",
"SecondsUntilOptional": 50
}
],
"SetIntersectionRules": [
{
"DefaultAttributeValue": [
"a",
"b",
"c"
],
"MinIntersectionSize": 2,
"LinearExpansion": {
"Delta": 2,
"SecondsBetweenExpansions": 5
},
"Attribute": {
"Path": "ExampleAttributeSetIntersectionRule"
},
"Weight": 1,
"Name": "ExampleNameSetIntersectionRule",
"SecondsUntilOptional": 50
}
],
"RegionSelectionRule": {
"MaxLatency": 250,
"Path": "Latencies",
"LinearExpansion": {
"Delta": 10,
"Limit": 300,
"SecondsBetweenExpansions": 5
},
"Weight": 1,
"Name": "RegionSelectionRule",
"SecondsUntilOptional": 50
},
"TeamSizeBalanceRule": {
"Difference": 1,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamSizeBalanceRule",
"SecondsUntilOptional": 50
},
"TeamDifferenceRules": [
{
"Attribute": {
"Path": "ExampleAttribute"
},
"Difference": 2,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamDifferenceRule",
"SecondsUntilOptional": 50
}
],
"TeamTicketSizeSimilarityRule": {
"Name": "TeamTicketSizeSimilarityRule",
"SecondsUntilOptional": 180
},
"Teams": [
{
"Name": "monster",
"MinTeamSize": 1,
"MaxTeamSize": 1
},
{
"Name": "hunters",
"MinTeamSize": 4,
"MaxTeamSize": 8
}
],
"StatisticsVisibilityToPlayers": {
"ShowNumberOfPlayersMatching": true,
"ShowTimeToMatch": true
}
}
}
'import requests
url = "https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue"
payload = { "MatchmakingQueue": {
"Name": "ExampleQueueName",
"MinMatchSize": 7,
"MaxMatchSize": 8,
"MaxTicketSize": 2,
"ServerAllocationEnabled": True,
"BuildId": "065a3208-39af-4691-8794-5f774c367ac2",
"DifferenceRules": [
{
"Difference": 10,
"MergeFunction": "Average",
"DefaultAttributeValue": 0,
"LinearExpansion": {
"Delta": 0.5,
"Limit": 20,
"SecondsBetweenExpansions": 5
},
"Attribute": { "Path": "ExampleAttributeDifference" },
"Weight": 1,
"Name": "ExampleNameDifference",
"SecondsUntilOptional": 50
}
],
"StringEqualityRules": [
{
"DefaultAttributeValue": "ExampleDefault",
"Expansion": {
"EnabledOverrides": [False, True, True, False],
"SecondsBetweenExpansions": 5
},
"Attribute": { "Path": "ExampleAttributeStringEquality" },
"Weight": 1,
"Name": "ExampleNameStringEquality",
"SecondsUntilOptional": 50
}
],
"MatchTotalRules": [
{
"Attribute": { "Path": "ExampleAttribute" },
"Min": 2,
"Weight": 1,
"Expansion": {
"MaxOverrides": [{ "Value": 4 }, { "Value": 4 }, None],
"SecondsBetweenExpansions": 5
},
"Name": "MatchTotalRule",
"SecondsUntilOptional": 50
}
],
"SetIntersectionRules": [
{
"DefaultAttributeValue": ["a", "b", "c"],
"MinIntersectionSize": 2,
"LinearExpansion": {
"Delta": 2,
"SecondsBetweenExpansions": 5
},
"Attribute": { "Path": "ExampleAttributeSetIntersectionRule" },
"Weight": 1,
"Name": "ExampleNameSetIntersectionRule",
"SecondsUntilOptional": 50
}
],
"RegionSelectionRule": {
"MaxLatency": 250,
"Path": "Latencies",
"LinearExpansion": {
"Delta": 10,
"Limit": 300,
"SecondsBetweenExpansions": 5
},
"Weight": 1,
"Name": "RegionSelectionRule",
"SecondsUntilOptional": 50
},
"TeamSizeBalanceRule": {
"Difference": 1,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamSizeBalanceRule",
"SecondsUntilOptional": 50
},
"TeamDifferenceRules": [
{
"Attribute": { "Path": "ExampleAttribute" },
"Difference": 2,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamDifferenceRule",
"SecondsUntilOptional": 50
}
],
"TeamTicketSizeSimilarityRule": {
"Name": "TeamTicketSizeSimilarityRule",
"SecondsUntilOptional": 180
},
"Teams": [
{
"Name": "monster",
"MinTeamSize": 1,
"MaxTeamSize": 1
},
{
"Name": "hunters",
"MinTeamSize": 4,
"MaxTeamSize": 8
}
],
"StatisticsVisibilityToPlayers": {
"ShowNumberOfPlayersMatching": True,
"ShowTimeToMatch": True
}
} }
headers = {
"X-EntityToken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-EntityToken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
MatchmakingQueue: {
Name: 'ExampleQueueName',
MinMatchSize: 7,
MaxMatchSize: 8,
MaxTicketSize: 2,
ServerAllocationEnabled: true,
BuildId: '065a3208-39af-4691-8794-5f774c367ac2',
DifferenceRules: [
{
Difference: 10,
MergeFunction: 'Average',
DefaultAttributeValue: 0,
LinearExpansion: {Delta: 0.5, Limit: 20, SecondsBetweenExpansions: 5},
Attribute: {Path: 'ExampleAttributeDifference'},
Weight: 1,
Name: 'ExampleNameDifference',
SecondsUntilOptional: 50
}
],
StringEqualityRules: [
{
DefaultAttributeValue: 'ExampleDefault',
Expansion: {EnabledOverrides: [false, true, true, false], SecondsBetweenExpansions: 5},
Attribute: {Path: 'ExampleAttributeStringEquality'},
Weight: 1,
Name: 'ExampleNameStringEquality',
SecondsUntilOptional: 50
}
],
MatchTotalRules: [
{
Attribute: {Path: 'ExampleAttribute'},
Min: 2,
Weight: 1,
Expansion: {MaxOverrides: [{Value: 4}, {Value: 4}, null], SecondsBetweenExpansions: 5},
Name: 'MatchTotalRule',
SecondsUntilOptional: 50
}
],
SetIntersectionRules: [
{
DefaultAttributeValue: ['a', 'b', 'c'],
MinIntersectionSize: 2,
LinearExpansion: {Delta: 2, SecondsBetweenExpansions: 5},
Attribute: {Path: 'ExampleAttributeSetIntersectionRule'},
Weight: 1,
Name: 'ExampleNameSetIntersectionRule',
SecondsUntilOptional: 50
}
],
RegionSelectionRule: {
MaxLatency: 250,
Path: 'Latencies',
LinearExpansion: {Delta: 10, Limit: 300, SecondsBetweenExpansions: 5},
Weight: 1,
Name: 'RegionSelectionRule',
SecondsUntilOptional: 50
},
TeamSizeBalanceRule: {
Difference: 1,
LinearExpansion: {Delta: 1, Limit: 5, SecondsBetweenExpansions: 5},
Name: 'TeamSizeBalanceRule',
SecondsUntilOptional: 50
},
TeamDifferenceRules: [
{
Attribute: {Path: 'ExampleAttribute'},
Difference: 2,
LinearExpansion: {Delta: 1, Limit: 5, SecondsBetweenExpansions: 5},
Name: 'TeamDifferenceRule',
SecondsUntilOptional: 50
}
],
TeamTicketSizeSimilarityRule: {Name: 'TeamTicketSizeSimilarityRule', SecondsUntilOptional: 180},
Teams: [
{Name: 'monster', MinTeamSize: 1, MaxTeamSize: 1},
{Name: 'hunters', MinTeamSize: 4, MaxTeamSize: 8}
],
StatisticsVisibilityToPlayers: {ShowNumberOfPlayersMatching: true, ShowTimeToMatch: true}
}
})
};
fetch('https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'MatchmakingQueue' => [
'Name' => 'ExampleQueueName',
'MinMatchSize' => 7,
'MaxMatchSize' => 8,
'MaxTicketSize' => 2,
'ServerAllocationEnabled' => true,
'BuildId' => '065a3208-39af-4691-8794-5f774c367ac2',
'DifferenceRules' => [
[
'Difference' => 10,
'MergeFunction' => 'Average',
'DefaultAttributeValue' => 0,
'LinearExpansion' => [
'Delta' => 0.5,
'Limit' => 20,
'SecondsBetweenExpansions' => 5
],
'Attribute' => [
'Path' => 'ExampleAttributeDifference'
],
'Weight' => 1,
'Name' => 'ExampleNameDifference',
'SecondsUntilOptional' => 50
]
],
'StringEqualityRules' => [
[
'DefaultAttributeValue' => 'ExampleDefault',
'Expansion' => [
'EnabledOverrides' => [
false,
true,
true,
false
],
'SecondsBetweenExpansions' => 5
],
'Attribute' => [
'Path' => 'ExampleAttributeStringEquality'
],
'Weight' => 1,
'Name' => 'ExampleNameStringEquality',
'SecondsUntilOptional' => 50
]
],
'MatchTotalRules' => [
[
'Attribute' => [
'Path' => 'ExampleAttribute'
],
'Min' => 2,
'Weight' => 1,
'Expansion' => [
'MaxOverrides' => [
[
'Value' => 4
],
[
'Value' => 4
],
null
],
'SecondsBetweenExpansions' => 5
],
'Name' => 'MatchTotalRule',
'SecondsUntilOptional' => 50
]
],
'SetIntersectionRules' => [
[
'DefaultAttributeValue' => [
'a',
'b',
'c'
],
'MinIntersectionSize' => 2,
'LinearExpansion' => [
'Delta' => 2,
'SecondsBetweenExpansions' => 5
],
'Attribute' => [
'Path' => 'ExampleAttributeSetIntersectionRule'
],
'Weight' => 1,
'Name' => 'ExampleNameSetIntersectionRule',
'SecondsUntilOptional' => 50
]
],
'RegionSelectionRule' => [
'MaxLatency' => 250,
'Path' => 'Latencies',
'LinearExpansion' => [
'Delta' => 10,
'Limit' => 300,
'SecondsBetweenExpansions' => 5
],
'Weight' => 1,
'Name' => 'RegionSelectionRule',
'SecondsUntilOptional' => 50
],
'TeamSizeBalanceRule' => [
'Difference' => 1,
'LinearExpansion' => [
'Delta' => 1,
'Limit' => 5,
'SecondsBetweenExpansions' => 5
],
'Name' => 'TeamSizeBalanceRule',
'SecondsUntilOptional' => 50
],
'TeamDifferenceRules' => [
[
'Attribute' => [
'Path' => 'ExampleAttribute'
],
'Difference' => 2,
'LinearExpansion' => [
'Delta' => 1,
'Limit' => 5,
'SecondsBetweenExpansions' => 5
],
'Name' => 'TeamDifferenceRule',
'SecondsUntilOptional' => 50
]
],
'TeamTicketSizeSimilarityRule' => [
'Name' => 'TeamTicketSizeSimilarityRule',
'SecondsUntilOptional' => 180
],
'Teams' => [
[
'Name' => 'monster',
'MinTeamSize' => 1,
'MaxTeamSize' => 1
],
[
'Name' => 'hunters',
'MinTeamSize' => 4,
'MaxTeamSize' => 8
]
],
'StatisticsVisibilityToPlayers' => [
'ShowNumberOfPlayersMatching' => true,
'ShowTimeToMatch' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-EntityToken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue"
payload := strings.NewReader("{\n \"MatchmakingQueue\": {\n \"Name\": \"ExampleQueueName\",\n \"MinMatchSize\": 7,\n \"MaxMatchSize\": 8,\n \"MaxTicketSize\": 2,\n \"ServerAllocationEnabled\": true,\n \"BuildId\": \"065a3208-39af-4691-8794-5f774c367ac2\",\n \"DifferenceRules\": [\n {\n \"Difference\": 10,\n \"MergeFunction\": \"Average\",\n \"DefaultAttributeValue\": 0,\n \"LinearExpansion\": {\n \"Delta\": 0.5,\n \"Limit\": 20,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeDifference\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameDifference\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"StringEqualityRules\": [\n {\n \"DefaultAttributeValue\": \"ExampleDefault\",\n \"Expansion\": {\n \"EnabledOverrides\": [\n false,\n true,\n true,\n false\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeStringEquality\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameStringEquality\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"MatchTotalRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Min\": 2,\n \"Weight\": 1,\n \"Expansion\": {\n \"MaxOverrides\": [\n {\n \"Value\": 4\n },\n {\n \"Value\": 4\n },\n null\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"MatchTotalRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"SetIntersectionRules\": [\n {\n \"DefaultAttributeValue\": [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"MinIntersectionSize\": 2,\n \"LinearExpansion\": {\n \"Delta\": 2,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeSetIntersectionRule\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameSetIntersectionRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"RegionSelectionRule\": {\n \"MaxLatency\": 250,\n \"Path\": \"Latencies\",\n \"LinearExpansion\": {\n \"Delta\": 10,\n \"Limit\": 300,\n \"SecondsBetweenExpansions\": 5\n },\n \"Weight\": 1,\n \"Name\": \"RegionSelectionRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamSizeBalanceRule\": {\n \"Difference\": 1,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamSizeBalanceRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamDifferenceRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Difference\": 2,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamDifferenceRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"TeamTicketSizeSimilarityRule\": {\n \"Name\": \"TeamTicketSizeSimilarityRule\",\n \"SecondsUntilOptional\": 180\n },\n \"Teams\": [\n {\n \"Name\": \"monster\",\n \"MinTeamSize\": 1,\n \"MaxTeamSize\": 1\n },\n {\n \"Name\": \"hunters\",\n \"MinTeamSize\": 4,\n \"MaxTeamSize\": 8\n }\n ],\n \"StatisticsVisibilityToPlayers\": {\n \"ShowNumberOfPlayersMatching\": true,\n \"ShowTimeToMatch\": true\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-EntityToken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue")
.header("X-EntityToken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"MatchmakingQueue\": {\n \"Name\": \"ExampleQueueName\",\n \"MinMatchSize\": 7,\n \"MaxMatchSize\": 8,\n \"MaxTicketSize\": 2,\n \"ServerAllocationEnabled\": true,\n \"BuildId\": \"065a3208-39af-4691-8794-5f774c367ac2\",\n \"DifferenceRules\": [\n {\n \"Difference\": 10,\n \"MergeFunction\": \"Average\",\n \"DefaultAttributeValue\": 0,\n \"LinearExpansion\": {\n \"Delta\": 0.5,\n \"Limit\": 20,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeDifference\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameDifference\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"StringEqualityRules\": [\n {\n \"DefaultAttributeValue\": \"ExampleDefault\",\n \"Expansion\": {\n \"EnabledOverrides\": [\n false,\n true,\n true,\n false\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeStringEquality\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameStringEquality\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"MatchTotalRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Min\": 2,\n \"Weight\": 1,\n \"Expansion\": {\n \"MaxOverrides\": [\n {\n \"Value\": 4\n },\n {\n \"Value\": 4\n },\n null\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"MatchTotalRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"SetIntersectionRules\": [\n {\n \"DefaultAttributeValue\": [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"MinIntersectionSize\": 2,\n \"LinearExpansion\": {\n \"Delta\": 2,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeSetIntersectionRule\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameSetIntersectionRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"RegionSelectionRule\": {\n \"MaxLatency\": 250,\n \"Path\": \"Latencies\",\n \"LinearExpansion\": {\n \"Delta\": 10,\n \"Limit\": 300,\n \"SecondsBetweenExpansions\": 5\n },\n \"Weight\": 1,\n \"Name\": \"RegionSelectionRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamSizeBalanceRule\": {\n \"Difference\": 1,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamSizeBalanceRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamDifferenceRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Difference\": 2,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamDifferenceRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"TeamTicketSizeSimilarityRule\": {\n \"Name\": \"TeamTicketSizeSimilarityRule\",\n \"SecondsUntilOptional\": 180\n },\n \"Teams\": [\n {\n \"Name\": \"monster\",\n \"MinTeamSize\": 1,\n \"MaxTeamSize\": 1\n },\n {\n \"Name\": \"hunters\",\n \"MinTeamSize\": 4,\n \"MaxTeamSize\": 8\n }\n ],\n \"StatisticsVisibilityToPlayers\": {\n \"ShowNumberOfPlayersMatching\": true,\n \"ShowTimeToMatch\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-EntityToken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"MatchmakingQueue\": {\n \"Name\": \"ExampleQueueName\",\n \"MinMatchSize\": 7,\n \"MaxMatchSize\": 8,\n \"MaxTicketSize\": 2,\n \"ServerAllocationEnabled\": true,\n \"BuildId\": \"065a3208-39af-4691-8794-5f774c367ac2\",\n \"DifferenceRules\": [\n {\n \"Difference\": 10,\n \"MergeFunction\": \"Average\",\n \"DefaultAttributeValue\": 0,\n \"LinearExpansion\": {\n \"Delta\": 0.5,\n \"Limit\": 20,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeDifference\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameDifference\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"StringEqualityRules\": [\n {\n \"DefaultAttributeValue\": \"ExampleDefault\",\n \"Expansion\": {\n \"EnabledOverrides\": [\n false,\n true,\n true,\n false\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeStringEquality\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameStringEquality\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"MatchTotalRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Min\": 2,\n \"Weight\": 1,\n \"Expansion\": {\n \"MaxOverrides\": [\n {\n \"Value\": 4\n },\n {\n \"Value\": 4\n },\n null\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"MatchTotalRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"SetIntersectionRules\": [\n {\n \"DefaultAttributeValue\": [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"MinIntersectionSize\": 2,\n \"LinearExpansion\": {\n \"Delta\": 2,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeSetIntersectionRule\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameSetIntersectionRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"RegionSelectionRule\": {\n \"MaxLatency\": 250,\n \"Path\": \"Latencies\",\n \"LinearExpansion\": {\n \"Delta\": 10,\n \"Limit\": 300,\n \"SecondsBetweenExpansions\": 5\n },\n \"Weight\": 1,\n \"Name\": \"RegionSelectionRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamSizeBalanceRule\": {\n \"Difference\": 1,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamSizeBalanceRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamDifferenceRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Difference\": 2,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamDifferenceRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"TeamTicketSizeSimilarityRule\": {\n \"Name\": \"TeamTicketSizeSimilarityRule\",\n \"SecondsUntilOptional\": 180\n },\n \"Teams\": [\n {\n \"Name\": \"monster\",\n \"MinTeamSize\": 1,\n \"MaxTeamSize\": 1\n },\n {\n \"Name\": \"hunters\",\n \"MinTeamSize\": 4,\n \"MaxTeamSize\": 8\n }\n ],\n \"StatisticsVisibilityToPlayers\": {\n \"ShowNumberOfPlayersMatching\": true,\n \"ShowTimeToMatch\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"status": "<string>",
"data": {}
}{
"code": 123,
"errorCode": 123,
"status": "<string>",
"error": "<string>",
"errorMessage": "<string>",
"errorDetails": {}
}Authorizations
This API requires an Entity Session Token, available from the Entity GetEntityToken method.
Body
Use this API to create or update matchmaking queue configurations. The queue configuration defines the matchmaking rules. The matchmaking service will match tickets together according to the configured rules. Queue resources are not spun up by calling this API. Queues are created when the first ticket is submitted.
Use this API to create or update matchmaking queue configurations. The queue configuration defines the matchmaking rules. The matchmaking service will match tickets together according to the configured rules. Queue resources are not spun up by calling this API. Queues are created when the first ticket is submitted.
The matchmaking queue config.
Show child attributes
Show child attributes
{
"Name": "ExampleQueueName",
"MinMatchSize": 7,
"MaxMatchSize": 8,
"MaxTicketSize": 2,
"ServerAllocationEnabled": true,
"BuildId": "065a3208-39af-4691-8794-5f774c367ac2",
"DifferenceRules": [
{
"Difference": 10,
"MergeFunction": "Average",
"DefaultAttributeValue": 0,
"LinearExpansion": {
"Delta": 0.5,
"Limit": 20,
"SecondsBetweenExpansions": 5
},
"Attribute": { "Path": "ExampleAttributeDifference" },
"Weight": 1,
"Name": "ExampleNameDifference",
"SecondsUntilOptional": 50
}
],
"StringEqualityRules": [
{
"DefaultAttributeValue": "ExampleDefault",
"Expansion": {
"EnabledOverrides": [false, true, true, false],
"SecondsBetweenExpansions": 5
},
"Attribute": { "Path": "ExampleAttributeStringEquality" },
"Weight": 1,
"Name": "ExampleNameStringEquality",
"SecondsUntilOptional": 50
}
],
"MatchTotalRules": [
{
"Attribute": { "Path": "ExampleAttribute" },
"Min": 2,
"Weight": 1,
"Expansion": {
"MaxOverrides": [{ "Value": 4 }, { "Value": 4 }, null],
"SecondsBetweenExpansions": 5
},
"Name": "MatchTotalRule",
"SecondsUntilOptional": 50
}
],
"SetIntersectionRules": [
{
"DefaultAttributeValue": ["a", "b", "c"],
"MinIntersectionSize": 2,
"LinearExpansion": { "Delta": 2, "SecondsBetweenExpansions": 5 },
"Attribute": {
"Path": "ExampleAttributeSetIntersectionRule"
},
"Weight": 1,
"Name": "ExampleNameSetIntersectionRule",
"SecondsUntilOptional": 50
}
],
"RegionSelectionRule": {
"MaxLatency": 250,
"Path": "Latencies",
"LinearExpansion": {
"Delta": 10,
"Limit": 300,
"SecondsBetweenExpansions": 5
},
"Weight": 1,
"Name": "RegionSelectionRule",
"SecondsUntilOptional": 50
},
"TeamSizeBalanceRule": {
"Difference": 1,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamSizeBalanceRule",
"SecondsUntilOptional": 50
},
"TeamDifferenceRules": [
{
"Attribute": { "Path": "ExampleAttribute" },
"Difference": 2,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamDifferenceRule",
"SecondsUntilOptional": 50
}
],
"TeamTicketSizeSimilarityRule": {
"Name": "TeamTicketSizeSimilarityRule",
"SecondsUntilOptional": 180
},
"Teams": [
{
"Name": "monster",
"MinTeamSize": 1,
"MaxTeamSize": 1
},
{
"Name": "hunters",
"MinTeamSize": 4,
"MaxTeamSize": 8
}
],
"StatisticsVisibilityToPlayers": {
"ShowNumberOfPlayersMatching": true,
"ShowTimeToMatch": true
}
}
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
Was this page helpful?
curl --request POST \
--url https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue \
--header 'Content-Type: application/json' \
--header 'X-EntityToken: <api-key>' \
--data '
{
"MatchmakingQueue": {
"Name": "ExampleQueueName",
"MinMatchSize": 7,
"MaxMatchSize": 8,
"MaxTicketSize": 2,
"ServerAllocationEnabled": true,
"BuildId": "065a3208-39af-4691-8794-5f774c367ac2",
"DifferenceRules": [
{
"Difference": 10,
"MergeFunction": "Average",
"DefaultAttributeValue": 0,
"LinearExpansion": {
"Delta": 0.5,
"Limit": 20,
"SecondsBetweenExpansions": 5
},
"Attribute": {
"Path": "ExampleAttributeDifference"
},
"Weight": 1,
"Name": "ExampleNameDifference",
"SecondsUntilOptional": 50
}
],
"StringEqualityRules": [
{
"DefaultAttributeValue": "ExampleDefault",
"Expansion": {
"EnabledOverrides": [
false,
true,
true,
false
],
"SecondsBetweenExpansions": 5
},
"Attribute": {
"Path": "ExampleAttributeStringEquality"
},
"Weight": 1,
"Name": "ExampleNameStringEquality",
"SecondsUntilOptional": 50
}
],
"MatchTotalRules": [
{
"Attribute": {
"Path": "ExampleAttribute"
},
"Min": 2,
"Weight": 1,
"Expansion": {
"MaxOverrides": [
{
"Value": 4
},
{
"Value": 4
},
null
],
"SecondsBetweenExpansions": 5
},
"Name": "MatchTotalRule",
"SecondsUntilOptional": 50
}
],
"SetIntersectionRules": [
{
"DefaultAttributeValue": [
"a",
"b",
"c"
],
"MinIntersectionSize": 2,
"LinearExpansion": {
"Delta": 2,
"SecondsBetweenExpansions": 5
},
"Attribute": {
"Path": "ExampleAttributeSetIntersectionRule"
},
"Weight": 1,
"Name": "ExampleNameSetIntersectionRule",
"SecondsUntilOptional": 50
}
],
"RegionSelectionRule": {
"MaxLatency": 250,
"Path": "Latencies",
"LinearExpansion": {
"Delta": 10,
"Limit": 300,
"SecondsBetweenExpansions": 5
},
"Weight": 1,
"Name": "RegionSelectionRule",
"SecondsUntilOptional": 50
},
"TeamSizeBalanceRule": {
"Difference": 1,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamSizeBalanceRule",
"SecondsUntilOptional": 50
},
"TeamDifferenceRules": [
{
"Attribute": {
"Path": "ExampleAttribute"
},
"Difference": 2,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamDifferenceRule",
"SecondsUntilOptional": 50
}
],
"TeamTicketSizeSimilarityRule": {
"Name": "TeamTicketSizeSimilarityRule",
"SecondsUntilOptional": 180
},
"Teams": [
{
"Name": "monster",
"MinTeamSize": 1,
"MaxTeamSize": 1
},
{
"Name": "hunters",
"MinTeamSize": 4,
"MaxTeamSize": 8
}
],
"StatisticsVisibilityToPlayers": {
"ShowNumberOfPlayersMatching": true,
"ShowTimeToMatch": true
}
}
}
'import requests
url = "https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue"
payload = { "MatchmakingQueue": {
"Name": "ExampleQueueName",
"MinMatchSize": 7,
"MaxMatchSize": 8,
"MaxTicketSize": 2,
"ServerAllocationEnabled": True,
"BuildId": "065a3208-39af-4691-8794-5f774c367ac2",
"DifferenceRules": [
{
"Difference": 10,
"MergeFunction": "Average",
"DefaultAttributeValue": 0,
"LinearExpansion": {
"Delta": 0.5,
"Limit": 20,
"SecondsBetweenExpansions": 5
},
"Attribute": { "Path": "ExampleAttributeDifference" },
"Weight": 1,
"Name": "ExampleNameDifference",
"SecondsUntilOptional": 50
}
],
"StringEqualityRules": [
{
"DefaultAttributeValue": "ExampleDefault",
"Expansion": {
"EnabledOverrides": [False, True, True, False],
"SecondsBetweenExpansions": 5
},
"Attribute": { "Path": "ExampleAttributeStringEquality" },
"Weight": 1,
"Name": "ExampleNameStringEquality",
"SecondsUntilOptional": 50
}
],
"MatchTotalRules": [
{
"Attribute": { "Path": "ExampleAttribute" },
"Min": 2,
"Weight": 1,
"Expansion": {
"MaxOverrides": [{ "Value": 4 }, { "Value": 4 }, None],
"SecondsBetweenExpansions": 5
},
"Name": "MatchTotalRule",
"SecondsUntilOptional": 50
}
],
"SetIntersectionRules": [
{
"DefaultAttributeValue": ["a", "b", "c"],
"MinIntersectionSize": 2,
"LinearExpansion": {
"Delta": 2,
"SecondsBetweenExpansions": 5
},
"Attribute": { "Path": "ExampleAttributeSetIntersectionRule" },
"Weight": 1,
"Name": "ExampleNameSetIntersectionRule",
"SecondsUntilOptional": 50
}
],
"RegionSelectionRule": {
"MaxLatency": 250,
"Path": "Latencies",
"LinearExpansion": {
"Delta": 10,
"Limit": 300,
"SecondsBetweenExpansions": 5
},
"Weight": 1,
"Name": "RegionSelectionRule",
"SecondsUntilOptional": 50
},
"TeamSizeBalanceRule": {
"Difference": 1,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamSizeBalanceRule",
"SecondsUntilOptional": 50
},
"TeamDifferenceRules": [
{
"Attribute": { "Path": "ExampleAttribute" },
"Difference": 2,
"LinearExpansion": {
"Delta": 1,
"Limit": 5,
"SecondsBetweenExpansions": 5
},
"Name": "TeamDifferenceRule",
"SecondsUntilOptional": 50
}
],
"TeamTicketSizeSimilarityRule": {
"Name": "TeamTicketSizeSimilarityRule",
"SecondsUntilOptional": 180
},
"Teams": [
{
"Name": "monster",
"MinTeamSize": 1,
"MaxTeamSize": 1
},
{
"Name": "hunters",
"MinTeamSize": 4,
"MaxTeamSize": 8
}
],
"StatisticsVisibilityToPlayers": {
"ShowNumberOfPlayersMatching": True,
"ShowTimeToMatch": True
}
} }
headers = {
"X-EntityToken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-EntityToken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
MatchmakingQueue: {
Name: 'ExampleQueueName',
MinMatchSize: 7,
MaxMatchSize: 8,
MaxTicketSize: 2,
ServerAllocationEnabled: true,
BuildId: '065a3208-39af-4691-8794-5f774c367ac2',
DifferenceRules: [
{
Difference: 10,
MergeFunction: 'Average',
DefaultAttributeValue: 0,
LinearExpansion: {Delta: 0.5, Limit: 20, SecondsBetweenExpansions: 5},
Attribute: {Path: 'ExampleAttributeDifference'},
Weight: 1,
Name: 'ExampleNameDifference',
SecondsUntilOptional: 50
}
],
StringEqualityRules: [
{
DefaultAttributeValue: 'ExampleDefault',
Expansion: {EnabledOverrides: [false, true, true, false], SecondsBetweenExpansions: 5},
Attribute: {Path: 'ExampleAttributeStringEquality'},
Weight: 1,
Name: 'ExampleNameStringEquality',
SecondsUntilOptional: 50
}
],
MatchTotalRules: [
{
Attribute: {Path: 'ExampleAttribute'},
Min: 2,
Weight: 1,
Expansion: {MaxOverrides: [{Value: 4}, {Value: 4}, null], SecondsBetweenExpansions: 5},
Name: 'MatchTotalRule',
SecondsUntilOptional: 50
}
],
SetIntersectionRules: [
{
DefaultAttributeValue: ['a', 'b', 'c'],
MinIntersectionSize: 2,
LinearExpansion: {Delta: 2, SecondsBetweenExpansions: 5},
Attribute: {Path: 'ExampleAttributeSetIntersectionRule'},
Weight: 1,
Name: 'ExampleNameSetIntersectionRule',
SecondsUntilOptional: 50
}
],
RegionSelectionRule: {
MaxLatency: 250,
Path: 'Latencies',
LinearExpansion: {Delta: 10, Limit: 300, SecondsBetweenExpansions: 5},
Weight: 1,
Name: 'RegionSelectionRule',
SecondsUntilOptional: 50
},
TeamSizeBalanceRule: {
Difference: 1,
LinearExpansion: {Delta: 1, Limit: 5, SecondsBetweenExpansions: 5},
Name: 'TeamSizeBalanceRule',
SecondsUntilOptional: 50
},
TeamDifferenceRules: [
{
Attribute: {Path: 'ExampleAttribute'},
Difference: 2,
LinearExpansion: {Delta: 1, Limit: 5, SecondsBetweenExpansions: 5},
Name: 'TeamDifferenceRule',
SecondsUntilOptional: 50
}
],
TeamTicketSizeSimilarityRule: {Name: 'TeamTicketSizeSimilarityRule', SecondsUntilOptional: 180},
Teams: [
{Name: 'monster', MinTeamSize: 1, MaxTeamSize: 1},
{Name: 'hunters', MinTeamSize: 4, MaxTeamSize: 8}
],
StatisticsVisibilityToPlayers: {ShowNumberOfPlayersMatching: true, ShowTimeToMatch: true}
}
})
};
fetch('https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'MatchmakingQueue' => [
'Name' => 'ExampleQueueName',
'MinMatchSize' => 7,
'MaxMatchSize' => 8,
'MaxTicketSize' => 2,
'ServerAllocationEnabled' => true,
'BuildId' => '065a3208-39af-4691-8794-5f774c367ac2',
'DifferenceRules' => [
[
'Difference' => 10,
'MergeFunction' => 'Average',
'DefaultAttributeValue' => 0,
'LinearExpansion' => [
'Delta' => 0.5,
'Limit' => 20,
'SecondsBetweenExpansions' => 5
],
'Attribute' => [
'Path' => 'ExampleAttributeDifference'
],
'Weight' => 1,
'Name' => 'ExampleNameDifference',
'SecondsUntilOptional' => 50
]
],
'StringEqualityRules' => [
[
'DefaultAttributeValue' => 'ExampleDefault',
'Expansion' => [
'EnabledOverrides' => [
false,
true,
true,
false
],
'SecondsBetweenExpansions' => 5
],
'Attribute' => [
'Path' => 'ExampleAttributeStringEquality'
],
'Weight' => 1,
'Name' => 'ExampleNameStringEquality',
'SecondsUntilOptional' => 50
]
],
'MatchTotalRules' => [
[
'Attribute' => [
'Path' => 'ExampleAttribute'
],
'Min' => 2,
'Weight' => 1,
'Expansion' => [
'MaxOverrides' => [
[
'Value' => 4
],
[
'Value' => 4
],
null
],
'SecondsBetweenExpansions' => 5
],
'Name' => 'MatchTotalRule',
'SecondsUntilOptional' => 50
]
],
'SetIntersectionRules' => [
[
'DefaultAttributeValue' => [
'a',
'b',
'c'
],
'MinIntersectionSize' => 2,
'LinearExpansion' => [
'Delta' => 2,
'SecondsBetweenExpansions' => 5
],
'Attribute' => [
'Path' => 'ExampleAttributeSetIntersectionRule'
],
'Weight' => 1,
'Name' => 'ExampleNameSetIntersectionRule',
'SecondsUntilOptional' => 50
]
],
'RegionSelectionRule' => [
'MaxLatency' => 250,
'Path' => 'Latencies',
'LinearExpansion' => [
'Delta' => 10,
'Limit' => 300,
'SecondsBetweenExpansions' => 5
],
'Weight' => 1,
'Name' => 'RegionSelectionRule',
'SecondsUntilOptional' => 50
],
'TeamSizeBalanceRule' => [
'Difference' => 1,
'LinearExpansion' => [
'Delta' => 1,
'Limit' => 5,
'SecondsBetweenExpansions' => 5
],
'Name' => 'TeamSizeBalanceRule',
'SecondsUntilOptional' => 50
],
'TeamDifferenceRules' => [
[
'Attribute' => [
'Path' => 'ExampleAttribute'
],
'Difference' => 2,
'LinearExpansion' => [
'Delta' => 1,
'Limit' => 5,
'SecondsBetweenExpansions' => 5
],
'Name' => 'TeamDifferenceRule',
'SecondsUntilOptional' => 50
]
],
'TeamTicketSizeSimilarityRule' => [
'Name' => 'TeamTicketSizeSimilarityRule',
'SecondsUntilOptional' => 180
],
'Teams' => [
[
'Name' => 'monster',
'MinTeamSize' => 1,
'MaxTeamSize' => 1
],
[
'Name' => 'hunters',
'MinTeamSize' => 4,
'MaxTeamSize' => 8
]
],
'StatisticsVisibilityToPlayers' => [
'ShowNumberOfPlayersMatching' => true,
'ShowTimeToMatch' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-EntityToken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue"
payload := strings.NewReader("{\n \"MatchmakingQueue\": {\n \"Name\": \"ExampleQueueName\",\n \"MinMatchSize\": 7,\n \"MaxMatchSize\": 8,\n \"MaxTicketSize\": 2,\n \"ServerAllocationEnabled\": true,\n \"BuildId\": \"065a3208-39af-4691-8794-5f774c367ac2\",\n \"DifferenceRules\": [\n {\n \"Difference\": 10,\n \"MergeFunction\": \"Average\",\n \"DefaultAttributeValue\": 0,\n \"LinearExpansion\": {\n \"Delta\": 0.5,\n \"Limit\": 20,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeDifference\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameDifference\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"StringEqualityRules\": [\n {\n \"DefaultAttributeValue\": \"ExampleDefault\",\n \"Expansion\": {\n \"EnabledOverrides\": [\n false,\n true,\n true,\n false\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeStringEquality\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameStringEquality\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"MatchTotalRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Min\": 2,\n \"Weight\": 1,\n \"Expansion\": {\n \"MaxOverrides\": [\n {\n \"Value\": 4\n },\n {\n \"Value\": 4\n },\n null\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"MatchTotalRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"SetIntersectionRules\": [\n {\n \"DefaultAttributeValue\": [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"MinIntersectionSize\": 2,\n \"LinearExpansion\": {\n \"Delta\": 2,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeSetIntersectionRule\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameSetIntersectionRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"RegionSelectionRule\": {\n \"MaxLatency\": 250,\n \"Path\": \"Latencies\",\n \"LinearExpansion\": {\n \"Delta\": 10,\n \"Limit\": 300,\n \"SecondsBetweenExpansions\": 5\n },\n \"Weight\": 1,\n \"Name\": \"RegionSelectionRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamSizeBalanceRule\": {\n \"Difference\": 1,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamSizeBalanceRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamDifferenceRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Difference\": 2,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamDifferenceRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"TeamTicketSizeSimilarityRule\": {\n \"Name\": \"TeamTicketSizeSimilarityRule\",\n \"SecondsUntilOptional\": 180\n },\n \"Teams\": [\n {\n \"Name\": \"monster\",\n \"MinTeamSize\": 1,\n \"MaxTeamSize\": 1\n },\n {\n \"Name\": \"hunters\",\n \"MinTeamSize\": 4,\n \"MaxTeamSize\": 8\n }\n ],\n \"StatisticsVisibilityToPlayers\": {\n \"ShowNumberOfPlayersMatching\": true,\n \"ShowTimeToMatch\": true\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-EntityToken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue")
.header("X-EntityToken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"MatchmakingQueue\": {\n \"Name\": \"ExampleQueueName\",\n \"MinMatchSize\": 7,\n \"MaxMatchSize\": 8,\n \"MaxTicketSize\": 2,\n \"ServerAllocationEnabled\": true,\n \"BuildId\": \"065a3208-39af-4691-8794-5f774c367ac2\",\n \"DifferenceRules\": [\n {\n \"Difference\": 10,\n \"MergeFunction\": \"Average\",\n \"DefaultAttributeValue\": 0,\n \"LinearExpansion\": {\n \"Delta\": 0.5,\n \"Limit\": 20,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeDifference\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameDifference\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"StringEqualityRules\": [\n {\n \"DefaultAttributeValue\": \"ExampleDefault\",\n \"Expansion\": {\n \"EnabledOverrides\": [\n false,\n true,\n true,\n false\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeStringEquality\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameStringEquality\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"MatchTotalRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Min\": 2,\n \"Weight\": 1,\n \"Expansion\": {\n \"MaxOverrides\": [\n {\n \"Value\": 4\n },\n {\n \"Value\": 4\n },\n null\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"MatchTotalRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"SetIntersectionRules\": [\n {\n \"DefaultAttributeValue\": [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"MinIntersectionSize\": 2,\n \"LinearExpansion\": {\n \"Delta\": 2,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeSetIntersectionRule\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameSetIntersectionRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"RegionSelectionRule\": {\n \"MaxLatency\": 250,\n \"Path\": \"Latencies\",\n \"LinearExpansion\": {\n \"Delta\": 10,\n \"Limit\": 300,\n \"SecondsBetweenExpansions\": 5\n },\n \"Weight\": 1,\n \"Name\": \"RegionSelectionRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamSizeBalanceRule\": {\n \"Difference\": 1,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamSizeBalanceRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamDifferenceRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Difference\": 2,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamDifferenceRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"TeamTicketSizeSimilarityRule\": {\n \"Name\": \"TeamTicketSizeSimilarityRule\",\n \"SecondsUntilOptional\": 180\n },\n \"Teams\": [\n {\n \"Name\": \"monster\",\n \"MinTeamSize\": 1,\n \"MaxTeamSize\": 1\n },\n {\n \"Name\": \"hunters\",\n \"MinTeamSize\": 4,\n \"MaxTeamSize\": 8\n }\n ],\n \"StatisticsVisibilityToPlayers\": {\n \"ShowNumberOfPlayersMatching\": true,\n \"ShowTimeToMatch\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{titleId}.playfabapi.com/Match/SetMatchmakingQueue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-EntityToken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"MatchmakingQueue\": {\n \"Name\": \"ExampleQueueName\",\n \"MinMatchSize\": 7,\n \"MaxMatchSize\": 8,\n \"MaxTicketSize\": 2,\n \"ServerAllocationEnabled\": true,\n \"BuildId\": \"065a3208-39af-4691-8794-5f774c367ac2\",\n \"DifferenceRules\": [\n {\n \"Difference\": 10,\n \"MergeFunction\": \"Average\",\n \"DefaultAttributeValue\": 0,\n \"LinearExpansion\": {\n \"Delta\": 0.5,\n \"Limit\": 20,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeDifference\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameDifference\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"StringEqualityRules\": [\n {\n \"DefaultAttributeValue\": \"ExampleDefault\",\n \"Expansion\": {\n \"EnabledOverrides\": [\n false,\n true,\n true,\n false\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeStringEquality\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameStringEquality\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"MatchTotalRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Min\": 2,\n \"Weight\": 1,\n \"Expansion\": {\n \"MaxOverrides\": [\n {\n \"Value\": 4\n },\n {\n \"Value\": 4\n },\n null\n ],\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"MatchTotalRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"SetIntersectionRules\": [\n {\n \"DefaultAttributeValue\": [\n \"a\",\n \"b\",\n \"c\"\n ],\n \"MinIntersectionSize\": 2,\n \"LinearExpansion\": {\n \"Delta\": 2,\n \"SecondsBetweenExpansions\": 5\n },\n \"Attribute\": {\n \"Path\": \"ExampleAttributeSetIntersectionRule\"\n },\n \"Weight\": 1,\n \"Name\": \"ExampleNameSetIntersectionRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"RegionSelectionRule\": {\n \"MaxLatency\": 250,\n \"Path\": \"Latencies\",\n \"LinearExpansion\": {\n \"Delta\": 10,\n \"Limit\": 300,\n \"SecondsBetweenExpansions\": 5\n },\n \"Weight\": 1,\n \"Name\": \"RegionSelectionRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamSizeBalanceRule\": {\n \"Difference\": 1,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamSizeBalanceRule\",\n \"SecondsUntilOptional\": 50\n },\n \"TeamDifferenceRules\": [\n {\n \"Attribute\": {\n \"Path\": \"ExampleAttribute\"\n },\n \"Difference\": 2,\n \"LinearExpansion\": {\n \"Delta\": 1,\n \"Limit\": 5,\n \"SecondsBetweenExpansions\": 5\n },\n \"Name\": \"TeamDifferenceRule\",\n \"SecondsUntilOptional\": 50\n }\n ],\n \"TeamTicketSizeSimilarityRule\": {\n \"Name\": \"TeamTicketSizeSimilarityRule\",\n \"SecondsUntilOptional\": 180\n },\n \"Teams\": [\n {\n \"Name\": \"monster\",\n \"MinTeamSize\": 1,\n \"MaxTeamSize\": 1\n },\n {\n \"Name\": \"hunters\",\n \"MinTeamSize\": 4,\n \"MaxTeamSize\": 8\n }\n ],\n \"StatisticsVisibilityToPlayers\": {\n \"ShowNumberOfPlayersMatching\": true,\n \"ShowTimeToMatch\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"status": "<string>",
"data": {}
}{
"code": 123,
"errorCode": 123,
"status": "<string>",
"error": "<string>",
"errorMessage": "<string>",
"errorDetails": {}
}