screeps-api
    Preparing search index...

      screeps-api

      Guides

      Configuration and Credential Files
      Debugging
      v2 Migration Guide
      HTTP API Rate Limits
      Official and Unofficial Servers
      WebSocket API Endpoints

      Examples

      Interact with the Console
      Monitor Code Changes
      Download Memory
      WebSocket API Demo
      Terminal Client

      Common

      ScreepsConfigManager

      Provides features to find and load save configuration files.

      LoadConfigOptions
      ScreepsClientConfig

      User-configurable options for ScreepsHttpClient

      ScreepsHttpConfig

      Configuration and options for ScreepsHttpClient

      ScreepsJsonConfig
      ScreepsRawServerConfig

      Server configuration schema from ScreepsJsonConfig/ScreepsYamlConfig

      ScreepsServerConfig

      Normalized configuration for a single Screeps World server

      ScreepsYamlConfig
      ScreepsAppConfig

      An extension of ScreepsClientConfig that may contain properties intended for the app using ScreepsHttpClient.

      DEFAULT_CLIENT_CONFIG

      Defaults for ScreepsClientConfig

      DEFAULT_SERVER_HOST
      DEFAULT_SERVER_PATH

      Default value of ScreepsRawServerConfig.path

      Common - Decorations

      Related to decorations: cosmetic effects that can be applied to rooms and room objects.

      DecorationPropertyTypes

      All possible DecorationProperty types

      DecorationTypes

      Enumerates all possible Decoration.type values

      BadgeDecoration

      Represents a single premium user UserBadge. DecorationInstances of each badge can be earned by users via pixelization.

      BooleanProperty

      A configurable boolean property of a Decoration

      ColorProperty

      A configurable color property of a Decoration.

      Decoration

      Represents a single non-BadgeDecoration decoration. instances of each decoration can be earned by users via pixelization.

      DecorationBase

      Properties common to all decoration types

      DecorationInstance

      An instance of a Decoration that is owned by a user

      DecorationProperty

      A configurable property of a Decoration

      NumberProperty

      A configurable number property of a Decoration

      RangeProperty

      A configurable number property of a Decoration that only accepts values within a defined range.

      StringProperty

      A configurable string property of a Decoration

      DecorationPropertyType
      DecorationType

      Common - Market

      Related to the in-game market

      OpenOrder

      An active order on the in-game market

      Order

      A buy or sell order on the in-game market created by the authenticated user.

      ShardOrder

      An Order for a non-account-bound resource

      Common - Resources

      DepositResources

      Resources that can be combined in a StructureFactory to create commodities, which can then be sold to NPCs for a high price.

      IntershardResources

      An account-bound resource.

      MarketResources

      A resource that can be traded on the in-game market.

      MineralBaseCompoundResources

      A MineralCompoundResource that cannot be used as a boost.

      MineralBasedResources

      Any non-compressed mineral-based resource type.

      MineralBoostResources

      Resources created in a StructureLab that can be used to improve the performance of Creep parts.

      MineralResources

      Resources that can be combined in a StructureLab to create MineralBoostResources.

      Resources
      DepositResource
      IntershardResource
      MarketResource
      MineralBaseCompoundResource
      MineralBasedResource
      MineralBoostResource
      MineralCompoundResource

      A resource that was formed from the combination of two or more MineralResources in a StructureLab.

      MineralResource
      Resource

      A Resources value

      Common - Rooms

      Related to rooms and RoomObjects

      BodyPartTypes

      Possible body part types that may be added to a Creep

      BuildableStructureTypes

      Describes all possible types of Structures that can be built by a player and associated with a ConstructionSite

      FlagColors

      Flag colors

      PowerCreepClasses

      A PowerCreep archetype. Each has a unique set of powers.

      RoomObjectTypes

      Represents any possible entity that can physically exist in the game world.

      RoomStatIntervals

      A time interval (in minutes) that can be used to query room stats

      RoomStats

      Stats that are tracked for each user on a room-level basis

      RoomStatuses
      StructureTypes

      Describes all possible types of Structures that can exist in the game world.

      AnyCreep

      Common properties of Creeps and PowerCreeps

      ConstructionSite

      A site of a structure which is currently under construction.

      Creep

      Creeps are your units. Creeps can move, harvest energy, construct structures, attack another creeps, and perform other actions.

      Deposit

      A rare resource deposit needed for producing commodities. Can be harvested by creeps with a WORK body part.

      Effect

      A temporary status effect applied to a RoomObject

      Flag

      Represents a flag owned by the authenticated user.

      HasHits

      A RoomObject that can be damaged/destroyed

      HasOwner

      A RoomObject with an owner. The owner could be an NPC.

      HasRestrictedStore

      A RoomObject with a limited Store

      HasStore

      A RoomObject with a general-purpose Store.

      IntershardDestination

      Destination of an intershard StructurePortal

      IntrashardDestination

      Destination of an intrashard StructurePortal

      Mineral

      A mineral deposit. Can be harvested by creeps with a WORK body part using the extractor structure.

      Nuke

      A nuke landing position. This object cannot be removed or modified.

      Position

      Indicates the position of an object within a known room (which is why a room name field isn't included).

      PowerCreep

      Power Creeps are immortal "heroes" that are tied to your account and can be respawned in any PowerSpawn after death.

      RoomObject

      An entity that exists within the game world

      Ruin

      A destroyed structure. This is a walkable object.

      SayAction

      A say action performed by a Creep or PowerCreep

      Source

      An energy source object. Can be harvested by creeps with a WORK body part.

      StartEndPositions

      Indicates a start and end position within the same known room (which is why a room name field isn't included).

      Store

      An object that can contain resources in its cargo.

      Structure

      The base prototype object of all structures.

      StructureContainer

      A small container that can be used to store resources.

      StructureController

      Claim this structure to take control over the room.

      StructureExtension

      Contains energy which can be spent on spawning bigger creeps.

      StructureExtractor

      Allows creeps to harvest a mineral deposit.

      StructureFactory

      Produces trade commodities from base minerals and other commodities.

      StructureInvaderCore

      This NPC structure is a control center of NPC Strongholds, and also rules all invaders in the sector.

      StructureKeeperLair

      Non-player structure. Spawns NPC Source Keepers that guards energy sources and minerals in some rooms.

      StructureLab

      Produces mineral compounds from base minerals, boosts and unboosts creeps.

      Remotely transfers energy to another Link in the same room.

      StructureNuker

      Launches a nuke to another room dealing huge damage to the landing area.

      StructureObserver

      Provides visibility into a distant room from your script.

      StructurePortal

      A non-player structure. Instantly teleports your creeps to a distant room acting as a room exit tile.

      StructurePowerBank

      Non-player structure. Contains power resource which can be obtained by destroying the structure.

      StructurePowerSpawn

      Processes power into your account, and spawns power creeps with special unique powers.

      StructureRampart

      Blocks movement of hostile creeps, and defends your creeps and structures on the same tile.

      StructureRoad

      Decreases movement cost to 1. Using roads allows creating creeps with less MOVE body parts.

      StructureSpawn

      Spawn is your colony center. This structure can create, renew, and recycle creeps.

      StructureStorage

      A structure that can store huge amount of resource units.

      StructureTerminal

      Sends any resources to a Terminal in another room.

      StructureTower

      Remotely attacks or heals creeps, or repairs structures. Can be targeted to any object in the room.

      Tombstone

      A remnant of dead creeps. This is a walkable object.

      BodyPartType

      A BodyPartTypes value

      BuildableStructureType
      FlagColor

      A FlagColors value

      PowerCreepClass
      RoomObjectType
      RoomStat

      A RoomStats value

      RoomStatInterval
      RoomStatus

      A RoomStatuses value

      StructureType

      Common - Users

      Related to users and their accounts

      CpuShardLimits

      A user's CPU limits for each shard indexed by name.

      User

      High-level metadata for an individual user

      UserBadge

      Parameters used to render a player's SVG icon / logo / "bust" (as it is referenced in the client)

      UserBadgeSvgs

      A pair of SVG paths composing a premium UserBadge

      UserCodeModules

      A collection of JavaScript/WASM modules

      UserCodeWasmModule

      Binary contents of a WebAssembly (WASM) module

      Users

      A collection of user metadata keyed by user ID

      UserCodeModule

      Contents of a single module.

      INVADER_ID

      ID of the "Invader" NPC

      SOURCE_KEEPER_ID

      ID of the "Source Keeper" NPC

      HTTP API

      ScreepsHttpClient and other entities related to the HTTP API

      RateLimitPeriods

      All possible time periods over which a RateLimit can apply.

      ScreepsHttpMethods

      HTTP request methods/verbs used with Screeps API endpoints

      ScreepsApiError

      Thrown by ScreepsHttpClient endpoint methods when an HTTP 4xx/5xx response is received from an endpoint.

      ScreepsHttpClient

      Provides access to the Screeps HTTP Http.

      ScreepsRateLimitTracker

      Tracks rate limit status for all HTTP API endpoints.

      DebugOptions

      Options to use with ScreepsHttpClient.debug

      RateLimit

      Rate limit state for an individual HTTP API endpoint.

      RateLimitEvent

      Payload of ScreepsHttpClient.RATE_LIMIT events.

      RateLimitUpdate

      State that is included in response headers when a rate limit is hit.

      ScreepsDbUpdateResponse

      Generic HTTP API response to a request to update database records

      ScreepsDbUpdateResult

      MongoDB result output from an update operation

      ScreepsDbUpsertResponse

      Generic HTTP API response to a request to "upsert" (create or update) database records

      ScreepsDbUpsertResult

      MongoDB result output from an upsert operation

      ScreepsErrorResponse

      Response returned by some endpoints when an issue occurs.

      ScreepsHistoryTick

      Data from a single tick in a ScreepsRoomHistoryResponse

      ScreepsHttpRequest

      Contains all information needed to submit an API request via ScreepsHttpClient.req.

      ScreepsHttpResponse
      ScreepsOfficialAuthModResponse

      Fake GET /api/authmod response returned by official servers

      ScreepsResponse

      Body of a HTTP API success response.

      ScreepsRoomHistoryResponse

      GET /api/room-history / GET /room-history/${shard}/${room}/${tick}.json response

      ScreepsUnknownResponse

      Body of an HTTP API success response that has not been typed yet. Please consider submitting a PR to replace this with a defined type if you have a sample response body!

      ScreepsUnofficialAuthModResponse

      GET /api/authmod response returned by unofficial servers

      ScreepsVersionResponse

      GET /api/version response

      RateLimitPeriod
      ScreepsAuthModResponse

      GET /api/authmod response

      ScreepsHttpMethod
      GLOBAL_RATE_LIMIT_DELAY

      Specifies the delay between retry attempts for API requests that are rejected due to the global rate limit.

      OFFICIAL_HISTORY_INTERVAL

      The expected number of ticks in a ScreepsRoomHistoryResponse from an official server.

      PRIVATE_HISTORY_INTERVAL

      The expected number of ticks in a ScreepsRoomHistoryResponse from an unofficial server.

      HTTP API - Auth

      Used with ScreepsHttpClient endpoint methods on the /api/auth path

      AuthMeResponse

      GET /api/auth/me response

      AuthQueryTokenResponse

      GET /api/auth/query-token response

      AuthQueryTokenResult

      Information about an API auth token from a AuthQueryTokenResponse

      AuthSigninResponse

      POST /api/auth/signin response

      HTTP API - Experimental

      Used with ScreepsHttpClient endpoint methods on the /api/experimental path

      ExperimentalNukesResponse

      GET /api/experimental/nukes response

      ExperimentalPvpResponse

      GET /api/experimental/pvp response

      HTTP API - Game

      Used with ScreepsHttpClient endpoint methods on the /api/game path

      MapStats

      Stats that can be used with the POST /api/game/map-stats endpoint

      RoomTerrainTypes

      Room terrain types in a human-readable format

      GameCreateConstructionResponse

      POST /api/game/create-construction response

      GameGenUniqueNameResponse

      POST /api/game/gen-unique-flag-name and POST /api/game/gen-unique-object-name responses

      GameMapStatsResponse

      POST /api/game/map-stats response

      GameMapStatsRoom

      A single room result from GameMapStatsResponse

      GameRoomDecorationsResponse

      GET /api/game/room-decorations response

      GameRoomObjectsResponse

      GET /api/game/room-objects response

      GameRoomOverviewResponse

      GET /api/game/room-overview response

      GameRoomStatusResponse

      GET /api/game/room-status response

      GameRoomTerrainEncodedResponse

      GET /api/game/room-terrain response when encoded param is defined and non-empty

      GameRoomTerrainUnencodedResponse

      GET /api/game/room-terrain response when the encoded param is undefined or empty (undefined, null, '', etc)

      GameTimeResponse

      GET /api/game/time response

      GameWorldSizeResponse

      GET /api/game/world-size response

      Sign

      A player signature on a room controller

      SystemSign

      A system signature on a room / room controller

      UnencodedRoomTerrain

      Non-plain terrain data for a single room position

      MapStat

      A MapStats value

      RoomTerrain

      HTTP API - Game/Market

      Used with ScreepsHttpClient endpoint methods on the /api/game/market path

      GameMarketIndexResponse

      GET /api/game/market/orders-index response

      GameMarketOrdersResponse

      GET /api/game/market/orders response

      GameMarketStatsResponse

      GET /api/game/market/stats resonse

      GameMarketMyOrdersResponse

      GET /api/game/market/my-orders response

      HTTP API - Game/Shards

      Used with ScreepsHttpClient endpoint methods on the /api/game/shards path

      GameShardsInfoResponse

      GET /api/game/shards/info response

      HTTP API - Leaderboard

      Used with ScreepsHttpClient endpoint methods on the /api/leaderboard path

      LeaderboardModes

      The types of leaderboard available via the leaderboard endpoints (ex: ScreepsHttpClient.leaderboardList)

      LeaderboardFindResponse

      GET /api/leaderboard/find response

      LeaderboardListResponse

      GET /api/leaderboard/list response

      LeaderboardResult

      A user's leaderboard result for a single season

      LeaderboardSeasonsResponse

      GET /api/leaderboard/seasons response

      LeaderboardMode

      HTTP API - Scoreboard

      Used with ScreepsHttpClient endpoint methods on the /api/scoreboard path

      ScoreboardListResponse

      GET /api/scoreboard/list response

      ScoreboardUser

      HTTP API - Seasons

      Used with ScreepsHttpClient endpoint methods on the /api/seasons path

      SeasonsCurrentResponse

      GET /api/seasons/current response

      HTTP API - Servers

      Used with ScreepsHttpClient endpoint methods on the /api/servers path

      Server

      A server from ServerListResponse

      ServerListResponse

      POST /api/servers/list response: a curated list of community-run servers

      HTTP API - User

      Used with ScreepsHttpClient endpoint methods on the /api/user path

      UserWorldStatuses

      A user's status on the server. This is used to determine whether or not they may claim a room or place a spawn directly (to spawn/respawn).

      MoneyHistoryChangeOrderPrice

      UserMoneyHistoryTransaction.market information about an order update triggered via Game.market.changeOrderPrice().

      MoneyHistoryExtendOrder

      UserMoneyHistoryTransaction.market information about an order update triggered via Game.market.extendOrder().

      MoneyHistoryFillOrder

      UserMoneyHistoryTransaction.market details of a market transaction executed via Game.market.deal().

      MoneyHistoryNewOrder

      UserMoneyHistoryTransaction.market information about a market Order created via Game.market.createOrder().

      UserBranchesResponse

      GET /api/user/branches response

      UserCodeGetResponse

      GET /api/user/code response

      UserCodeSetRequest

      POST /api/user/code response

      UserConsoleResponse

      POST /api/user/console response

      UserFindResponse

      GET /api/user/find response

      UserInfo

      A result from UserFindResponse

      UserMemoryGetResponse

      GET /api/user/memory response

      UserMemorySegmentGetResponse

      GET /api/user/memory-segment response

      UserMemorySetResponse

      POST /api/user/memory response

      UserMoneyHistoryResponse

      GET /api/user/money-history response

      UserMoneyHistoryTransaction

      A single record from UserMoneyHistoryResponse

      UserNameResponse

      GET /api/user/name response

      UserNotifyPrefsRequest

      POST /api/user/notify-prefs request

      UserOverviewResponse

      GET /api/user/overview response

      UserRespawnProhibitedRoomsResponse

      GET /api/user/respawn-prohibited-rooms response

      UserRoomsResponse

      GET /api/user/rooms response

      UserStatsResponse

      GET /api/user/stats response

      UserWorldStartRoomResponse

      GET /api/user/world-start-room response

      UserWorldStatusResponse

      GET /api/user/world-status response

      UserWorldStatus

      HTTP API - User/Decorations

      Used with ScreepsHttpClient endpoint methods on the /api/user/decorations path

      UserDecorationInventoryResponse

      GET /api/user/decorations/inventory response

      UserDecorationThemesResponse

      GET /api/user/decorations/themes response

      HTTP API - User/Messages

      Used with ScreepsHttpClient endpoint methods on the /api/user/messages path

      ListMessage
      Message

      A message result from UserMessagesIndexResponse

      UserMessagesIndexResponse

      GET /api/user/messages/index response

      UserMessagesListResponse

      GET /api/user/messages/list response

      UserMessagesMarkReadResponse

      POST /api/user/messages/mark-read response

      UserMessagesUnreadCountResponse

      GET /api/user/messages/unread-count response

      HTTP API - Warpath

      Used with ScreepsHttpClient endpoint methods on the /api/warpath path

      WarpathBattle

      An individual battle from WarpathBattlesResponse

      WarpathBattlesResponse

      Response from GET /api/warpath/battles on a game server, or any GET * /battles.json endpoints on Voight-Kampff

      WebSocket API

      ScreepsSocketClient and other entities related to the WebSocket API

      ScreepsSocketClient

      Provides access to the Screeps WebSocket API.

      MapVisualEvent

      WebSocket event for map visuals on the alpha version of the world map.

      RoomEvent

      WebSocket event for room objects and other room state updates.

      RoomEventData

      Payload of a RoomEvent

      RoomMap2Event

      WebSocket event for updates to the map (appears to apply to the original map, alpha map, and minimap in the room view).

      RoomMap2EventData

      Payload of a RoomMap2Event

      ScreepsSocketConfig

      Configuration options for ScreepsSocketClient. These are used when calling ScreepsSocketClient.connect.

      SocketEvent

      Parsed version of a message received from the server via the WebSocket API.

      PositionTuple

      An [X, Y] tuple representing a room position

      DEFAULT_SOCKET_CONFIG

      WebSocket API - Server

      SocketEvents of type: 'server'

      ServerAuthStatuses

      Possible outcomes of a ServerAuthEvent.

      ServerAuthEvent

      WebSocket event for authentication responses.

      ServerAuthEventData

      Payload of a ServerAuthEvent

      ServerAuthStatus

      WebSocket API - User

      SocketEvents of type: 'user'

      MemoryEvent

      WebSocket event that appears to be related to the Memory inspector watch list.

      UserCodeEvent

      WebSocket event for code changes.

      UserCodeEventData

      Payload of a UserCodeEvent

      UserConsoleEvent

      WebSocket event for console output.

      UserConsoleEventData

      Payload of a UserConsoleEvent

      UserConsoleMessages
      UserCpuEvent

      WebSocket event for CPU/memory usage updates.

      UserCpuEventData

      Payload of a UserCpuEvent

      UserResourceEvent

      WebSocket event for updates to account-bound resources.

      ResourceEventConstant

      A resource type that can be included in UserResourceEventData

      UserResourceEventData

      Payload of a UserResourceEvent