{"openapi":"3.1.0","info":{"title":"US SDX-Engine","description":"SdxEngine for operations on sodex system data. Usage guide: https://sdx-software.atlassian.net/l/cp/m9rtU1tr","version":"2.8.1"},"paths":{"/":{"get":{"summary":"Read Root","operationId":"read_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sentry-debug":{"get":{"tags":["Authentication"],"summary":"Trigger Error","operationId":"trigger_error_sentry_debug_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sentry-log":{"get":{"tags":["Authentication"],"summary":"Sentry Log","operationId":"sentry_log_sentry_log_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/token":{"post":{"tags":["Authentication"],"summary":"Token Login","description":"Get a token for a client. For normal user login the username is the email address and no extra scope must be provided.","operationId":"token_login_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_login_auth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/cookie-token":{"post":{"tags":["Authentication"],"summary":"Cookie Token Login","description":"Get HTTP-only auth cookies and token expiration datetimes.","operationId":"cookie_token_login_auth_cookie_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_cookie_token_login_auth_cookie_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CookieTokenExpiryInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/authorize":{"post":{"tags":["Authentication"],"summary":"Authorize Client","description":"Authorize a client","operationId":"authorize_client_auth_authorize_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_authorize_client_auth_authorize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh-token":{"get":{"tags":["Authentication"],"summary":"Refresh Access Token","operationId":"refresh_access_token_auth_refresh_token_get","parameters":[{"description":"Refresh token to refresh","required":true,"schema":{"type":"string","title":"Refresh Token","description":"Refresh token to refresh"},"name":"refresh_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/cookie-refresh":{"post":{"tags":["Authentication"],"summary":"Refresh Cookie Tokens","description":"Refresh HTTP-only auth cookies using refresh token cookie.","operationId":"refresh_cookie_tokens_auth_cookie_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CookieTokenExpiryInfo"}}}}}}},"/auth/cookie-token/{organization_id}":{"get":{"tags":["Authentication"],"summary":"Switch Cookie Organization","description":"Switch the active organization for an HTTP-only cookie session. Overwrites both auth cookies with JWTs scoped to the requested organization.","operationId":"switch_cookie_organization_auth_cookie_token__organization_id__get","parameters":[{"required":true,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","title":"Organization Id"},"name":"organization_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CookieTokenExpiryInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["distributor","sodex"]},{"OAuth2PasswordBearer":[]}]}},"/auth/logout":{"get":{"tags":["Authentication"],"summary":"Logout User","description":"Logout user","operationId":"logout_user_auth_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericResponse_bool_"}}}}}}},"/account/email":{"post":{"tags":["Authentication"],"summary":"Send Account Created Mail","description":"Send an email to the user with the account information","operationId":"send_account_created_mail_account_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPasswordData"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericResponse_bool_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["sodex"]}]}},"/account/reset":{"post":{"tags":["Authentication"],"summary":"Reset User Account Sodex","description":"Send an email to the user with the new password","operationId":"reset_user_account_sodex_account_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericResponse_OutResetAccount_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["organization_admin","sodex","distributor"]},{"OAuth2PasswordBearer":[]}]}},"/password/reset":{"post":{"tags":["Authentication"],"summary":"Reset User Password","description":"Reset password for a user","operationId":"reset_user_password_password_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputResetPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericResponse_bool_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/token":{"get":{"tags":["Authentication"],"summary":"Get Token Data","operationId":"get_token_data_token_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutTokenData"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/token/validation":{"get":{"tags":["Authentication"],"summary":"Validate Token","operationId":"validate_token_token_validation_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericResponse_bool_"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/token/info":{"get":{"tags":["Authentication"],"summary":"Get Info For Token","operationId":"get_info_for_token_token_info_get","parameters":[{"description":"Token to get info for","required":true,"schema":{"type":"string","title":"Token","description":"Token to get info for"},"name":"token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutTokenData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["sodex"]}]}},"/token/user":{"get":{"tags":["Authentication"],"summary":"Get User Token By Email","operationId":"get_user_token_by_email_token_user_get","parameters":[{"description":"Email of the user","required":true,"schema":{"type":"string","title":"Email","description":"Email of the user"},"name":"email","in":"query"},{"description":"Duration of the token in minutes","required":false,"schema":{"type":"integer","title":"Duration","description":"Duration of the token in minutes","default":4320},"name":"duration","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutTokenData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["sodex"]}]}},"/token/invite":{"get":{"tags":["Authentication"],"summary":"Get Token By Invite Token","operationId":"get_token_by_invite_token_token_invite_get","parameters":[{"description":"Invite token required to receive bearer token","required":true,"schema":{"type":"string","title":"Invite Token","description":"Invite token required to receive bearer token"},"name":"invite_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/cookie-invite":{"get":{"tags":["Authentication"],"summary":"Cookie Invite Login","description":"Exchange an invite token for HTTP-only auth cookies.","operationId":"cookie_invite_login_auth_cookie_invite_get","parameters":[{"description":"Invite token required to receive auth cookies","required":true,"schema":{"type":"string","title":"Invite Token","description":"Invite token required to receive auth cookies"},"name":"invite_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CookieTokenExpiryInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/token/{organization_id}":{"get":{"tags":["Authentication"],"summary":"Get Token For Organization","operationId":"get_token_for_organization_token__organization_id__get","parameters":[{"required":true,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","title":"Organization Id"},"name":"organization_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":["distributor","sodex"]},{"OAuth2PasswordBearer":[]}]}}},"components":{"schemas":{"BaseLanguages":{"type":"string","enum":["de","en","fr","nl"],"title":"BaseLanguages","description":"An enumeration."},"Body_authorize_client_auth_authorize_post":{"properties":{"grant_type":{"type":"string","pattern":"^password$","title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_authorize_client_auth_authorize_post"},"Body_cookie_token_login_auth_cookie_token_post":{"properties":{"grant_type":{"type":"string","pattern":"^password$","title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_cookie_token_login_auth_cookie_token_post"},"Body_token_login_auth_token_post":{"properties":{"grant_type":{"type":"string","pattern":"^password$","title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_token_login_auth_token_post"},"CookieTokenExpiryInfo":{"properties":{"access_expires_at":{"type":"string","format":"date-time","title":"Access Expires At","description":"UTC datetime when access token cookie expires"},"refresh_expires_at":{"type":"string","format":"date-time","title":"Refresh Expires At","description":"UTC datetime when refresh token cookie expires"}},"type":"object","required":["access_expires_at","refresh_expires_at"],"title":"CookieTokenExpiryInfo"},"EmailPasswordData":{"properties":{"email":{"type":"string","title":"Email"},"plain_pw":{"type":"string","title":"Plain Pw"},"language":{"allOf":[{"$ref":"#/components/schemas/BaseLanguages"}],"default":"en"}},"type":"object","required":["email","plain_pw"],"title":"EmailPasswordData"},"ErrorCode":{"type":"string","enum":["invalid_login_credentials","invalid_billing_data","not_enough_pixel_credits"],"title":"ErrorCode","description":"An enumeration."},"ErrorData":{"properties":{"type":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string","title":"Message"}},"type":"object","required":["type"],"title":"ErrorData"},"GenericResponse_OutResetAccount_":{"properties":{"data":{"$ref":"#/components/schemas/OutResetAccount"},"error":{"type":"string","title":"Error"},"error_code":{"$ref":"#/components/schemas/ErrorCode"},"error_data":{"$ref":"#/components/schemas/ErrorData"},"skip":{"type":"integer","title":"Skip"},"limit":{"type":"integer","title":"Limit"},"count":{"type":"integer","title":"Count"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","title":"GenericResponse[OutResetAccount]"},"GenericResponse_bool_":{"properties":{"data":{"type":"boolean","title":"Data"},"error":{"type":"string","title":"Error"},"error_code":{"$ref":"#/components/schemas/ErrorCode"},"error_data":{"$ref":"#/components/schemas/ErrorData"},"skip":{"type":"integer","title":"Skip"},"limit":{"type":"integer","title":"Limit"},"count":{"type":"integer","title":"Count"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","title":"GenericResponse[bool]"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InputResetPassword":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email of the user"}},"type":"object","required":["email"],"title":"InputResetPassword"},"OutResetAccount":{"properties":{"plain_pw":{"type":"string","title":"Plain Pw","description":"Plain password of the user"}},"type":"object","required":["plain_pw"],"title":"OutResetAccount"},"OutTokenData":{"properties":{"user_id":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","title":"User Id","description":"ID of the user"},"system_id":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","title":"System Id","description":"ID of the system"},"organization_id":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","title":"Organization Id","description":"ID of the organization"},"scopes":{"anyOf":[{"items":{"$ref":"#/components/schemas/TokenScopes"},"type":"array"},{"items":{"type":"string"},"type":"array"}],"title":"Scopes","description":"Scopes of the user"},"ip":{"type":"string","title":"Ip","default":""},"mobile":{"type":"boolean","title":"Mobile","description":"Is mobile device","default":false},"name":{"type":"string","title":"Name","description":"Name of the client"},"token":{"type":"string","title":"Token","description":"Token of the user"},"exp":{"type":"integer","title":"Exp","description":"Expiration time of the token"}},"type":"object","required":["name"],"title":"OutTokenData"},"ResetPassword":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email of the user"},"plain_pw":{"type":"string","title":"Plain Pw","description":"Plain password of the user"}},"type":"object","required":["email"],"title":"ResetPassword"},"TokenInfo":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token","description":"Refresh token"},"token_type":{"allOf":[{"$ref":"#/components/schemas/TokenTypes"}],"default":"bearer"},"access_expires_in":{"type":"integer","title":"Access Expires In","description":"Expiration time in seconds"},"refresh_expires_in":{"type":"integer","title":"Refresh Expires In","description":"Expiration time in seconds"}},"type":"object","required":["access_token"],"title":"TokenInfo"},"TokenScopes":{"type":"string","enum":["sodex","user","distributor","system","organization_admin","system_admin","guest","cloud_base","mobile","vidoc","inactive"],"title":"TokenScopes","description":"An enumeration."},"TokenTypes":{"type":"string","enum":["bearer"],"title":"TokenTypes","description":"An enumeration."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{"system":"system","user":"user","mobile":"mobile"},"tokenUrl":"/auth/token"}}}}}}