Homebase API #

The Homebase API provides tools to manage your environments and deployments. This page describes all of the current Homebase API actions.

Use the following steps to access the Homebase API:

  1. Connect to the VPN using the *.ovpn file provided to you during onboarding.
  2. Navigate to your Homebase API URL. For example: https://api.homebase.<studioname>.pragmaengine.com/.
V0 endpoints are in development. We don’t recommend using V0 endpoints in production.

Artifacts #

listAllVersions

listAllVersions #

Lists all successfully built versions of your engine. You can choose which type of builds to list.

Request #

  • artifactType: The type of successful builds to display.
  • titleId: The defined codename of your game.

Example Request

{
    "artifactType": "platform",
    "titleId": "arbiter"
}

Response #

  • artifactType: The type of builds displayed.
  • branch: The branch the successful build was built from.
  • createdAt: The date and time that the build succeeded.
  • s3Key: The key of the Amazon S3 bucket that contains the build.
  • version: The build version. The build version contains metadata about your build.

Example Response

{
  "versions": [
    {
      "artifactType": "platform",
      "branch": "main",
      "createdAt": "2023-04-21T22:14:10Z",
      "s3Key": "arbiter/platform/0.0.961-0.0.93-WIP/140-e65edb1/platform.tar.gz",
      "version": "0.0.961-0.0.93-WIP+140-e65edb1"
    },
    {
      "artifactType": "platform",
      "branch": "main",
      "createdAt": "2023-04-21T22:32:05Z",
      "s3Key": "arbiter/platform/0.0.961-0.0.93-WIP/141-b863327/platform.tar.gz",
      "version": "0.0.961-0.0.93-WIP+141-b863327"
    },
    ...
  ]
}
publishGamesrvV1

publishGamesrvV1 #

Publishes a successful game server build for use by your game servers. You can use this with your own build pipeline or with the built in Pragma publishing processes.

Request #

  • file: Upload a Pragma Engine game server build for your game server.
  • titleId: The defined codename of your game.
  • version: The build version. The build version contains metadata about your build. You can find your build version by using the listAllVersionV1 API action.

Response #

  • s3Bucket: The Amazon S3 bucket that your game build is stored in to be used with your game server.
  • s3Key: The Amazon S3 key used with the related bucket.

Example Response

{
  "s3Bucket": "arbiter-example-bucket",
  "s3Key": "arbiter/gameserv/0.0.961-0.0.93-WIP/141-b863327/gameserv.tar.gz"
}

Management #

appStatusV0

appStatusV0 #

Returns the status of all running Pragma Engine instances.

Request #

No parameters required.

Response #

  • UpdatedAt: The last date and time that the engine instance was updated.
  • DogTag: And internal value used to identify the deployed platform host.
  • Platform: The current version of Pragma Engine that the instance is running.
  • Content: The version of the content built on this instance of the engine.
  • LaunchTime: The date and time that the instance was started.
  • Config: The version of the config built to this instance of the engine.
  • IsHealthy: Returns true if there is a recent UpdatedAt response.
  • InstanceId: The automatically generated ID of the engine instance.
  • IpAddress: The IP address of the engine instance. This is where the engine is currently running.
  • ShardId: The ID of the shard that the instance is running on. The shard contains all of your environment and configuration variables. This is used to differentiate between deployments such as production and development.
  • ProjectId: The studio project name provided to you during onboarding.
  • Portal: The version of the portal built on this instance of the engine.
  • CompositeKey: The composite key consists of your projectId-shardId-dogTag.
  • AppStatusVersion: The version of the app status built on this instance of the engine.
  • StackId: The code name of your game.

Example Response

{
  "instances": [
    {
      "UpdatedAt": {
        "value": "2023-06-13T20:04:22Z"
      },
      "DogTag": {
        "value": "backend"
      },
      "Platform": {
        "value": "0.0.961-0.0.94-WIP+2-03597a9"
      },
      "Content": {
        "value": "20230608.0001-03597a9"
      },
      "LaunchTime": {
        "value": "2023-06-08T21:05:53Z"
      },
      "Config": {
        "value": "20230608.0001-03597a9"
      },
      "IsHealthy": {
        "value": true
      },
      "InstanceId": {
        "value": "i-0f5a1948063f87aec"
      },
      "IpAddress": {
        "value": "10.4.177.74"
      },
      "ShardId": {
        "value": "live"
      },
      "ProjectId": {
        "value": "arbiterstudios"
      },
      "Portal": {
        "value": "0.0.961-0.0.94-WIP+2-03597a9"
      },
      "CompositeKey": {
        "value": "arbiterstudios-arbiter-live-backend"
      },
      "AppStatusVersion": {
        "value": "0.0.20"
      },
      "StackId": {
        "value": "arbiter"
      }
    },
    ...
  ]
}
lastDeployedVersionV1

lastDeployedVersionV1 #

Lists the deployed versions on each of your shards.

Request #

No parameters required.

Response #

  • titleId: The codename of your game.
  • shardId: The ID of the shard that the instance is running on. The shard contains all of your environment and configuration variables.
  • versions: The most recently built version of each part of your Pragma Engine instance.

Example Response

