### Python API Request Example Source: https://ultimeit.github.io/PalDefender/RESTAPI/authentication?q= Demonstrates how to perform an authenticated GET request using the requests library. ```python import requests base_url = "http://127.0.0.1:17993" # do not do this. Never store the token in any code. use smth like .env! This is only for demonstration. token = "DblJITQxmavSbIWyYIEwHiND2SkMsq1LGesgmlhgzNgu230TGRlNFoWp5cavqgoa" headers = {"Authorization": f"Bearer {token}"} r = requests.get(base_url + "/v1/pdapi/version", headers=headers, timeout=10) print(r.status_code, r.text) ``` -------------------------------- ### Read Inventory Examples Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/items?q= Examples of requests to retrieve inventory data for different player identifier types. ```http GET /v1/pdapi/items/steam_76561198087654321 ``` ```http GET /v1/pdapi/items/gdk_2533274812345678 ``` -------------------------------- ### Broadcast Request Example Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/broadcast Example of the HTTP request and body for broadcasting a restart warning. ```http POST /v1/pdapi/Broadcast ``` ```json { "Message": "Restart in 15 minutes." } ``` -------------------------------- ### Retrieve Guild Data Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/guild Examples of GET requests to fetch guild rosters, camps, and member information using a GUID. ```http GET /v1/pdapi/guild/f0a1c3e9-7d5b-4a28-8c33-411fdc2e6b74 ``` ```http GET /v1/pdapi/guild/92b8f6ac-1a3d-4a9e-8f52-cc741db8c20a ``` -------------------------------- ### REST API Startup Logs Source: https://ultimeit.github.io/PalDefender/RESTAPI/authentication?q= Example output observed in server logs upon successful API initialization. ```text [16:42:28][info] [RESTAPI] Loaded 'RESTConfig.json'. [16:42:31][info] [RESTAPI] Loaded 1 Bearer token. [16:42:31][info] [RESTAPI] Running PalDefender RESTAPI on port 17993 ``` -------------------------------- ### Learn every technology by PlayerUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/learntech?q= Example request to unlock all available technologies for a player using the 'All' keyword. ```http POST /v1/pdapi/learntech/92b8f6ac-1a3d-4a9e-8f52-cc741db8c20a ``` ```json { "Technology": "All" } ``` -------------------------------- ### Learn one technology for a Steam player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/learntech?q= Example request to unlock a single technology for a Steam player. ```http POST /v1/pdapi/learntech/steam_76561198087654321 ``` ```json { "Technology": "Technology_ElecBaton" } ``` -------------------------------- ### Send Restart Alert Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/alert Example request to broadcast a simple restart alert message. ```http POST /v1/pdapi/Alert ``` ```json { "Message": "Restart now." } ``` -------------------------------- ### Unban Steam User Example Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/unban?q= Example request to unban a Steam user with a specified reason. ```http POST /v1/pdapi/unban/steam_76561198012345678 ``` ```json { "Reason": "Appeal accepted" } ``` -------------------------------- ### Lookup Player by PlayerUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/player Example request using a PlayerUID as the player identifier. ```http GET /v1/pdapi/player/b7f4e91a-2c53-4d8f-a6e1-93c4bb62a7d1 ``` -------------------------------- ### PalServer Directory Structure Source: https://ultimeit.github.io/PalDefender/Installation Visual representation of the required file structure after installing PalDefender into the PalServer Win64 directory. ```text Palworld_Server/ ├── Engine/ ├── Pal/ │ ├── Binaries/ │ │ └── Win64 │ │ ├── config/ │ │ ├── PalDefender/ // Will be generated (Step 4) │ │ │ ├── Banlist.json │ │ │ ├── Config.json │ │ │ ├── Pals/ │ │ │ └── RESTAPI/ │ │ ├── <...> │ │ ├── PalDefender.dll << Put here (Step 2) │ │ ├── d3d9.dll << Put here (Step 2) │ │ ├── PalServer-Win64-Shipping-Cmd.exe │ │ └── PalServer-Win64-Shipping.exe │ ├── Content/ │ ├── Plugins/ │ └── Saved/ │ ├── Config/ │ │ ├── CrashReportClient/ │ │ └── WindowsServer/ │ │ ├── GameUserSettings.ini │ │ ├── <...> │ │ └── PalWorldSettings.ini │ ├── Crashes/ │ ├── <...> │ └── SaveGames/ │ ├── 0// │ │ ├── backup/ │ │ ├── Players/ │ │ ├── Level.sav │ │ └── LevelMeta.sav ├── PalServer.exe ├── steamclient.dll └── <...> ``` -------------------------------- ### Unban PS5 User Example Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/unban?q= Example request to unban a PS5 user without providing a specific reason. ```http POST /v1/pdapi/unban/ps5_c481a77e22004b9d ``` ```json {} ``` -------------------------------- ### Delete another base camp by GUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/deletebase Example request to delete a different base camp using its GUID. ```http POST /v1/pdapi/deletebase/81c2f0a4-6d7e-49fb-a11d-0d2f9f94b13c ``` -------------------------------- ### Delete a base camp by GUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/deletebase Example request to delete a specific base camp using its GUID. ```http POST /v1/pdapi/deletebase/13b9e8d7-4f2c-42a1-b79e-fc2a9186e4d5 ``` -------------------------------- ### Learn several technologies for a PS5 player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/learntech?q= Example request to unlock multiple technologies for a PS5 player using an array. ```http POST /v1/pdapi/learntech/ps5_0f4b8c2d91aa34ef ``` ```json { "Technology": [ "Technology_ElecBaton", "Technology_GrapplingGun" ] } ``` -------------------------------- ### Additional reward payload examples Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give_deprecated Standalone JSON payloads demonstrating reward structures for EXP/items and Pals/eggs. ```json { "UserID": "steam_76561198012345678", "EXP": 25000, "Items": [ { "ItemID": "Money", "Count": 10000 } ] } ``` ```json { "UserID": "steam_76561198012345678", "Pals": [ { "PalID": "Pengullet", "Level": 10 } ], "PalEggs": [ { "EggID": "PalEgg_Fire_01", "PalID": "Foxparks", "Level": 12 } ] } ``` -------------------------------- ### Unban IP with Reason Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/unbanip?q= Example request to unban an IP address including a reason for the action. ```http POST /v1/pdapi/unbanip/203.0.113.42 ``` ```json { "Reason": "Temporary block expired" } ``` -------------------------------- ### Kick GDK Player with Reason Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/kick Example request to kick a GDK player including a specific reason in the body. ```http POST /v1/pdapi/kick/gdk_2533274812345678 ``` ```json { "Reason": "AFK in event area" } ``` -------------------------------- ### Read progression by PlayerUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/progression Example request to retrieve progression data using a standard PlayerUID. ```http GET /v1/pdapi/progression/92b8f6ac-1a3d-4a9e-8f52-cc741db8c20a ``` -------------------------------- ### GET /v1/pdapi/guild/{guild_id} Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/guild Retrieves the roster and camp information for a specific guild identified by its GUID. ```APIDOC ## GET /v1/pdapi/guild/{guild_id} ### Description Retrieves the roster and camp information for a specific guild identified by its GUID. ### Method GET ### Endpoint /v1/pdapi/guild/{guild_id} ### Parameters #### Path Parameters - **guild_id** (string) - Required - The unique identifier of the guild. ### Response #### Success Response (200) - Returns guild roster and camp data. ### Error Handling - **401 INVALID_TOKEN**: Authorization header missing or invalid. - **403 MISSING_PERMISSION**: Token lacks required permissions. - **404 GUILD_NOT_FOUND**: No guild matched the supplied guild_id. - **500 REQUEST_TIMEOUT**: Internal game-thread callback timed out. ``` -------------------------------- ### Lookup Player by Steam UserID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/player Example request using a Steam UserID as the player identifier. ```http GET /v1/pdapi/player/steam_76561198012345678 ``` -------------------------------- ### Read unlocked techs by UserID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/techs?q= Example request to retrieve technology data using a UserID identifier. ```http GET /v1/pdapi/techs/gdk_2533274812345678 ``` -------------------------------- ### Send Multiline Alert Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/alert Example request to broadcast a multiline alert message. ```http POST /v1/pdapi/Alert ``` ```json { "Message": "Server restart in 5 minutes.\nPlease return to base." } ``` -------------------------------- ### Kick Steam Player with Default Reason Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/kick Example request to kick a Steam player using an empty body for a default reason. ```http POST /v1/pdapi/kick/steam_76561198087654321 ``` ```json {} ``` -------------------------------- ### Give template-backed egg by PlayerUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-paleggs Example request to grant an egg using a template file for a player identified by their PlayerUID. ```http POST /v1/pdapi/give/paleggs/6d2e8b40-73ef-4f11-9bb8-2e91a36e2f09 ``` ```json { "PalEggs": [ { "EggID": "PalEgg_Dark_01", "PalTemplate": "dark_event_reward.json" } ] } ``` -------------------------------- ### GET /v1/pdapi/players Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints List all players currently registered in the system. ```APIDOC ## GET /v1/pdapi/players ### Description List all players. ### Method GET ### Endpoint /v1/pdapi/players ``` -------------------------------- ### Read unlocked techs by PlayerUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/techs?q= Example request to retrieve technology data using a PlayerUID identifier. ```http GET /v1/pdapi/techs/f0a1c3e9-7d5b-4a28-8c33-411fdc2e6b74 ``` -------------------------------- ### Grant EXP and items request Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give_deprecated Example request body for granting experience points and currency items to a Steam user. ```http POST /v1/pdapi/give ``` ```json { "UserID": "steam_76561198012345678", "EXP": 25000, "Items": [ { "ItemID": "Money", "Count": 10000 } ] } ``` -------------------------------- ### PalDefender REST API Integration Source: https://ultimeit.github.io/PalDefender/RESTAPI/Examples/Python Demonstrates basic GET and POST requests to interact with the PalDefender API. Ensure the auth_token is managed securely via environment variables rather than hardcoding. ```python import random import requests url = "http://127.0.0.1:17993" # Do not store real tokens in code. Use an environment variable or secret manager. auth_token = "DblJITQxmavSbIWyYIEwHiND2SkMsq1LGesgmlhgzNgu230TGRlNFoWp5cavqgoa" headers = {"Authorization": f"Bearer {auth_token}"} def show(label: str, response: requests.Response): print(label) print("Status Code:", response.status_code) print("Response Body:", response.text) print() def test_version(): response = requests.get(url + "/v1/pdapi/version", headers=headers, timeout=10) show("GET /v1/pdapi/version", response) def test_guilds(): response = requests.get(url + "/v1/pdapi/guilds", headers=headers, timeout=10) show("GET /v1/pdapi/guilds", response) def test_guild(guild_id: str): response = requests.get(url + f"/v1/pdapi/guild/{guild_id}", headers=headers, timeout=10) show(f"GET /v1/pdapi/guild/{guild_id}", response) def test_rewards(user_id: str): progression = { "EXP": 100000, "Relics": { "CapturePower": 25, "MoveSpeed": 5, }, "TechnologyPoints": 10, "AncientTechnologyPoints": 5, } show( "POST /v1/pdapi/give/progression", requests.post(url + f"/v1/pdapi/give/progression/{user_id}", json=progression, headers=headers, timeout=10), ) items = { "Items": [ {"ItemID": "Launcher_Default_5", "Count": 1}, {"ItemID": "ExplosiveBullet", "Count": 500}, ] } show( "POST /v1/pdapi/give/items", requests.post(url + f"/v1/pdapi/give/items/{user_id}", json=items, headers=headers, timeout=10), ) pals = { "Pals": [ {"PalID": "Anubis", "Level": random.randint(1, 55)}, {"PalID": "Kirin", "Level": random.randint(1, 55)}, ] } show( "POST /v1/pdapi/give/pals", requests.post(url + f"/v1/pdapi/give/pals/{user_id}", json=pals, headers=headers, timeout=10), ) templates = {"PalTemplates": ["ExamplePalTemplate.json"]} show( "POST /v1/pdapi/give/paltemplate", requests.post(url + f"/v1/pdapi/give/paltemplate/{user_id}", json=templates, headers=headers, timeout=10), ) eggs = { "PalEggs": [ {"EggID": "PalEgg_Normal_01", "PalID": "Kirin", "Level": 15}, {"EggID": "PalEgg_Electricity_01", "PalTemplate": "ExamplePalTemplate.json"}, ] } show( "POST /v1/pdapi/give/paleggs", requests.post(url + f"/v1/pdapi/give/paleggs/{user_id}", json=eggs, headers=headers, timeout=10), ) tech = {"Technology": "All"} show( "POST /v1/pdapi/learntech", requests.post(url + f"/v1/pdapi/learntech/{user_id}", json=tech, headers=headers, timeout=10), ) if __name__ == "__main__": test_guilds() test_guild("44BC8C67-42886202--15E0478-70B511C2") test_version() test_rewards("steam_76561114233277828") ``` -------------------------------- ### /getpos Source: https://ultimeit.github.io/PalDefender/Commands?q= Gets your current position in the world or another player's position. ```APIDOC ## /getpos ### Description Gets your current position in the world. If a [UserId] is provided, gets the position of that player instead. ### Parameters - **UserId** (string) - Optional - The ID of the player whose position you want to get. ### Permissions Chat, RCON, Admin ``` -------------------------------- ### Give a starter Pal to a GDK player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-pals Example request to grant a single Pal to a player identified by GDK ID. ```http POST /v1/pdapi/give/pals/gdk_2533274812345678 ``` ```json { "Pals": [ { "PalID": "Pengullet", "Level": 10 } ] } ``` -------------------------------- ### GET /v1/pdapi/items/{player_identifier} Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/items?q= Retrieves the inventory items for a specified player. ```APIDOC ## GET /v1/pdapi/items/{player_identifier} ### Description Lists the target player's items. Item identifiers in responses can be searched on paldeck.cc/items. ### Method GET ### Endpoint /v1/pdapi/items/{player_identifier} ### Parameters #### Path Parameters - **player_identifier** (string) - Required - UserId or PlayerUID for the target player. ### Response #### Success Response (200) - **Meta** (object) - Target player metadata. - **Inventory** (object) - Inventory containers for the target player. #### Error Responses - **401** (INVALID_TOKEN) - The Authorization header is missing, malformed, or does not match a configured bearer token. - **403** (MISSING_PERMISSION) - The token is valid, but it does not include this endpoint permission. - **400** (INVALID_JSON) - A request body was supplied, but it could not be parsed as JSON. - **400** (REQUEST_FAILED) - The target player, player state, inventory data, or common inventory container could not be resolved. - **500** (REQUEST_TIMEOUT) - The internal game-thread callback did not complete within 5 seconds. ``` -------------------------------- ### Full Pal Summon Configuration Source: https://ultimeit.github.io/PalDefender/FileTypes/PalSummon A comprehensive example demonstrating all available status effect exclusions for a custom summon. ```json { "PalTemplate": "ExamplePalTemplate.json", "Uncapturable": true, "X": 230, "Y": -486, "Z": 4097, "DisableStatuses": [ "DrownCheck", "Poison", "Stun", "Coma", "Sleep", "Overwork", "Drown", "FallDamage", "LavaDamage", "Burn", "Wetness", "Freeze", "Electrical", "Muddy", "IvyCling", "Darkness" ] } ``` -------------------------------- ### Per-Pal Override Configuration Source: https://ultimeit.github.io/PalDefender/FileTypes/PalImportRules?q= Example configuration for specific Pal overrides, such as Anubis.json, to apply custom constraints different from global rules. ```json { "MaxValueLimitAction": "ClampToMaxValues", "DisallowedPassivesAction": "RemoveFromPal", "DisallowedPassives": [ "Legend", "Vampire" ], "AllowGenderNone": false, "MaxLevel": 10, "MaxRank": 3, "PalSouls": { "Health": 5, "Attack": 5, "Defense": 5, "CraftSpeed": 5 }, "IVs": { "Health": 50, "AttackMelee": 50, "AttackShot": 50, "Defense": 50 } } ``` -------------------------------- ### Forget all technologies for a Steam player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/forgettech Example request to remove all unlocked technologies from a Steam player. ```http POST /v1/pdapi/forgettech/steam_76561198012345678 ``` ```json { "Technology": "All" } ``` -------------------------------- ### Give EXP to a GDK player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-progression Example request and body for granting EXP to a player using their GDK identifier. ```http POST /v1/pdapi/give/progression/gdk_2533274898765432 ``` ```json { "EXP": 25000 } ``` -------------------------------- ### Unban IP with Default Reason Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/unbanip?q= Example request to unban an IP address without providing a specific reason. ```http POST /v1/pdapi/unbanip/198.51.100.87 ``` ```json {} ``` -------------------------------- ### Forget one technology for a GDK player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/forgettech Example request to remove a single technology from a GDK player. ```http POST /v1/pdapi/forgettech/gdk_2533274812345678 ``` ```json { "Technology": "Technology_ElecBaton" } ``` -------------------------------- ### Read progression by PS5 UserID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/progression Example request to retrieve progression data using a PS5 platform identifier. ```http GET /v1/pdapi/progression/ps5_c481a77e22004b9d ``` -------------------------------- ### Ban a PS5 User and IP Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/ban Example request to ban a PS5 user and their associated IP address. ```http POST /v1/pdapi/ban/ps5_0f4b8c2d91aa34ef ``` ```json { "Reason": "Ban evasion", "IP": true } ``` -------------------------------- ### Give Currency to PS5 Player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-items Example request to grant currency to a player using a PS5 identifier. ```http POST /v1/pdapi/give/items/ps5_0f4b8c2d91aa34ef ``` ```json { "Items": [ { "ItemID": "Money", "Count": 10000 } ] } ``` -------------------------------- ### Forget several technologies by PlayerUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/forgettech Example request to remove multiple specific technologies from a player using their PlayerUID. ```http POST /v1/pdapi/forgettech/b7f4e91a-2c53-4d8f-a6e1-93c4bb62a7d1 ``` ```json { "Technology": [ "Technology_ElecBaton", "Technology_GrapplingGun" ] } ``` -------------------------------- ### Give event Pals by PlayerUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-pals Example request to grant multiple Pals to a player identified by PlayerUID. ```http POST /v1/pdapi/give/pals/b7f4e91a-2c53-4d8f-a6e1-93c4bb62a7d1 ``` ```json { "Pals": [ { "PalID": "Anubis", "Level": 35 }, { "PalID": "Kitsun", "Level": 25 } ] } ``` -------------------------------- ### Send important log to mixed targets Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/send-player-message Example request for sending an important log message to multiple user IDs. ```http POST /v1/pdapi/SendPlayerMessage ``` ```json { "SendType": "PlayerLogImportant", "UserIDs": [ "ps5_0f4b8c2d91aa34ef", "6d2e8b40-73ef-4f11-9bb8-2e91a36e2f09", "gdk_2533274812345678" ], "Message": "The event starts in 10 minutes." } ``` -------------------------------- ### Give Ammo and Launcher to Steam Player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-items Example request to grant multiple items to a player using a Steam identifier. ```http POST /v1/pdapi/give/items/steam_76561198012345678 ``` ```json { "Items": [ { "ItemID": "ExplosiveBullet", "Count": 500 }, { "ItemID": "Launcher_Default_5", "Count": 1 } ] } ``` -------------------------------- ### /iwantplayerlist Source: https://ultimeit.github.io/PalDefender/Commands?q= Enables the in-game player list overlay. ```APIDOC ## /iwantplayerlist ### Description Enables the in-game player list overlay, allowing you to view every player's UserId and Player UID when you press ESC. ### Permissions Chat, RCON, Admin ``` -------------------------------- ### GET /v1/pdapi/items/{player_identifier} Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/items Retrieves the inventory items for a specified player. Requires a Bearer token with the REST.Items.Read permission. ```APIDOC ## GET /v1/pdapi/items/{player_identifier} ### Description Lists the target player's items. Item identifiers in responses can be searched on paldeck.cc/items. ### Method GET ### Endpoint /v1/pdapi/items/{player_identifier} ### Parameters #### Path Parameters - **player_identifier** (string) - Required - UserId or PlayerUID for the target player. ### Response #### Success Response (200) - **Meta** (object) - Target player metadata. - **Inventory** (object) - Inventory containers for the target player. #### Error Responses - **401** (INVALID_TOKEN) - The Authorization header is missing, malformed, or does not match a configured bearer token. - **403** (MISSING_PERMISSION) - The token is valid, but it does not include this endpoint permission. - **400** (INVALID_JSON) - A request body was supplied, but it could not be parsed as JSON. - **400** (REQUEST_FAILED) - The target player, player state, inventory data, or common inventory container could not be resolved. - **500** (REQUEST_TIMEOUT) - The internal game-thread callback did not complete within 5 seconds. ### Request Example GET /v1/pdapi/items/steam_76561198087654321 ``` -------------------------------- ### Manage Player Technology Source: https://ultimeit.github.io/PalDefender/Commands Commands to learn or unlearn technologies for a specific user. Use 'all' to modify the entire technology tree. ```text /learntech steam_76500000000000000 Tech001 /learntech gdk_25300000000000000 all ``` ```text /unlearntech gdk_25300000000000000 Tech001 /unlearntech steam_76500000000000000 all ``` -------------------------------- ### Send player chat to one user Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/send-player-message Example request for sending a chat message to a single user ID. ```http POST /v1/pdapi/SendPlayerMessage ``` ```json { "SendType": "PlayerChat", "UserID": "steam_76561198012345678", "Message": "Your shop order has arrived." } ``` -------------------------------- ### Give one template Pal to a Steam player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-paltemplate Example request to grant a single Pal template to a Steam user. ```http POST /v1/pdapi/give/paltemplate/steam_76561198087654321 ``` ```json { "PalTemplates": [ "starter_pengullet.json" ] } ``` -------------------------------- ### /adminlogin Source: https://ultimeit.github.io/PalDefender/Commands?q= Logs you into admin mode. ```APIDOC ## /adminlogin ### Description Logs you into admin mode. Requires your admin password as an argument. ### Parameters - **password** (string) - Required - The admin password. ### Permissions Chat ``` -------------------------------- ### Give raid reward templates to a PS5 player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-paltemplate Example request to grant multiple Pal templates to a PS5 user. ```http POST /v1/pdapi/give/paltemplate/ps5_c481a77e22004b9d ``` ```json { "PalTemplates": [ "raid_reward_01.json", "raid_reward_02.json" ] } ``` -------------------------------- ### Grant Pals and eggs request Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give_deprecated Example request body for granting specific Pal entities and eggs to a PS5 user. ```http POST /v1/pdapi/give ``` ```json { "UserID": "ps5_0f4b8c2d91aa34ef", "Pals": [ { "PalID": "Pengullet", "Level": 10 } ], "PalEggs": [ { "EggID": "PalEgg_Fire_01", "PalID": "Foxparks", "Level": 12 } ] } ``` -------------------------------- ### GET /v1/pdapi/players Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/players Lists known players with identifying and status information. Use it to build player selectors for admin tools. ```APIDOC ## GET /v1/pdapi/players ### Description Lists known players with identifying and status information. Use it to build player selectors for admin tools. ### Method GET ### Endpoint /v1/pdapi/players ### Response #### Success Response (200) - **Meta** (object) - Player list counts. - **Players** (object[]) - Known players with identifying, guild, status, and location information. #### Response Example { "Meta": { "PlayerCount": 10, "OnlineCount": 2 }, "Players": [ { "Name": "PlayerName", "IP": "127.0.0.1", "PlayerUID": "uid-123", "UserId": "user-456", "GuildName": "Guild", "GuildUUID": "uuid-789", "Status": "Online", "WorldLocation": { "x": 0, "y": 0, "z": 0 }, "MapLocation": { "x": 0, "y": 0, "z": 0 } } ] } ``` -------------------------------- ### /give Source: https://ultimeit.github.io/PalDefender/Commands?q= Gives a specific item to a player. ```APIDOC ## /give ### Description Gives a player an item and if specified how many. ### Syntax `/give [Amount=1]` ### Arguments - **UserId** (string) - Required - The ID of the player to give the item to. - **ItemId** (string) - Required - The item to give. - **Amount** (integer) - Optional - How many. Default: 1. ### Permissions Chat, RCON, Admin ### Example `/give steam_76500000000000000 Sword 2` ``` -------------------------------- ### GET /v1/pdapi/techs/{player_identifier} Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/techs?q= Retrieves technology information for a player, including unlocked and locked counts and specific technology IDs. ```APIDOC ## GET /v1/pdapi/techs/{player_identifier} ### Description Lists technology information for a player. Technology identifiers can be searched on paldeck.cc/technology. ### Method GET ### Endpoint /v1/pdapi/techs/{player_identifier} ### Parameters #### Path Parameters - **player_identifier** (string) - Required - UserId or PlayerUID for the target player. ### Response #### Success Response (200) - **Meta** (object) - Technology count metadata for the target player. - **Techs** (object) - Technology data for the target player. #### Response Example { "Meta": { "PlayerUID": "f0a1c3e9-7d5b-4a28-8c33-411fdc2e6b74", "Player": "f0a1c3e9-7d5b-4a28-8c33-411fdc2e6b74", "UnlockedCount": 10, "LockedCount": 5, "TotalCount": 15 }, "Techs": { "Unlocked": ["TechID_1", "TechID_2"] } } ``` -------------------------------- ### POST /v1/pdapi/learntech/ Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/learntech?q= Learns one, many, or all technologies for a player. ```APIDOC ## POST /v1/pdapi/learntech/ ### Description Learns one, many, or all technologies for a player. Requires a Bearer token with the REST.Techs.Learn permission. ### Method POST ### Endpoint /v1/pdapi/learntech/ ### Parameters #### Path Parameters - **player_identifier** (string) - Required - UserId or PlayerUID for the target player. #### Request Body - **Technology** (string|array) - Required - A single TechID, the string "All", or an array of TechID strings. ### Response #### Success Response (200) - **UnlockedCount** (integer) - Number of technologies unlocked by this request. - **Unlocked** (string[]) - Technology IDs that were unlocked. - **Skipped** (string[]) - Technology IDs skipped because they were already unlocked. ### Error Handling - **401** (INVALID_TOKEN) - Authorization header missing or invalid. - **403** (MISSING_PERMISSION) - Token lacks REST.Techs.Learn permission. - **400** (INVALID_JSON) - Request body could not be parsed. - **400** (INVALID_REQUEST) - Technology field missing or invalid format. - **400** (VALIDATION_FAILED) - Invalid technology identifier provided. - **400** (REQUEST_FAILED) - Game-thread callback or resolver failed. - **500** (REQUEST_TIMEOUT) - Internal request timeout. ``` -------------------------------- ### Ban a Steam User Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/ban Example request to ban a specific Steam user. ```http POST /v1/pdapi/ban/steam_76561198012345678 ``` ```json { "Reason": "Chargeback fraud" } ``` -------------------------------- ### Spawn Pal Egg from Template Command Source: https://ultimeit.github.io/PalDefender/Commands?q= Spawns a Pal egg using a predefined PalTemplate file. ```text /giveegg_j PalEgg_Ice_01 MyPalTemplate 10 ``` -------------------------------- ### Get Player IP Source: https://ultimeit.github.io/PalDefender/Commands?q= Retrieves the IP address associated with a specific UserId. ```text /getip gdk_25300000000000000 ``` -------------------------------- ### GET /v1/pdapi/version Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/version Retrieves the current version details of the PalDefender API. This endpoint is intended for health checks and version verification. ```APIDOC ## GET /v1/pdapi/version ### Description Use this endpoint as a health check and version check for tools, dashboards, and scripts. ### Method GET ### Endpoint /v1/pdapi/version ### Parameters None. ### Request Body No request body. ### Response #### Success Response (200) - **Version** (object) - PalDefender version details. - **Major** (integer) - Major version number. - **Minor** (integer) - Minor version number. - **Patch** (integer) - Patch version number. - **Build** (integer) - Build number. - **Version** (string) - Short version string. - **VersionLong** (string) - Long version string. - **Beta** (boolean) - Whether this build is marked as beta. #### Error Responses - **401** (INVALID_TOKEN) - The Authorization header is missing, malformed, or does not match a configured bearer token. - **403** (MISSING_PERMISSION) - The token is valid, but it does not include this endpoint permission. ``` -------------------------------- ### /version Source: https://ultimeit.github.io/PalDefender/Commands?q= Shows the Palworld game version and PalDefender version. ```APIDOC ## /version ### Description Shows the Palworld game version and PalDefender version. RCON returns JSON output. ### Permissions Chat, RCON, Admin ``` -------------------------------- ### Give points and relics by PlayerUID Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-progression Example request and body for granting multiple progression types including relics and technology points to a player using their PlayerUID. ```http POST /v1/pdapi/give/progression/f0a1c3e9-7d5b-4a28-8c33-411fdc2e6b74 ``` ```json { "Relics": { "CapturePower": 5, "MoveSpeed": 2 }, "TechnologyPoints": 10, "AncientTechnologyPoints": 2 } ``` -------------------------------- ### /giveitems Source: https://ultimeit.github.io/PalDefender/Commands?q= Gives a player multiple items in a single command. ```APIDOC ## /giveitems ### Description Gives a player more than 1 item in one command and if specified how many of each separated by a colon. ### Syntax `/giveitems [:] ...` ### Arguments - **UserId** (string) - Required - The ID of the player to give the items to. - **ItemId[:Amount]** (string) - Required - List of items and optional amounts. ### Permissions Chat, RCON, Admin ### Example `/giveitems gdk_25300000000000000 Sword:2 Shield:1` ``` -------------------------------- ### Get Player Position Source: https://ultimeit.github.io/PalDefender/Commands?q= Retrieves coordinates for the current user or a specified player ID. ```text /getpos /getpos steam_76500000000000000 ``` -------------------------------- ### GET /v1/pdapi/progression/{player_identifier} Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/progression Reads player progression values such as EXP, level-related state, relic totals, and technology point totals. ```APIDOC ## GET /v1/pdapi/progression/{player_identifier} ### Description Reads player progression values such as EXP, level-related state, relic totals, and technology point totals. ### Method GET ### Endpoint /v1/pdapi/progression/{player_identifier} ### Parameters #### Path Parameters - **player_identifier** (string) - Required - UserId or PlayerUID for the target player. ### Response #### Success Response (200) - **Meta** (object) - Target player metadata. - **Progression** (object) - Progression, currency, defeat, capture, and activity data. #### Error Responses - **401** (INVALID_TOKEN) - The Authorization header is missing, malformed, or does not match a configured bearer token. - **403** (MISSING_PERMISSION) - The token is valid, but it does not include this endpoint permission. - **400** (INVALID_JSON) - A request body was supplied, but it could not be parsed as JSON. - **400** (REQUEST_FAILED) - The target player, account, individual character data, record data, or technology data could not be resolved. - **500** (REQUEST_TIMEOUT) - The internal game-thread callback did not complete within 5 seconds. ``` -------------------------------- ### Give a leveled egg to a Steam player Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/give-paleggs Example request to grant a specific Pal egg to a player identified by their Steam ID. ```http POST /v1/pdapi/give/paleggs/steam_76561198012345678 ``` ```json { "PalEggs": [ { "EggID": "PalEgg_Fire_01", "PalID": "Foxparks", "Level": 12 } ] } ``` -------------------------------- ### GET /v1/pdapi/player/ Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/player Retrieves details for a single player using their UserId or PlayerUID. Requires a Bearer token with the REST.Player.Read permission. ```APIDOC ## GET /v1/pdapi/player/ ### Description Returns one player. The identifier can be a supported player identifier such as UserId or PlayerUID. ### Method GET ### Endpoint /v1/pdapi/player/ ### Parameters #### Path Parameters - **player_identifier** (string) - Required - UserId or PlayerUID for the target player. ### Response #### Success Response (200) - **Player** (object) - Player details. - **Name** (string) - Current or saved player name. - **IP** (string) - Player IP address, or an empty string when unavailable. - **PlayerUID** (string) - Player UID used by Palworld save data. - **UserId** (string) - Platform user ID, or an empty string when unavailable. - **GuildName** (string) - Guild name, or an empty string when unavailable. - **GuildUUID** (string) - Guild UUID, or a zero GUID when unavailable. - **Status** (string) - Saved player account state. - **WorldLocation** (object) - Current or last saved world coordinates (x, y, z). - **MapLocation** (object) - Converted map coordinates (x, y, z). ``` -------------------------------- ### Check Server Version Source: https://ultimeit.github.io/PalDefender/Commands?q= Displays the current Palworld and PalDefender versions. ```text /version ``` -------------------------------- ### Ban an IP Address Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/banip Example request to ban an IP address without associating a user. ```http POST /v1/pdapi/banip/203.0.113.42 ``` ```json { "Reason": "Bot traffic" } ``` -------------------------------- ### /whitelist_add Source: https://ultimeit.github.io/PalDefender/Commands?q= Adds a player to the whitelist. ```APIDOC ## /whitelist_add ### Description Adds a UserId to the whitelist. ### Syntax `/whitelist_add ` ### Arguments - **UserId** (string) - Required - The ID of the player to whitelist. ### Permissions Chat, RCON, Admin ``` -------------------------------- ### /summon Source: https://ultimeit.github.io/PalDefender/Commands?q= Spawns a Pal using a PalSummon file. ```APIDOC ## /summon ### Description Spawns a Pal using the provided PalSummon file. ### Syntax `/summon ` ### Arguments - **PalSummon** (string) - Required - The name of the PalSummon file. ### Permissions Chat, RCON, Admin ### Example `/summon PalSummon` ``` -------------------------------- ### /addadminip Source: https://ultimeit.github.io/PalDefender/Commands?q= Adds an IP address to admin whitelist. ```APIDOC ## /addadminip ### Description Adds an IP address to admin whitelist. ### Parameters - **IP** (string) - Required - The IP address to add as admin. ### Permissions Chat, RCON, Admin ``` -------------------------------- ### Spawn Personal Pal Egg from Template Command Source: https://ultimeit.github.io/PalDefender/Commands?q= Spawns a Pal egg directly into the user's inventory using a PalTemplate file. ```text /givemeegg_j PalEgg_Ice_01 MyPalTemplate 10 ``` -------------------------------- ### /giveme Source: https://ultimeit.github.io/PalDefender/Commands?q= Gives the caller a specific item. ```APIDOC ## /giveme ### Description Gives yourself an item and if specified how many. ### Syntax `/giveme [Amount=1]` ### Arguments - **ItemId** (string) - Required - The item to give yourself. - **Amount** (integer) - Optional - How many. Default: 1. ### Permissions Chat, Admin ### Example `/giveme Sword 3` ``` -------------------------------- ### /togglepvp Source: https://ultimeit.github.io/PalDefender/Commands?q= Toggles server PvP on or off. ```APIDOC ## /togglepvp ### Description Toggles server PvP on or off for the current running session. ### Permissions Chat, Admin ``` -------------------------------- ### Admin Authentication Source: https://ultimeit.github.io/PalDefender/Commands?q= Logs the user into admin mode using a password. ```text /adminlogin mySecretPassword ``` -------------------------------- ### Configure Admin Whitelist in Config.json Source: https://ultimeit.github.io/PalDefender/FAQ Define authorized IP addresses for admin commands by updating the adminIPs array in the configuration file. ```json "useAdminWhitelist": true, "adminIPs": [ "127.0.0.1", "196.128.2.*", "123.222.111.122", "111.111.111.111", ], ``` -------------------------------- ### Token Configuration File Source: https://ultimeit.github.io/PalDefender/RESTAPI/authentication?q= Structure for a token file located in the Tokens directory. Each file represents a unique credential with specific permissions. ```json { "Name": "AdminPanel", "Token": "DblJITQxmavSbIWyYIEwHiND2SkMsq1LGesgmlhgzNgu230TGRlNFoWp5cavqgoa", "Permissions": [ "REST.*" ] } ``` -------------------------------- ### Set Server Time Source: https://ultimeit.github.io/PalDefender/Commands?q= Adjusts the in-game time using hours or keywords. ```text /settime 12 /settime night ``` -------------------------------- ### GET /v1/pdapi/pals/ Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/pals?q= Retrieves the target player's Pals. Requires a Bearer token and the REST.Pals.Read permission. ```APIDOC ## GET /v1/pdapi/pals/ ### Description Lists the target player's Pals, including team members, Palbox contents, and base camp workers. ### Method GET ### Endpoint /v1/pdapi/pals/ ### Parameters #### Path Parameters - **player_identifier** (string) - Required - UserId or PlayerUID for the target player. ### Response #### Success Response (200) - **Meta** (object) - Target player metadata and Pal counts. - **Pals** (object) - Team, Palbox, and base camp Pals for the target player. ``` -------------------------------- ### /kick Source: https://ultimeit.github.io/PalDefender/Commands?q= Kicks a player from the server. ```APIDOC ## /kick ### Description Kicks a player from the server. ### Syntax `/kick [Reason="Kicked by Admin."]` ### Arguments - **UserId** (string) - Required - The ID of the player to kick. - **Reason** (string) - Optional - Reason for kicking. ### Permissions Chat, RCON, Admin ``` -------------------------------- ### Permission Configuration Note Source: https://ultimeit.github.io/PalDefender/RESTAPI/authentication?q= Note regarding the format of the Permissions field in token files. ```text `Permissions` may be a string or an array of strings. Use narrower permissions for public dashboards or automation that should not have full admin access. ``` -------------------------------- ### Health and version check request Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/version A simple GET request to retrieve the current version details of the PalDefender API. ```http GET /v1/pdapi/version ``` -------------------------------- ### GET /v1/pdapi/pals/{player_identifier} Source: https://ultimeit.github.io/PalDefender/RESTAPI/Endpoints/pals Retrieves a list of Pals associated with a specific player identified by their platform ID or PlayerUID. ```APIDOC ## GET /v1/pdapi/pals/{player_identifier} ### Description Retrieves the Pals associated with a player. This is used to review player inventories, confirm reward delivery, or investigate missing items. ### Method GET ### Endpoint /v1/pdapi/pals/{player_identifier} ### Parameters #### Path Parameters - **player_identifier** (string) - Required - The unique identifier for the player (e.g., PS5 platform ID or PlayerUID). ``` -------------------------------- ### /getip Source: https://ultimeit.github.io/PalDefender/Commands?q= Retrieves the IP address of a player. ```APIDOC ## /getip ### Description Shows you the IP address of a player. ### Syntax `/getip ` ### Arguments - **UserId** (string) - Required - The ID of the player. ### Permissions Chat, RCON, Admin ``` -------------------------------- ### Toggle PvP Source: https://ultimeit.github.io/PalDefender/Commands?q= Enables or disables PvP for the current session. ```text /togglepvp ``` -------------------------------- ### Give Self a Pal via Template Source: https://ultimeit.github.io/PalDefender/Commands?q= Assigns a Pal to the command invoker using a template file. ```text /givemepal_j MyPalTemplate ``` -------------------------------- ### Enable Player List Overlay Source: https://ultimeit.github.io/PalDefender/Commands?q= Activates the in-game overlay to view player IDs. ```text /iwantplayerlist ```