PlexPHP
declare(strict_types=1);
require 'vendor/autoload.php';
use LukeHagar\Plex_API;
$sdk = Plex_API\PlexAPI::builder()->build();
$response = $sdk->server->getServerIdentity(
);
if ($response->object !== null) {
// handle response
}require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new
res = s.server.get_server_identity()
if ! res.object.nil?
# handle response
endpackage main
import(
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New()
res, err := s.General.GetIdentity(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.operations.GetIdentityResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
PlexAPI sdk = PlexAPI.builder()
.build();
GetIdentityResponse res = sdk.general().getIdentity()
.call();
if (res.object().isPresent()) {
// handle response
}
}
}import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.general.getIdentity();
console.log(result);
}
run();curl --request GET \
--url https://{IP-description}.{identifier}.plex.direct:{port}/identityimport requests
url = "https://{IP-description}.{identifier}.plex.direct:{port}/identity"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{IP-description}.{identifier}.plex.direct:{port}/identity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"MediaContainer": {
"claimed": true,
"machineIdentifier": "<string>",
"size": 123,
"version": "<string>"
}
}General
Get PMS identity
Get details about this PMS’s identity
GET
/
identity
PlexPHP
declare(strict_types=1);
require 'vendor/autoload.php';
use LukeHagar\Plex_API;
$sdk = Plex_API\PlexAPI::builder()->build();
$response = $sdk->server->getServerIdentity(
);
if ($response->object !== null) {
// handle response
}require 'plex_ruby_sdk'
s = ::PlexRubySDK::PlexAPI.new
res = s.server.get_server_identity()
if ! res.object.nil?
# handle response
endpackage main
import(
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New()
res, err := s.General.GetIdentity(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.operations.GetIdentityResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
PlexAPI sdk = PlexAPI.builder()
.build();
GetIdentityResponse res = sdk.general().getIdentity()
.call();
if (res.object().isPresent()) {
// handle response
}
}
}import { PlexAPI } from "@lukehagar/plexjs";
const plexAPI = new PlexAPI();
async function run() {
const result = await plexAPI.general.getIdentity();
console.log(result);
}
run();curl --request GET \
--url https://{IP-description}.{identifier}.plex.direct:{port}/identityimport requests
url = "https://{IP-description}.{identifier}.plex.direct:{port}/identity"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{IP-description}.{identifier}.plex.direct:{port}/identity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"MediaContainer": {
"claimed": true,
"machineIdentifier": "<string>",
"size": 123,
"version": "<string>"
}
}Response
200 - application/json
OK
Show child attributes
Show child attributes
Was this page helpful?