Skip to main content

PlatformDataDto

Returned by GET_getPlatformData.
FieldTypeDescription
idstrPlatform identifier
namestrPlatform name
localeslist[str]Supported locales
maintenanceslist[StatusDto]Current and scheduled maintenances
incidentslist[StatusDto]Active incidents

StatusDto

Represents a maintenance or incident.
FieldTypeDescription
idintUnique identifier
maintenance_statusstrMaintenance status (e.g., "scheduled", "in_progress", "complete")
incident_severitystrIncident severity (e.g., "info", "warning", "critical")
titleslist[ContentDto]Localized titles
updateslist[UpdateDto]Status updates
created_atstrISO 8601 creation timestamp
updated_atstrISO 8601 last updated timestamp
archived_atstr | NoneISO 8601 archive timestamp (None if still active)
platformslist[str]Affected platforms
maintenance_status applies to maintenance entries; incident_severity applies to incident entries.

ContentDto

Localized content for a status title or update body.
FieldTypeDescription
localestrLocale code (e.g., "en_US")
contentstrLocalized text

UpdateDto

An update or announcement for a maintenance or incident.
FieldTypeDescription
idintUnique identifier
authorstrAuthor of the update
publishboolWhether this update is published
publish_locationslist[str]Where the update is published
created_atstrISO 8601 creation timestamp
updated_atstrISO 8601 last updated timestamp

Example

import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        status = await client.GET_getPlatformData("na")
        print(f"Platform: {status.name}")

        for incident in status.incidents:
            en_title = next((t for t in incident.titles if t.locale == "en_US"), None)
            if en_title:
                print(f"Incident: {en_title.content}")
                print(f"  Severity: {incident.incident_severity}")

        for maintenance in status.maintenances:
            en_title = next((t for t in maintenance.titles if t.locale == "en_US"), None)
            if en_title:
                print(f"Maintenance: {en_title.content}")
                print(f"  Status: {maintenance.maintenance_status}")
    finally:
        await client.close()

asyncio.run(main())