Skip to main content
GET
/
principal
Python
import os
from miru_platform_sdk import Miru

client = Miru(
    api_key=os.environ.get("MIRU_API_KEY"),  # This is the default and can be omitted
)
principal = client.principal.self()
print(principal.id)
{
  "object": "principal",
  "id": "api_key_123",
  "name": "My CI/CD Key"
}

Authorizations

X-API-Key
string
header
required

The API key to use for authentication.

Headers

Miru-Version
string
required

The API version the client was built against.

Example:

"2026-03-09.tetons"

Response

200 - application/json

Successfully retrieved the principal.

object
enum<string>
required

The object type, which is always principal.

Available options:
principal
Example:

"principal"

id
string
required

ID of the principal.

Example:

"api_key_123"

name
string
required

The display name of the principal.

Example:

"My CI/CD Key"

Last modified on March 13, 2026