{
  "shards": [
    {
      "titleId": "arbiter",
      "shardId": "live",
      "versions": {
        "config": "20230608.0001-03597a9",
        "portal": "0.0.961-0.0.94-WIP+2-03597a9",
        "content": "20230608.0001-03597a9",
        "platform": "0.0.961-0.0.94-WIP+2-03597a9",
        "gamesrv": "12e52453e"
      }
    },
    {
      "titleId": "arbiter",
      "shardId": "multiplay",
      "versions": {
        "content": "20230515.0001-c269d92",
        "config": "20230515.0001-c269d92",
        "portal": "0.0.961-0.0.93-WIP+477-c269d92",
        "platform": "0.0.961-0.0.93-WIP+477-c269d92"
      }
    },
    ...
  ]
}
shardConfigurationV0

shardConfigurationV0 #

Returns the configuration details of the specified shard.

Request #

  • shardId: The ID of the shard that the instance is running on. The shard contains all of your environment and configuration variables.
  • titleId: The codename of your game.

Example Request

{
  "shardId": "multiplay",
  "titleId": "arbiter"
}

Response #

  • config: The AWS configuration YAML string details of the requested shard.
  • gateways: Host and port details of each of the Pragma Engine gateways. Each gateway communicates between the players, partners, and operators for your game and social connections.

Example Response

{
  "config": "awsRegion: us-west-2\nisPlayerExternal: true\nisPartnerExternal: true\nisOperatorExternal: false\nisOtelCollectorMetricsEnabled: false\nisHoneycombTriggersEnabled: false\nenableExportToGrafana: false\nremoteWriteUrl: \"\"\ntracesDisabled: false\nshardId: multiplay\nbackend:\n    instanceType: t2.medium\n    volumeSize: 10\n    maxMemory5G: false\n    multinodeEnabled: false\n    nomad:\n        enabled: true\n        serverCount: 1\n        serverInstanceType: t2.micro\n        clientCount: 1\n        clientInstanceType: c5.large\n        clientVolumeSizeGb: 60\ndatabase:\n    allocatedStorage: 10\n    hasDailyBackup: true\n    instanceType: db.t3.micro\n    multiAzEnabled: true\n    snapshotIdentifier: \"\"\n    version: 8.0.28\n",
  "gateways": {
    "GamePlayer": {
      "host": "multiplay.arbiter.arbiterstudios.pragmaengine.com",
      "port": 10000
    },
    "GamePartner": {
      "host": "multiplay.arbiter.arbiterstudios.pragmaengine.com",
      "port": 10100
    },
    "GameOperator": {
      "host": "multiplay.internal.arbiter.arbiterstudios.pragmaengine.com",
      "port": 10200
    },
    "SocialPlayer": {
      "host": "multiplay.arbiter.arbiterstudios.pragmaengine.com",
      "port": 11000
    },
    "SocialPartner": {
      "host": "multiplay.arbiter.arbiterstudios.pragmaengine.com",
      "port": 11100
    },
    "SocialOperator": {
      "host": "multiplay.internal.arbiter.arbiterstudios.pragmaengine.com",
      "port": 11200
    }
  }
}
shardSmokeTestV0

shardSmokeTestV0 #

Tests the current accessibility of the shard.. This tool is used by Pragma during shard set up.

Secrets #

encryptV1

encryptV1 #

Encrypts the provided string for use in your configuration files. All secrets must be encrypted and decrypted per shard. Shards use different encryption keys.

For more information about secret encyrption see, Secret Encryption in the Concepts guide.

Request #

  • shardId: The ID of the shard that the instance is running on. The shard contains all of your environment and configuration variables.
  • titleId: The codename of your game.
  • value: The string that you want to encrypt.

Example Request

{
  "shardId": "live",
  "titleId": "arbiter",
  "value": "encryptedPassword"
}

Response #

  • shardId: The ID of the shard that the instance is running on. The shard contains all of your environment and configuration variables.
  • titleId: The codename of your game.
  • value: The encrypted string.

Example Response

{
  "titleId": "arbiter",
  "shardId": "live",
  "value": "4/JMF62tSwWTwMO0OuZYPBK8qdR5R5ZU3CgqKUGjf9rOTjqpnImpiFrD5Ozk"
}
decryptV1

decryptV1 #

Decrypts the provided encrypted string based on the shard and game title.

For more information about secret encyrption see, Secret Encryption in the Concepts guide.

Request #

  • shardId: The ID of the shard that the instance is running on. The shard contains all of your environment and configuration variables.
  • titleId: The codename of your game.
  • value: The encrypted string.

Example Request

{
  "titleId": "arbiter",
  "shardId": "live",
  "value": "4/JMF62tSwWTwMO0OuZYPBK8qdR5R5ZU3CgqKUGjf9rOTjqpnImpiFrD5Ozk"
}

Response #

  • shardId: The ID of the shard that the instance is running on. The shard contains all of your environment and configuration variables.
  • titleId: The codename of your game.
  • value: The decrypted string.

Example Response

{
  "shardId": "live",
  "titleId": "arbiter",
  "value": "encryptedPassword"
}
getVaultEncryptionKeyV1

getVaultEncryptionKeyV1 #

This command returns the legacy vault encryption key used prior to Homebase API. If your shard was created with Homebase API this will return an error.