ユーザー パブリッシャー読み取り専用データの取得
Retrieves the publisher-specific custom data for the user which can only be read by the client
curl --request POST \
--url https://{titleId}.playfabapi.com/Admin/GetUserPublisherReadOnlyData \
--header 'Content-Type: application/json' \
--header 'X-SecretKey: <api-key>' \
--data '
{
"PlayFabId": "2039475",
"Keys": [
"preferences",
"progress"
],
"IfChangedFromDataVersion": 13
}
'import requests
url = "https://{titleId}.playfabapi.com/Admin/GetUserPublisherReadOnlyData"
payload = {
"PlayFabId": "2039475",
"Keys": ["preferences", "progress"],
"IfChangedFromDataVersion": 13
}
headers = {
"X-SecretKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-SecretKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
PlayFabId: '2039475',
Keys: ['preferences', 'progress'],
IfChangedFromDataVersion: 13
})
};
fetch('https://{titleId}.playfabapi.com/Admin/GetUserPublisherReadOnlyData', 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/Admin/GetUserPublisherReadOnlyData",
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([
'PlayFabId' => '2039475',
'Keys' => [
'preferences',
'progress'
],
'IfChangedFromDataVersion' => 13
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-SecretKey: <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/Admin/GetUserPublisherReadOnlyData"
payload := strings.NewReader("{\n \"PlayFabId\": \"2039475\",\n \"Keys\": [\n \"preferences\",\n \"progress\"\n ],\n \"IfChangedFromDataVersion\": 13\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-SecretKey", "<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/Admin/GetUserPublisherReadOnlyData")
.header("X-SecretKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"PlayFabId\": \"2039475\",\n \"Keys\": [\n \"preferences\",\n \"progress\"\n ],\n \"IfChangedFromDataVersion\": 13\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{titleId}.playfabapi.com/Admin/GetUserPublisherReadOnlyData")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-SecretKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"PlayFabId\": \"2039475\",\n \"Keys\": [\n \"preferences\",\n \"progress\"\n ],\n \"IfChangedFromDataVersion\": 13\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"status": "OK",
"data": {
"PlayFabId": "2039475",
"DataVersion": 12,
"Data": {
"preferences": {
"Value": "alpha",
"LastUpdated": "2014-08-20T12:30:45",
"Permission": "Public"
},
"progress": {
"Value": "level_twenty",
"LastUpdated": "2014-09-01T10:12:30"
}
}
}
}{
"code": 123,
"errorCode": 123,
"status": "<string>",
"error": "<string>",
"errorMessage": "<string>",
"errorDetails": {}
}承認
This API requires a title secret key, available to title admins, from PlayFab Game Manager.
ボディ
Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned will only contain the data specific to the indicated Keys. Otherwise, the full set of custom user data will be returned.
Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned will only contain the data specific to the indicated Keys. Otherwise, the full set of custom user data will be returned.
Unique PlayFab assigned ID of the user on whom the operation will be performed.
The version that currently exists according to the caller. The call will return the data for all of the keys if the version in the system is greater than this.
Specific keys to search for in the custom user data.
レスポンス
The Http status code. If X-ReportErrorAsSuccess header is set to true, this will report the actual http error code.
The Http status code as a string.
Show child attributes
Show child attributes
{
"PlayFabId": "2039475",
"DataVersion": 12,
"Data": {
"preferences": {
"Value": "alpha",
"LastUpdated": "2014-08-20T12:30:45",
"Permission": "Public"
},
"progress": {
"Value": "level_twenty",
"LastUpdated": "2014-09-01T10:12:30"
}
}
}
このページは役に立ちましたか?
curl --request POST \
--url https://{titleId}.playfabapi.com/Admin/GetUserPublisherReadOnlyData \
--header 'Content-Type: application/json' \
--header 'X-SecretKey: <api-key>' \
--data '
{
"PlayFabId": "2039475",
"Keys": [
"preferences",
"progress"
],
"IfChangedFromDataVersion": 13
}
'import requests
url = "https://{titleId}.playfabapi.com/Admin/GetUserPublisherReadOnlyData"
payload = {
"PlayFabId": "2039475",
"Keys": ["preferences", "progress"],
"IfChangedFromDataVersion": 13
}
headers = {
"X-SecretKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-SecretKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
PlayFabId: '2039475',
Keys: ['preferences', 'progress'],
IfChangedFromDataVersion: 13
})
};
fetch('https://{titleId}.playfabapi.com/Admin/GetUserPublisherReadOnlyData', 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/Admin/GetUserPublisherReadOnlyData",
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([
'PlayFabId' => '2039475',
'Keys' => [
'preferences',
'progress'
],
'IfChangedFromDataVersion' => 13
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-SecretKey: <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/Admin/GetUserPublisherReadOnlyData"
payload := strings.NewReader("{\n \"PlayFabId\": \"2039475\",\n \"Keys\": [\n \"preferences\",\n \"progress\"\n ],\n \"IfChangedFromDataVersion\": 13\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-SecretKey", "<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/Admin/GetUserPublisherReadOnlyData")
.header("X-SecretKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"PlayFabId\": \"2039475\",\n \"Keys\": [\n \"preferences\",\n \"progress\"\n ],\n \"IfChangedFromDataVersion\": 13\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{titleId}.playfabapi.com/Admin/GetUserPublisherReadOnlyData")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-SecretKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"PlayFabId\": \"2039475\",\n \"Keys\": [\n \"preferences\",\n \"progress\"\n ],\n \"IfChangedFromDataVersion\": 13\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"status": "OK",
"data": {
"PlayFabId": "2039475",
"DataVersion": 12,
"Data": {
"preferences": {
"Value": "alpha",
"LastUpdated": "2014-08-20T12:30:45",
"Permission": "Public"
},
"progress": {
"Value": "level_twenty",
"LastUpdated": "2014-09-01T10:12:30"
}
}
}
}{
"code": 123,
"errorCode": 123,
"status": "<string>",
"error": "<string>",
"errorMessage": "<string>",
"errorDetails": {}
}