{"openapi":"3.1.0","info":{"title":"marve-py-dashboard-service","version":"0.1.0"},"paths":{"/dashboards":{"get":{"tags":["Dashboards"],"summary":"The signed-in user's dashboard","description":"Resolved from the token, never from the request. The user (a reduced view with no email or phone), their join requests and their activities. 404 if the user does not exist or is no longer active.","operationId":"get_dashboard_by_user_reference_dashboards_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"401":{"description":"No token, an expired token, or not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No user for the token, or a user that is no longer active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Unexpected failure. Quote `error_reference` when reporting it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"HTTPBearer":[]}]}},"/dashboards/health":{"get":{"tags":["Dashboards"],"summary":"Health check","operationId":"health_dashboards_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"500":{"description":"Unexpected failure. Quote `error_reference` when reporting it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"components":{"schemas":{"Dashboard":{"properties":{"reference":{"type":"string","title":"Reference"},"user":{"$ref":"#/components/schemas/DashboardUser"},"transactions":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Transactions"},"activities":{"items":{"$ref":"#/components/schemas/DashboardActivity"},"type":"array","title":"Activities"},"join_requests":{"items":{"$ref":"#/components/schemas/DashboardJoinRequest"},"type":"array","title":"Join Requests"}},"additionalProperties":true,"type":"object","required":["reference","user","activities","join_requests"],"title":"Dashboard","description":"GET /dashboards.","example":{"activities":[{"activity_type":"login","created_at_timestamp":"2026-01-01T00:00:00","description":"Signed in","reference":"activity-1","user":{"email":"jane@example.com","reference":"11111111-1111-1111-1111-111111111111"}}],"join_requests":[{"created_at_timestamp":"2026-01-01T00:00:00","created_by_reference":"11111111-1111-1111-1111-111111111111","organisation":{"organisation_name":"Acme Marine","reference":"org-1"},"reference":"join-1","status":"PENDING","user_info":{"email":"jane@example.com","reference":"11111111-1111-1111-1111-111111111111"}}],"reference":"11111111-1111-1111-1111-111111111111","user":{"full_name":"Jane Doe","is_active":true,"is_verified":true,"joined_on":"2026-01-01T09:30:00","license":{"license_reference":"licence-1","products":[{"features":["prediction"],"product_name":"PolPred","product_reference":"prod-polpred","status":"active","valid_from":"2026-01-01","valid_to":"2027-01-01"},{"features":["morph"],"product_name":"TideMorph","product_reference":"prod-tidemorph","status":"expired","valid_from":"2026-01-01","valid_to":"2026-02-01"}]},"organisation":{"organisation_name":"Acme Marine","reference":"org-1"},"reference":"11111111-1111-1111-1111-111111111111","role":"user"}}},"DashboardActivity":{"properties":{"reference":{"type":"string","title":"Reference"},"user":{"type":"object","title":"User"},"activity_type":{"type":"string","title":"Activity Type"},"description":{"type":"string","title":"Description"},"created_at_timestamp":{"type":"string","title":"Created At Timestamp"}},"additionalProperties":true,"type":"object","required":["reference","user","activity_type","description","created_at_timestamp"],"title":"DashboardActivity","description":"One of the caller's activities, as stored."},"DashboardJoinRequest":{"properties":{"reference":{"type":"string","title":"Reference"},"user_info":{"type":"object","title":"User Info"},"organisation":{"type":"object","title":"Organisation"},"status":{"type":"string","title":"Status"},"created_by_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Reference"},"created_at_timestamp":{"type":"string","title":"Created At Timestamp"}},"additionalProperties":true,"type":"object","required":["reference","user_info","organisation","status","created_at_timestamp"],"title":"DashboardJoinRequest","description":"One of the caller's join requests, as stored. The owner is under `user_info`."},"DashboardUser":{"properties":{"reference":{"type":"string","title":"Reference"},"full_name":{"type":"string","title":"Full Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_verified":{"type":"boolean","title":"Is Verified"},"is_active":{"type":"boolean","title":"Is Active"},"license":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"License"},"organisation":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Organisation"},"joined_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Joined On"}},"additionalProperties":true,"type":"object","required":["reference","full_name","is_verified","is_active"],"title":"DashboardUser","description":"The reduced user view (UserDto): no email address or phone number."},"ErrorEnvelope":{"properties":{"error_reference":{"type":"string","title":"Error Reference"},"error_type":{"type":"string","title":"Error Type"},"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Errors"},"status_code":{"type":"integer","title":"Status Code"},"timestamp":{"type":"string","title":"Timestamp"}},"additionalProperties":true,"type":"object","required":["error_reference","error_type","errors","status_code","timestamp"],"title":"ErrorEnvelope","description":"Every error from this service, whatever the cause. Rendered by InfrastructureError.","example":{"error_reference":"b7825cd3-59dc-43a9-9e1f-964676d3cf72","error_type":"NOT_FOUND_ERROR","errors":{"message":["A dashboard with the reference 11111111-1111-1111-1111-111111111111 does not exist."]},"status_code":404,"timestamp":"2026-09-30T10:00:00.000000"}},"Health":{"properties":{"message":{"type":"string","title":"Message"}},"additionalProperties":true,"type":"object","required":["message"],"title":"Health","description":"GET /dashboards/health.","example":{"message":"marve-py-dashboard-service is okay and running, fast!"}}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"The access token from sign-in.","scheme":"bearer"}}}}