Get Server Details
On this page
Retrieves details of a specific server.
Usage
odin fleet servers get
[--server-id
=SERVER_ID
]
Examples
Retrieve details for an image by ID as a JSON object:
odin fleet servers get --server-id=123456 --format=json
Get IP address and published Game Port of the server. In this example we have defined a port named Game Port
in the
configuration:
odin fleet servers get --server-id=123456 --format="value[separator=':'](addr,ports['Game Port'].publishedPort)"
We use the separator
attribute here to separate the IP address and the port with a colon instead of the default tab.
This can be useful for creating a list of servers to use in a script or for monitoring.
Flags
--server-id=<number>
:
The ID of the image to retrieve details for. If omitted, the CLI will prompt you to enter the image ID interactively.
Global Flags
The following flags can be used with any ODIN CLI command:
--api-key=<string>
The API key to use for authentication. If omitted, the CLI will use the api-key stored in the configuration file on your system. Use odin login to store the API key for subsequent commands.--app-id=<string>
The ID of the app to use for the command. If omitted, the CLI will use the currently selected app. Use odin apps select to select an app interactively.--format=<string>
The output format to use for the command. Supported formats arejson
,value
,flattened
andtable
. If omitted, the CLI will use the default format specified in the configuration file. Learn more about output formatting.--force
Forces the command to execute without prompting for confirmation. Use with caution.--quiet
Suppresses all informational output except for errors. Useful for scripting and automation.