{"openapi":"3.0.0","info":{"version":"v1","title":"Pangolin Integration API"},"servers":[{"url":"/v1"}],"tags":[{"name":"Site"},{"name":"Public Resource"},{"name":"Resource Target"},{"name":"Private Resource"},{"name":"Client"},{"name":"Organization"},{"name":"Domain"},{"name":"Public Resource Policy"},{"name":"Role"},{"name":"User"},{"name":"Rule"},{"name":"User Invitation"},{"name":"Access Token"},{"name":"Resource Session"},{"name":"Identity Provider (Global)"},{"name":"Identity Provider (Organization Only)"},{"name":"API Key"},{"name":"Site Provisioning Key"},{"name":"Blueprint"},{"name":"SSH"},{"name":"Logs"},{"name":"Event Streaming Destination"},{"name":"Alert Rule"},{"name":"Health Check"},{"name":"Public Resource Policy (Legacy)"},{"name":"Public Resource (Legacy)"},{"name":"Private Resource (Legacy)"},{"name":"AI Provider"},{"name":"AI Model"},{"name":"AI Budget"},{"name":"Virtual API Key"},{"name":"Redirect"},{"name":"Label"},{"name":"Remote Exit Node"}],"components":{"securitySchemes":{"Bearer Auth":{"type":"http","scheme":"bearer"}},"schemas":{},"parameters":{}},"paths":{"/org/{orgId}/role":{"put":{"description":"Create a role.","tags":["Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string"},"requireDeviceApproval":{"type":"boolean"},"allowSsh":{"type":"boolean"},"sshSudoMode":{"type":"string","enum":["none","full","commands"]},"sshSudoCommands":{"type":"array","items":{"type":"string"}},"sshCreateHomeDir":{"type":"boolean"},"sshUnixGroups":{"type":"array","items":{"type":"string"}}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/target/{targetId}":{"get":{"description":"Get a target.","tags":["Resource Target"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"targetId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete a target.","tags":["Resource Target"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"targetId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a target.","tags":["Resource Target"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"targetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"ip":{"type":"string"},"mode":{"type":"string","nullable":true,"enum":["http","tcp","udp","ssh","rdp","vnc",null]},"method":{"type":"string","nullable":true,"minLength":1,"maxLength":10},"port":{"type":"integer","minimum":1,"maximum":65535},"enabled":{"type":"boolean"},"hcEnabled":{"type":"boolean","nullable":true},"hcPath":{"type":"string","nullable":true,"minLength":1},"hcScheme":{"type":"string","nullable":true},"hcMode":{"type":"string","nullable":true},"hcHostname":{"type":"string","nullable":true},"hcPort":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"hcInterval":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcUnhealthyInterval":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcTimeout":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcHeaders":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"hcFollowRedirects":{"type":"boolean","nullable":true},"hcMethod":{"type":"string","nullable":true,"minLength":1},"hcStatus":{"type":"integer","nullable":true},"hcTlsServerName":{"type":"string","nullable":true},"hcHealthyThreshold":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcUnhealthyThreshold":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"path":{"type":"string","nullable":true},"pathMatchType":{"type":"string","nullable":true,"enum":["exact","prefix","regex",null]},"rewritePath":{"type":"string","nullable":true},"rewritePathType":{"type":"string","nullable":true,"enum":["exact","prefix","regex","stripPrefix",null]},"priority":{"type":"integer","minimum":1,"maximum":1000}},"required":["siteId","ip"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/target":{"put":{"description":"Create a target for a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"ip":{"type":"string"},"mode":{"type":"string","enum":["http","tcp","udp","ssh","rdp","vnc"]},"method":{"type":"string","nullable":true},"port":{"type":"integer","minimum":1,"maximum":65535},"enabled":{"type":"boolean","default":true},"hcEnabled":{"type":"boolean"},"hcPath":{"type":"string","nullable":true,"minLength":1},"hcScheme":{"type":"string","nullable":true},"hcMode":{"type":"string","nullable":true},"hcHostname":{"type":"string","nullable":true},"hcPort":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"hcInterval":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcUnhealthyInterval":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcTimeout":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcHeaders":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"hcFollowRedirects":{"type":"boolean","nullable":true},"hcMethod":{"type":"string","nullable":true,"minLength":1},"hcStatus":{"type":"integer","nullable":true},"hcTlsServerName":{"type":"string","nullable":true},"hcHealthyThreshold":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcUnhealthyThreshold":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"path":{"type":"string","nullable":true},"pathMatchType":{"type":"string","nullable":true,"enum":["exact","prefix","regex",null]},"rewritePath":{"type":"string","nullable":true},"rewritePathType":{"type":"string","nullable":true,"enum":["exact","prefix","regex","stripPrefix",null]},"priority":{"type":"integer","nullable":true,"minimum":1,"maximum":1000}},"required":["siteId","ip","port"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/target":{"put":{"description":"Create a target for a resource.","tags":["Public Resource","Resource Target"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"ip":{"type":"string"},"mode":{"type":"string","enum":["http","tcp","udp","ssh","rdp","vnc"]},"method":{"type":"string","nullable":true},"port":{"type":"integer","minimum":1,"maximum":65535},"enabled":{"type":"boolean","default":true},"hcEnabled":{"type":"boolean"},"hcPath":{"type":"string","nullable":true,"minLength":1},"hcScheme":{"type":"string","nullable":true},"hcMode":{"type":"string","nullable":true},"hcHostname":{"type":"string","nullable":true},"hcPort":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"hcInterval":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcUnhealthyInterval":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcTimeout":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcHeaders":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"hcFollowRedirects":{"type":"boolean","nullable":true},"hcMethod":{"type":"string","nullable":true,"minLength":1},"hcStatus":{"type":"integer","nullable":true},"hcTlsServerName":{"type":"string","nullable":true},"hcHealthyThreshold":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcUnhealthyThreshold":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"path":{"type":"string","nullable":true},"pathMatchType":{"type":"string","nullable":true,"enum":["exact","prefix","regex",null]},"rewritePath":{"type":"string","nullable":true},"rewritePathType":{"type":"string","nullable":true,"enum":["exact","prefix","regex","stripPrefix",null]},"priority":{"type":"integer","nullable":true,"minimum":1,"maximum":1000}},"required":["siteId","ip","port"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/ai-provider/{providerId}/target":{"put":{"description":"Create a target for an AI provider.","tags":["AI Provider"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"providerId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"ip":{"type":"string"},"mode":{"type":"string","enum":["http","tcp","udp","ssh","rdp","vnc"]},"method":{"type":"string","nullable":true},"port":{"type":"integer","minimum":1,"maximum":65535},"enabled":{"type":"boolean","default":true},"hcEnabled":{"type":"boolean"},"hcPath":{"type":"string","nullable":true,"minLength":1},"hcScheme":{"type":"string","nullable":true},"hcMode":{"type":"string","nullable":true},"hcHostname":{"type":"string","nullable":true},"hcPort":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"hcInterval":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcUnhealthyInterval":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcTimeout":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcHeaders":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"hcFollowRedirects":{"type":"boolean","nullable":true},"hcMethod":{"type":"string","nullable":true,"minLength":1},"hcStatus":{"type":"integer","nullable":true},"hcTlsServerName":{"type":"string","nullable":true},"hcHealthyThreshold":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"hcUnhealthyThreshold":{"type":"integer","nullable":true,"minimum":1,"exclusiveMinimum":true},"path":{"type":"string","nullable":true},"pathMatchType":{"type":"string","nullable":true,"enum":["exact","prefix","regex",null]},"rewritePath":{"type":"string","nullable":true},"rewritePathType":{"type":"string","nullable":true,"enum":["exact","prefix","regex","stripPrefix",null]},"priority":{"type":"integer","nullable":true,"minimum":1,"maximum":1000}},"required":["siteId","ip","port"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/targets":{"get":{"description":"List targets for a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/targets":{"get":{"description":"List targets for a resource.","tags":["Public Resource","Resource Target"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/ai-provider/{providerId}/targets":{"get":{"description":"List targets for an AI provider.","tags":["AI Provider"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"providerId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/idp/oidc":{"put":{"description":"Create an OIDC IdP for a specific organization.","tags":["Identity Provider (Organization Only)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"authUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"identifierPath":{"type":"string","minLength":1},"emailPath":{"type":"string"},"namePath":{"type":"string"},"scopes":{"type":"string","minLength":1},"autoProvision":{"type":"boolean"},"sessionRevalidation":{"type":"boolean"},"variant":{"type":"string","enum":["oidc","google","azure"],"default":"oidc"},"roleMapping":{"type":"string"},"orgMapping":{"type":"string","nullable":true},"tags":{"type":"string"}},"required":["name","clientId","clientSecret","authUrl","tokenUrl","identifierPath","scopes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/idp/{idpId}":{"get":{"description":"Get an IDP by its IDP ID for a specific organization.","tags":["Identity Provider (Organization Only)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete IDP for a specific organization.","tags":["Identity Provider (Organization Only)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/idp":{"get":{"description":"List all IDP for a specific organization.","tags":["Identity Provider (Organization Only)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/idp/{idpId}/oidc":{"post":{"description":"Update an OIDC IdP for a specific organization.","tags":["Identity Provider (Organization Only)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"authUrl":{"type":"string"},"tokenUrl":{"type":"string"},"identifierPath":{"type":"string"},"emailPath":{"type":"string"},"namePath":{"type":"string"},"scopes":{"type":"string"},"autoProvision":{"type":"boolean"},"sessionRevalidation":{"type":"boolean"},"roleMapping":{"type":"string"},"orgMapping":{"type":"string","nullable":true},"tags":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"idpId":{"type":"number"}},"required":["idpId"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/domain/check-namespace-availability":{"get":{"description":"Check if a domain namespace is available based on subdomain","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"subdomain","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/domains/namepaces":{"get":{"description":"List all domain namespaces in the system","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"domainNamespaces":{"type":"array","items":{"type":"object","properties":{"domainNamespaceId":{"type":"string"},"domainId":{"type":"string"}},"required":["domainNamespaceId","domainId"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["domainNamespaces","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/action":{"get":{"description":"Query the action audit log for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"action","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actorType","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actorId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/request":{"get":{"description":"Query the request audit log for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"required":false,"name":"action","in":"query"},{"schema":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"]},"required":false,"name":"method","in":"query"},{"schema":{"type":"string"},"required":false,"name":"reason","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"location","in":"query"},{"schema":{"type":"string"},"required":false,"name":"host","in":"query"},{"schema":{"type":"string"},"required":false,"name":"path","in":"query"},{"schema":{"type":"array","description":"Filter by IP adresses"},"required":false,"description":"Filter by IP adresses","name":"ip","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/analytics":{"get":{"description":"Query the request audit analytics for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ai":{"get":{"description":"Query the AI gateway session log for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"providerId","in":"query"},{"schema":{"type":"string","enum":["openai_chat","openai_responses","anthropic_messages","v1_models","gemini_generate_content","bedrock_model_invoke","google_generate_content","google_raw_predict","bedrock_converse"]},"required":false,"name":"capability","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"virtualApiKeyId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"model","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"required":false,"name":"isStream","in":"query"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ai/export":{"get":{"description":"Export the AI gateway session log for an organization as CSV","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"providerId","in":"query"},{"schema":{"type":"string","enum":["openai_chat","openai_responses","anthropic_messages","v1_models","gemini_generate_content","bedrock_model_invoke","google_generate_content","google_raw_predict","bedrock_converse"]},"required":false,"name":"capability","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"virtualApiKeyId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"model","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"required":false,"name":"isStream","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ai/usage/filters":{"get":{"description":"Query the distinct filter options (providers, models, resources, roles, users) available for AI usage analytics within a time range","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"2026-11-02T00:00:00.000Z"},"required":false,"name":"timeStart","in":"query"},{"schema":{"type":"string","default":"2026-11-09T22:02:10.833Z"},"required":false,"name":"timeEnd","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ai/usage/overview":{"get":{"description":"Query the AI usage analytics overview for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"providerId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"model","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"roleId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"virtualApiKeyId","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ai/usage/providers":{"get":{"description":"Query the AI usage analytics provider breakdown for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"providerId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"model","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"roleId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"virtualApiKeyId","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ai/usage/resources":{"get":{"description":"Query the AI usage analytics resource breakdown for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"providerId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"model","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"roleId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"virtualApiKeyId","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ai/usage/users-roles":{"get":{"description":"Query the AI usage analytics user and role breakdown for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"providerId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"model","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"roleId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"virtualApiKeyId","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ai/usage/virtual-api-keys":{"get":{"description":"Query the AI usage analytics virtual API key breakdown for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"providerId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"model","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"roleId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"virtualApiKeyId","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/action/export":{"get":{"description":"Export the action audit log for an organization as CSV","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"action","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actorType","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actorId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/access":{"get":{"description":"Query the access audit log for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"required":false,"name":"action","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actorType","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actorId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"location","in":"query"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"array","description":"Filter by IP adresses"},"required":false,"description":"Filter by IP adresses","name":"ip","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/access/export":{"get":{"description":"Export the access audit log for an organization as CSV","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"required":false,"name":"action","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actorType","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actorId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"location","in":"query"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"array","description":"Filter by IP adresses"},"required":false,"description":"Filter by IP adresses","name":"ip","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/connection":{"get":{"description":"Query the connection audit log for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"protocol","in":"query"},{"schema":{"type":"string"},"required":false,"name":"sourceAddr","in":"query"},{"schema":{"type":"string"},"required":false,"name":"destAddr","in":"query"},{"schema":{"type":"string"},"required":false,"name":"clientId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteResourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/connection/export":{"get":{"description":"Export the connection audit log for an organization as CSV","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"protocol","in":"query"},{"schema":{"type":"string"},"required":false,"name":"sourceAddr","in":"query"},{"schema":{"type":"string"},"required":false,"name":"destAddr","in":"query"},{"schema":{"type":"string"},"required":false,"name":"clientId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteResourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ssh":{"get":{"description":"Query the SSH session log for an organization","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteResourceId","in":"query"},{"schema":{"type":"integer","description":"Public resource, for sessions opened in the browser terminal"},"required":false,"description":"Public resource, for sessions opened in the browser terminal","name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteId","in":"query"},{"schema":{"type":"string","enum":["ssh","browser"]},"required":false,"name":"transport","in":"query"},{"schema":{"type":"string"},"required":false,"name":"clientId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"username","in":"query"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ssh/{sshSessionLogId}/commands":{"get":{"description":"List the commands run in an SSH session","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sshSessionLogId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/logs/ssh/export":{"get":{"description":"Export the SSH session log for an organization as CSV, one row per command","tags":["Logs"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Start time as ISO date string (defaults to 7 days ago)"},"required":false,"description":"Start time as ISO date string (defaults to 7 days ago)","name":"timeStart","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time as ISO date string (defaults to current time)"},"required":false,"description":"End time as ISO date string (defaults to current time)","name":"timeEnd","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteResourceId","in":"query"},{"schema":{"type":"integer","description":"Public resource, for sessions opened in the browser terminal"},"required":false,"description":"Public resource, for sessions opened in the browser terminal","name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteId","in":"query"},{"schema":{"type":"string","enum":["ssh","browser"]},"required":false,"name":"transport","in":"query"},{"schema":{"type":"string"},"required":false,"name":"clientId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"username","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/resource-sessions":{"get":{"description":"List active resource sessions for all public resources in an organization.","tags":["Resource Session"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string","description":"Search by user, email, shareable link title, resource name, or IP address"},"required":false,"description":"Search by user, email, shareable link title, resource name, or IP address","name":"query","in":"query"},{"schema":{"type":"string","enum":["issuedAt","expiresAt"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"integer","description":"Filter sessions for this resource"},"required":false,"description":"Filter sessions for this resource","name":"resourceId","in":"query"},{"schema":{"type":"string","description":"Filter sessions held by this user, through SSO or a shareable link"},"required":false,"description":"Filter sessions held by this user, through SSO or a shareable link","name":"userId","in":"query"},{"schema":{"type":"string","description":"Filter sessions created by this shareable link"},"required":false,"description":"Filter sessions created by this shareable link","name":"accessTokenId","in":"query"},{"schema":{"type":"string","enum":["sso","password","pincode","whitelist","accessToken"],"description":"Filter sessions by how they were authenticated"},"required":false,"description":"Filter sessions by how they were authenticated","name":"authMethod","in":"query"},{"schema":{"type":"string","description":"Find a single session. Also matches the id of the login request it was created from, as recorded in the access logs."},"required":false,"description":"Find a single session. Also matches the id of the login request it was created from, as recorded in the access logs.","name":"sessionId","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/resource-session/{sessionId}":{"delete":{"description":"Revoke a resource session. The client will need to authenticate to the resource again. For SSO sessions, the user must log in again even if they are still logged in to the dashboard.","tags":["Resource Session"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/user/{userId}/add-role/{roleId}":{"post":{"description":"Add a role to a user.","tags":["Role","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"roleId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/user/{userId}/remove-role/{roleId}":{"delete":{"description":"Remove a role from a user. User must have at least one role left in the org.","tags":["Role","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"roleId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/add-role/{roleId}":{"post":{"description":"Add a role to a machine client. The client is granted access to the private resources assigned to the role. Clients with a userId cannot be added to roles; they inherit the roles of their user.","tags":["Role","Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"roleId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/remove-role/{roleId}":{"delete":{"description":"Remove a role from a machine client. Unlike users, machine clients are not required to keep at least one role.","tags":["Role","Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"roleId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/roles":{"post":{"description":"Set all roles for a machine client, replacing any existing roles. An empty list removes all roles. Clients with a userId cannot be assigned roles; they inherit the roles of their user.","tags":["Role","Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site-provisioning-key":{"put":{"description":"Create a new site provisioning key for the organization.","tags":["Site Provisioning Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"maxBatchSize":{"type":"number","default":null,"description":"Maximum number of sites that can be provisioned in a single batch. If null, there is no limit."},"validUntil":{"type":"string","maxLength":255},"approveNewSites":{"type":"boolean","default":true}},"required":["name","maxBatchSize"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"siteProvisioningKeyId":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"siteProvisioningKey":{"type":"string"},"lastChars":{"type":"string"},"createdAt":{"type":"string"},"lastUsed":{"type":"string","nullable":true},"maxBatchSize":{"type":"number","nullable":true},"numUsed":{"type":"number"},"validUntil":{"type":"string","nullable":true},"approveNewSites":{"type":"boolean"}},"required":["siteProvisioningKeyId","orgId","name","siteProvisioningKey","lastChars","createdAt","lastUsed","maxBatchSize","numUsed","validUntil","approveNewSites"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site-provisioning-keys":{"get":{"description":"List all site provisioning keys for an organization.","tags":["Site Provisioning Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"siteProvisioningKeys":{"type":"array","items":{"type":"object","properties":{"siteProvisioningKeyId":{"type":"string"},"orgId":{"type":"string"},"lastChars":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"},"lastUsed":{"type":"string","nullable":true},"maxBatchSize":{"type":"number","nullable":true},"numUsed":{"type":"number"},"validUntil":{"type":"string","nullable":true},"approveNewSites":{"type":"boolean"}},"required":["siteProvisioningKeyId","orgId","lastChars","createdAt","name","lastUsed","maxBatchSize","numUsed","validUntil","approveNewSites"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["siteProvisioningKeys","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site-provisioning-key/{siteProvisioningKeyId}":{"delete":{"description":"Delete a site provisioning key.","tags":["Site Provisioning Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"siteProvisioningKeyId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"patch":{"description":"Update a site provisioning key.","tags":["Site Provisioning Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"siteProvisioningKeyId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"maxBatchSize":{"type":"number","default":null,"description":"Maximum number of sites that can be provisioned in a single batch. If null, there is no limit."},"validUntil":{"type":"string","maxLength":255},"approveNewSites":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"siteProvisioningKeyId":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"lastChars":{"type":"string"},"createdAt":{"type":"string"},"lastUsed":{"type":"string","nullable":true},"maxBatchSize":{"type":"number","nullable":true},"numUsed":{"type":"number"},"validUntil":{"type":"string","nullable":true},"approveNewSites":{"type":"boolean"}},"required":["siteProvisioningKeyId","orgId","name","lastChars","createdAt","lastUsed","maxBatchSize","numUsed","validUntil","approveNewSites"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/event-streaming-destination":{"put":{"description":"Create an event streaming destination for a specific organization.","tags":["Event Streaming Destination"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","minLength":1},"config":{"type":"string","minLength":1},"enabled":{"type":"boolean","default":true},"sendConnectionLogs":{"type":"boolean","default":false},"sendRequestLogs":{"type":"boolean","default":false},"sendActionLogs":{"type":"boolean","default":false},"sendAccessLogs":{"type":"boolean","default":false},"sendAISessionLogs":{"type":"boolean","default":false}},"required":["type","config"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"destinationId":{"type":"number"}},"required":["destinationId"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"List all event streaming destinations for a specific organization.","tags":["Event Streaming Destination"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"destinations":{"type":"array","items":{"type":"object","properties":{"destinationId":{"type":"number"},"orgId":{"type":"string"},"type":{"type":"string"},"config":{"type":"string"},"enabled":{"type":"boolean"},"lastError":{"type":"string","nullable":true},"lastErrorAt":{"type":"number","nullable":true},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"sendConnectionLogs":{"type":"boolean"},"sendRequestLogs":{"type":"boolean"},"sendActionLogs":{"type":"boolean"},"sendAccessLogs":{"type":"boolean"},"sendAISessionLogs":{"type":"boolean"}},"required":["destinationId","orgId","type","config","enabled","lastError","lastErrorAt","createdAt","updatedAt","sendConnectionLogs","sendRequestLogs","sendActionLogs","sendAccessLogs","sendAISessionLogs"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["destinations","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/event-streaming-destination/{destinationId}":{"post":{"description":"Update an event streaming destination for a specific organization.","tags":["Event Streaming Destination"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"destinationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"config":{"type":"string"},"enabled":{"type":"boolean"},"sendConnectionLogs":{"type":"boolean"},"sendRequestLogs":{"type":"boolean"},"sendActionLogs":{"type":"boolean"},"sendAccessLogs":{"type":"boolean"},"sendAISessionLogs":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"destinationId":{"type":"number"}},"required":["destinationId"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete an event streaming destination for a specific organization.","tags":["Event Streaming Destination"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"destinationId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/alert-rule":{"put":{"description":"Create an alert rule for a specific organization.","tags":["Alert Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"eventType":{"type":"string","enum":["health_check_healthy","health_check_unhealthy","health_check_toggle","site_online","site_offline","site_toggle","resource_healthy","resource_unhealthy","resource_degraded","resource_toggle"]},"enabled":{"type":"boolean","default":true},"cooldownSeconds":{"type":"integer","minimum":0,"default":0},"siteIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"default":[]},"allSites":{"type":"boolean","default":false},"healthCheckIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"default":[]},"allHealthChecks":{"type":"boolean","default":false},"resourceIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"default":[]},"allResources":{"type":"boolean","default":false},"userIds":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"roleIds":{"type":"array","items":{"type":"number"},"default":[]},"emails":{"type":"array","items":{"type":"string","format":"email"},"default":[]},"webhookActions":{"type":"array","items":{"type":"object","properties":{"webhookUrl":{"type":"string","format":"uri"},"config":{"type":"string"},"enabled":{"type":"boolean","default":true}},"required":["webhookUrl"],"additionalProperties":false},"default":[]}},"required":["name","eventType"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/alert-rule/{alertRuleId}":{"post":{"description":"Update an alert rule for a specific organization.","tags":["Alert Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"alertRuleId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"eventType":{"type":"string","enum":["health_check_healthy","health_check_unhealthy","health_check_toggle","site_online","site_offline","site_toggle","resource_healthy","resource_unhealthy","resource_degraded","resource_toggle"]},"enabled":{"type":"boolean"},"cooldownSeconds":{"type":"integer","minimum":0},"siteIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"allSites":{"type":"boolean"},"healthCheckIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"allHealthChecks":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"allResources":{"type":"boolean"},"userIds":{"type":"array","items":{"type":"string","minLength":1}},"roleIds":{"type":"array","items":{"type":"number"}},"emails":{"type":"array","items":{"type":"string","format":"email"}},"webhookActions":{"type":"array","items":{"type":"object","properties":{"webhookUrl":{"type":"string","format":"uri"},"config":{"type":"string"},"enabled":{"type":"boolean","default":true}},"required":["webhookUrl"],"additionalProperties":false}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"alertRuleId":{"type":"number"}},"required":["alertRuleId"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete an alert rule for a specific organization.","tags":["Alert Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"alertRuleId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get a specific alert rule for an organization.","tags":["Alert Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"alertRuleId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/alert-rules":{"get":{"description":"List all alert rules for a specific organization.","tags":["Alert Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"healthCheckId","in":"query"},{"schema":{"type":"string","enum":["name","last_triggered_at"]},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"enabled","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/health-checks":{"get":{"description":"List health checks for an organization.","tags":["Health Check"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["http","tcp","snmp","ping"]},"required":false,"name":"hcMode","in":"query"},{"schema":{"type":"string"},"required":false,"name":"siteId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resourceId","in":"query"},{"schema":{"type":"string","enum":["healthy","unhealthy","unknown"]},"required":false,"name":"hcHealth","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"hcEnabled","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/health-check":{"put":{"description":"Create a health check for a specific organization.","tags":["Health Check"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"hcEnabled":{"type":"boolean","default":false},"hcMode":{"type":"string","default":"http"},"hcHostname":{"type":"string"},"hcPort":{"type":"integer","minimum":1,"maximum":65535},"hcPath":{"type":"string"},"hcScheme":{"type":"string"},"hcMethod":{"type":"string","default":"GET"},"hcInterval":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":30},"hcUnhealthyInterval":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":30},"hcTimeout":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"hcHeaders":{"type":"string","nullable":true},"hcFollowRedirects":{"type":"boolean","default":true},"hcStatus":{"type":"integer","nullable":true},"hcTlsServerName":{"type":"string"},"hcHealthyThreshold":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"hcUnhealthyThreshold":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1}},"required":["name","siteId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"targetHealthCheckId":{"type":"number"}},"required":["targetHealthCheckId"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/health-check/{healthCheckId}":{"post":{"description":"Update a health check for a specific organization.","tags":["Health Check"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"healthCheckId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"hcEnabled":{"type":"boolean"},"hcMode":{"type":"string"},"hcHostname":{"type":"string"},"hcPort":{"type":"integer","minimum":1,"maximum":65535},"hcPath":{"type":"string"},"hcScheme":{"type":"string"},"hcMethod":{"type":"string"},"hcInterval":{"type":"integer","minimum":0,"exclusiveMinimum":true},"hcUnhealthyInterval":{"type":"integer","minimum":0,"exclusiveMinimum":true},"hcTimeout":{"type":"integer","minimum":0,"exclusiveMinimum":true},"hcHeaders":{"type":"string","nullable":true},"hcFollowRedirects":{"type":"boolean"},"hcStatus":{"type":"integer","nullable":true},"hcTlsServerName":{"type":"string"},"hcHealthyThreshold":{"type":"integer","minimum":0,"exclusiveMinimum":true},"hcUnhealthyThreshold":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"targetHealthCheckId":{"type":"number"},"name":{"type":"string","nullable":true},"siteId":{"type":"number","nullable":true},"hcEnabled":{"type":"boolean"},"hcHealth":{"type":"string","nullable":true},"hcMode":{"type":"string","nullable":true},"hcHostname":{"type":"string","nullable":true},"hcPort":{"type":"number","nullable":true},"hcPath":{"type":"string","nullable":true},"hcScheme":{"type":"string","nullable":true},"hcMethod":{"type":"string","nullable":true},"hcInterval":{"type":"number","nullable":true},"hcUnhealthyInterval":{"type":"number","nullable":true},"hcTimeout":{"type":"number","nullable":true},"hcHeaders":{"type":"string","nullable":true},"hcFollowRedirects":{"type":"boolean","nullable":true},"hcStatus":{"type":"number","nullable":true},"hcTlsServerName":{"type":"string","nullable":true},"hcHealthyThreshold":{"type":"number","nullable":true},"hcUnhealthyThreshold":{"type":"number","nullable":true}},"required":["targetHealthCheckId","name","siteId","hcEnabled","hcHealth","hcMode","hcHostname","hcPort","hcPath","hcScheme","hcMethod","hcInterval","hcUnhealthyInterval","hcTimeout","hcHeaders","hcFollowRedirects","hcStatus","hcTlsServerName","hcHealthyThreshold","hcUnhealthyThreshold"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete a health check for a specific organization.","tags":["Health Check"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"healthCheckId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/resource-policy":{"post":{"description":"Create a resource policy.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"sso":{"type":"boolean","default":true},"skipToIdpId":{"type":"integer"},"roleIds":{"type":"array","items":{"type":"string"},"default":[]},"userIds":{"type":"array","items":{"type":"string"},"default":[]},"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100},"pincode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"nullable":true}]},"headerAuth":{"type":"object","nullable":true,"properties":{"user":{"type":"string","minLength":4,"maxLength":100},"password":{"type":"string","minLength":4,"maxLength":100},"extendedCompatibility":{"type":"boolean"}},"required":["user","password","extendedCompatibility"]},"emailWhitelistEnabled":{"type":"boolean","default":false},"emails":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]},"default":[]},"applyRules":{"type":"boolean","default":false},"rules":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["ACCEPT","DROP","PASS"],"description":"rule action"},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"],"description":"rule match"},"value":{"type":"string","minLength":1},"priority":{"type":"integer","description":"Rule priority"},"enabled":{"type":"boolean"}},"required":["action","match","value","priority"],"additionalProperties":false},"default":[]},"mtlsEnabled":{"type":"boolean","default":false,"description":"Require clients to present a certificate signed by one of mtlsCaCertificates. Only takes effect on resources with SSL enabled (not TCP/UDP)."},"mtlsCaCertificates":{"type":"array","items":{"type":"object","properties":{"certificate":{"type":"string","minLength":1,"maxLength":100000},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["certificate"],"additionalProperties":false},"default":[],"description":"PEM-encoded trusted CA certificates for mTLS. Each certificate may be a bundle; the name is only kept for a single certificate."}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/resource-policies":{"get":{"description":"List resource policies for an organization.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}":{"delete":{"description":"Delete a resource policy.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get a resource policy by its resourcePolicyId.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"resourcePolicyId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a resource policy.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255},"mtlsEnabled":{"type":"boolean","description":"Require clients to present a certificate signed by one of the policy's trusted CA certificates. Requires at least one CA certificate, and only takes effect on resources with SSL enabled (not TCP/UDP)."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Update a resource policy. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255},"mtlsEnabled":{"type":"boolean","description":"Require clients to present a certificate signed by one of the policy's trusted CA certificates. Requires at least one CA certificate, and only takes effect on resources with SSL enabled (not TCP/UDP)."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/domain/{domainId}/custom-dns-record":{"put":{"description":"Create a custom DNS record served by Pangolin's nameservers for a domain. Each entry in `values` is served as a separate resource record (e.g. both nameservers of an NS record).","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"domainId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":253},"type":{"type":"string","enum":["A","AAAA","CNAME","MX","NS","SRV","TXT"]},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1026},"minItems":1,"maxItems":10},"ttl":{"type":"integer","minimum":60,"maximum":86400,"default":300},"priority":{"type":"integer","nullable":true,"minimum":0,"maximum":65535},"weight":{"type":"integer","nullable":true,"minimum":0,"maximum":65535},"port":{"type":"integer","nullable":true,"minimum":0,"maximum":65535},"enabled":{"type":"boolean","default":true}},"required":["name","type","values"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/domain/{domainId}/custom-dns-record/{customDnsRecordId}":{"post":{"description":"Update a custom DNS record for a domain.","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"domainId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"customDnsRecordId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":253},"type":{"type":"string","enum":["A","AAAA","CNAME","MX","NS","SRV","TXT"]},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1026},"minItems":1,"maxItems":10},"ttl":{"type":"integer","minimum":60,"maximum":86400},"priority":{"type":"integer","nullable":true,"minimum":0,"maximum":65535},"weight":{"type":"integer","nullable":true,"minimum":0,"maximum":65535},"port":{"type":"integer","nullable":true,"minimum":0,"maximum":65535},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete a custom DNS record from a domain.","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"domainId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"customDnsRecordId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/domain/{domainId}/custom-dns-records":{"get":{"description":"List the custom DNS records served by Pangolin's nameservers for a domain.","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"domainId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site/{niceId}":{"get":{"description":"Get a site by orgId and niceId. NiceId is a readable ID for the site and unique on a per org basis.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"niceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site/{siteId}":{"get":{"description":"Get a site by siteId.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"siteId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete a site and all its associated data.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteId","in":"path"},{"schema":{"type":"boolean","description":"When true, also deletes all public and private resources associated with this site"},"required":false,"description":"When true, also deletes all public and private resources associated with this site","name":"deleteResources","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a site.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255},"dockerSocketEnabled":{"type":"boolean"},"autoUpdateEnabled":{"type":"boolean"},"autoUpdateOverrideOrg":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site":{"put":{"description":"Create a new site.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"example":{"name":"My Site","type":"newt"},"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"exitNodeId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"niceId":{"type":"string","minLength":1,"maxLength":255},"pubKey":{"type":"string"},"subnet":{"type":"string"},"newtId":{"type":"string"},"secret":{"type":"string"},"address":{"type":"string"},"type":{"type":"string","enum":["newt","wireguard","local"]}},"required":["name","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site/{siteId}/approve":{"post":{"description":"Approve a pending site and approve (and enable when needed) its associated resources.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site/{siteId}/reject":{"post":{"description":"Reject a pending site by deleting it and any associated resources that are still pending.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/sites":{"get":{"description":"List all sites in an organization","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["name","megabytesIn","megabytesOut"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"boolean","description":"Filter by online status"},"required":false,"description":"Filter by online status","name":"online","in":"query"},{"schema":{"type":"string","enum":["pending","approved"],"description":"Filter by site status"},"required":false,"description":"Filter by site status","name":"status","in":"query"},{"schema":{"type":"array","description":"Filter by site labels"},"required":false,"description":"Filter by site labels","name":"labels","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/pick-site-defaults":{"get":{"description":"Return pre-requisite data for creating a site, such as the exit node, subnet, Newt credentials, etc.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"exitNodeId":{"type":"number"},"address":{"type":"string"},"publicKey":{"type":"string"},"name":{"type":"string"},"listenPort":{"type":"number"},"endpoint":{"type":"string"},"subnet":{"type":"string"},"newtId":{"type":"string"},"newtSecret":{"type":"string"},"clientAddress":{"type":"string"}},"required":["exitNodeId","address","publicKey","name","listenPort","endpoint","subnet","newtId","newtSecret"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site/{siteId}/restart":{"post":{"description":"Restart a site.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}":{"get":{"description":"Get an organization","tags":["Organization"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"org":{"type":"object","properties":{},"additionalProperties":{"nullable":true}}},"required":["org"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete an organization","tags":["Organization"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update an organization","tags":["Organization"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"requireTwoFactor":{"type":"boolean"},"maxSessionLengthHours":{"type":"number","nullable":true},"passwordExpiryDays":{"type":"number","nullable":true},"settingsLogRetentionDaysRequest":{"type":"number","minimum":0},"settingsLogRetentionDaysAccess":{"type":"number","minimum":0},"settingsLogRetentionDaysAction":{"type":"number","minimum":0},"settingsLogRetentionDaysConnection":{"type":"number","minimum":0},"settingsLogRetentionDaysAISessions":{"type":"number","minimum":0},"settingsLogRetentionDaysSsh":{"type":"number","minimum":0},"settingsEnableGlobalNewtAutoUpdate":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/roles":{"post":{"description":"Set roles for a resource. This will replace all existing roles. When the resource has an inline policy defined (no shared resource policy assigned), roles are set on the inline policy instead of directly on the resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"List all roles for a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/roles":{"post":{"description":"Set roles for a resource. This will replace all existing roles. When the resource has an inline policy defined (no shared resource policy assigned), roles are set on the inline policy instead of directly on the resource.","tags":["Public Resource","Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"List all roles for a resource.","tags":["Public Resource","Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/role/{roleId}":{"delete":{"description":"Delete a role.","tags":["Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"roleId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get a role.","tags":["Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"roleId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a role.","tags":["Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"roleId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string"},"requireDeviceApproval":{"type":"boolean"},"allowSsh":{"type":"boolean"},"sshSudoMode":{"type":"string","enum":["none","full","commands"]},"sshSudoCommands":{"type":"array","items":{"type":"string"}},"sshCreateHomeDir":{"type":"boolean"},"sshUnixGroups":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/roles":{"get":{"description":"List roles.","tags":["Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["name"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org":{"put":{"description":"Create a new organization","tags":["Organization"],"security":[{"Bearer Auth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":255},"subnet":{"anyOf":[{"type":"string","format":"ipv4-cidr"}]},"utilitySubnet":{"anyOf":[{"type":"string","format":"ipv4-cidr"}]}},"required":["orgId","name","subnet","utilitySubnet"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/orgs":{"get":{"description":"List all organizations in the system.","tags":["Organization"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"orgs":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{"nullable":true}}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["orgs","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/user/{userId}/check":{"get":{"description":"Check a user's access in an organization.","tags":["Organization","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/reset-bandwidth":{"post":{"description":"Reset all sites in selected organization bandwidth counters.","tags":["Organization","Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/admin/orgs":{"get":{"description":"List all organizations in the system with usage counts (server admin).","tags":["Organization"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["name","createdAt"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"orgs":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"string"},"name":{"type":"string"},"subnet":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"userCount":{"type":"number"},"siteCount":{"type":"number"},"resourceCount":{"type":"number"}},"required":["orgId","name","subnet","createdAt","userCount","siteCount","resourceCount"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"}},"required":["total","page","pageSize"]}},"required":["orgs","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/admin/org/{orgId}":{"delete":{"description":"Delete any organization in the system (server admin).","tags":["Organization"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/resource/{niceId}":{"get":{"description":"Get a resource by orgId and niceId. NiceId is a readable ID for the resource and unique on a per org basis.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"niceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}":{"get":{"description":"Get a resource by resourceId.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a resource. Policy fields (sso, mfa, pincode, password, whitelist) update the inline policy when no shared resource policy is assigned; when a shared policy is assigned those fields override the shared policy for this resource only.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9-]+$"},"subdomain":{"type":"string","nullable":true},"ssl":{"type":"boolean"},"sso":{"type":"boolean","description":"When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this value overrides the shared policy for this resource."},"blockAccess":{"type":"boolean"},"emailWhitelistEnabled":{"type":"boolean","description":"When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this value overrides the shared policy for this resource."},"applyRules":{"type":"boolean","description":"When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this value overrides the shared policy for this resource."},"domainId":{"type":"string"},"matchBaseDomain":{"type":"boolean","description":"For HTTP resources with a wildcard subdomain: also serve the host the wildcard sits under, so *.apps.example.com also matches apps.example.com."},"enabled":{"type":"boolean"},"stickySession":{"type":"boolean"},"loadBalancingStrategy":{"type":"string","enum":["wrr","p2c","hrw","leasttime"],"description":"How requests are distributed across targets: wrr (weighted round robin, default), p2c (power of two choices), hrw (highest random weight / client IP hashing), leasttime (lowest response time)."},"tlsServerName":{"type":"string","nullable":true},"setHostHeader":{"type":"string","nullable":true},"forwardIdentityHeaders":{"type":"boolean","description":"Whether to forward the authenticated user's identity to the backend in the Remote-User, Remote-Email, Remote-Name, Remote-Role, and Remote-User-Id headers."},"skipToIdpId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"description":"When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this value overrides the shared policy for this resource."},"headers":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"requestHeaders":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"responseHeaders":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"maintenanceModeEnabled":{"type":"boolean"},"maintenanceModeType":{"type":"string","enum":["forced","automatic"]},"maintenanceTitle":{"type":"string","nullable":true,"maxLength":255},"maintenanceMessage":{"type":"string","nullable":true,"maxLength":2000},"maintenanceEstimatedTime":{"type":"string","nullable":true,"maxLength":100},"mtlsEnabled":{"type":"boolean","description":"Require clients to present a certificate signed by one of the resource's trusted CA certificates. Requires SSL and at least one CA certificate. When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this applies to this resource only if the shared policy does not enable mTLS itself."},"postAuthPath":{"type":"string","nullable":true},"pamMode":{"type":"string","enum":["passthrough","push"]},"authDaemonMode":{"type":"string","enum":["site","remote","native"]},"authDaemonPort":{"type":"integer","nullable":true,"minimum":1,"maximum":65535},"resourcePolicyId":{"type":"number","nullable":true,"description":"ID of the resource policy to apply to this resource. Set to null to remove the resource policy and fall back to the inline policy settings."}},"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255},"proxyPort":{"type":"integer","minimum":1,"maximum":65535},"stickySession":{"type":"boolean"},"enabled":{"type":"boolean"},"proxyProtocol":{"type":"boolean"},"proxyProtocolVersion":{"type":"integer","minimum":1},"resourcePolicyId":{"type":"number","nullable":true}},"additionalProperties":false}]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}":{"get":{"description":"Get a resource by resourceId.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete a resource.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a resource. Policy fields (sso, mfa, pincode, password, whitelist) update the inline policy when no shared resource policy is assigned; when a shared policy is assigned those fields override the shared policy for this resource only.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9-]+$"},"subdomain":{"type":"string","nullable":true},"ssl":{"type":"boolean"},"sso":{"type":"boolean","description":"When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this value overrides the shared policy for this resource."},"blockAccess":{"type":"boolean"},"emailWhitelistEnabled":{"type":"boolean","description":"When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this value overrides the shared policy for this resource."},"applyRules":{"type":"boolean","description":"When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this value overrides the shared policy for this resource."},"domainId":{"type":"string"},"matchBaseDomain":{"type":"boolean","description":"For HTTP resources with a wildcard subdomain: also serve the host the wildcard sits under, so *.apps.example.com also matches apps.example.com."},"enabled":{"type":"boolean"},"stickySession":{"type":"boolean"},"loadBalancingStrategy":{"type":"string","enum":["wrr","p2c","hrw","leasttime"],"description":"How requests are distributed across targets: wrr (weighted round robin, default), p2c (power of two choices), hrw (highest random weight / client IP hashing), leasttime (lowest response time)."},"tlsServerName":{"type":"string","nullable":true},"setHostHeader":{"type":"string","nullable":true},"forwardIdentityHeaders":{"type":"boolean","description":"Whether to forward the authenticated user's identity to the backend in the Remote-User, Remote-Email, Remote-Name, Remote-Role, and Remote-User-Id headers."},"skipToIdpId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"description":"When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this value overrides the shared policy for this resource."},"headers":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"requestHeaders":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"responseHeaders":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"maintenanceModeEnabled":{"type":"boolean"},"maintenanceModeType":{"type":"string","enum":["forced","automatic"]},"maintenanceTitle":{"type":"string","nullable":true,"maxLength":255},"maintenanceMessage":{"type":"string","nullable":true,"maxLength":2000},"maintenanceEstimatedTime":{"type":"string","nullable":true,"maxLength":100},"mtlsEnabled":{"type":"boolean","description":"Require clients to present a certificate signed by one of the resource's trusted CA certificates. Requires SSL and at least one CA certificate. When no shared resource policy is assigned (resourcePolicyId is null), updates the resource's inline policy. When a shared policy is assigned, this applies to this resource only if the shared policy does not enable mTLS itself."},"postAuthPath":{"type":"string","nullable":true},"pamMode":{"type":"string","enum":["passthrough","push"]},"authDaemonMode":{"type":"string","enum":["site","remote","native"]},"authDaemonPort":{"type":"integer","nullable":true,"minimum":1,"maximum":65535},"resourcePolicyId":{"type":"number","nullable":true,"description":"ID of the resource policy to apply to this resource. Set to null to remove the resource policy and fall back to the inline policy settings."}},"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255},"proxyPort":{"type":"integer","minimum":1,"maximum":65535},"stickySession":{"type":"boolean"},"enabled":{"type":"boolean"},"proxyProtocol":{"type":"boolean"},"proxyProtocolVersion":{"type":"integer","minimum":1},"resourcePolicyId":{"type":"number","nullable":true}},"additionalProperties":false}]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/certificate/{domainId}/{domain}":{"get":{"description":"Get a certificate by domain.","tags":["Certificate"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"domainId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"domain","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/certificate/{certId}":{"post":{"description":"Restart a certificate by ID.","tags":["Certificate"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"certId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/resource":{"put":{"description":"Create a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"subdomain":{"type":"string","nullable":true},"http":{"type":"boolean","deprecated":true,"description":"Deprecated. Use `mode` instead. Legacy compatibility only."},"protocol":{"type":"string","enum":["tcp","udp"],"deprecated":true,"description":"Deprecated. Use `mode` instead. Legacy compatibility only."},"domainId":{"type":"string"},"matchBaseDomain":{"type":"boolean","description":"For HTTP resources with a wildcard subdomain: also serve the host the wildcard sits under, so *.apps.example.com also matches apps.example.com."},"stickySession":{"type":"boolean"},"postAuthPath":{"type":"string","nullable":true},"mode":{"type":"string","enum":["http","ssh","rdp","vnc","tcp","udp","inference"]},"pamMode":{"type":"string","enum":["passthrough","push"]},"authDaemonPort":{"type":"integer","minimum":0,"exclusiveMinimum":true},"authDaemonMode":{"type":"string","enum":["site","remote","native"]},"aiProviders":{"type":"array","items":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"accessMode":{"type":"string","enum":["inherit","select"],"default":"inherit"},"enabled":{"type":"boolean","default":true}},"required":["providerId"],"additionalProperties":false},"description":"For inference-mode resources: AI providers to attach. Providers are attached in inherit mode, using each provider's own allow/block lists. Effective allow model keys must be unique across attached providers."}},"required":["name","domainId"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"http":{"type":"boolean","deprecated":true,"description":"Deprecated. Use `mode` instead. Legacy compatibility only."},"protocol":{"type":"string","enum":["tcp","udp"],"deprecated":true,"description":"Deprecated. Use `mode` instead. Legacy compatibility only."},"mode":{"type":"string","enum":["tcp","udp"]},"proxyPort":{"type":"integer","minimum":1,"maximum":65535}},"required":["name","proxyPort"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/public-resource":{"put":{"description":"Create a resource.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"subdomain":{"type":"string","nullable":true},"http":{"type":"boolean","deprecated":true,"description":"Deprecated. Use `mode` instead. Legacy compatibility only."},"protocol":{"type":"string","enum":["tcp","udp"],"deprecated":true,"description":"Deprecated. Use `mode` instead. Legacy compatibility only."},"domainId":{"type":"string"},"matchBaseDomain":{"type":"boolean","description":"For HTTP resources with a wildcard subdomain: also serve the host the wildcard sits under, so *.apps.example.com also matches apps.example.com."},"stickySession":{"type":"boolean"},"postAuthPath":{"type":"string","nullable":true},"mode":{"type":"string","enum":["http","ssh","rdp","vnc","tcp","udp","inference"]},"pamMode":{"type":"string","enum":["passthrough","push"]},"authDaemonPort":{"type":"integer","minimum":0,"exclusiveMinimum":true},"authDaemonMode":{"type":"string","enum":["site","remote","native"]},"aiProviders":{"type":"array","items":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"accessMode":{"type":"string","enum":["inherit","select"],"default":"inherit"},"enabled":{"type":"boolean","default":true}},"required":["providerId"],"additionalProperties":false},"description":"For inference-mode resources: AI providers to attach. Providers are attached in inherit mode, using each provider's own allow/block lists. Effective allow model keys must be unique across attached providers."}},"required":["name","domainId"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"http":{"type":"boolean","deprecated":true,"description":"Deprecated. Use `mode` instead. Legacy compatibility only."},"protocol":{"type":"string","enum":["tcp","udp"],"deprecated":true,"description":"Deprecated. Use `mode` instead. Legacy compatibility only."},"mode":{"type":"string","enum":["tcp","udp"]},"proxyPort":{"type":"integer","minimum":1,"maximum":65535}},"required":["name","proxyPort"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/resources":{"get":{"description":"List resources for an organization.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["name"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"boolean","description":"Filter resources based on enabled status"},"required":false,"description":"Filter resources based on enabled status","name":"enabled","in":"query"},{"schema":{"type":"string","enum":["protected","not_protected","none"],"description":"Filter resources based on authentication state. `protected` means the resource has at least one auth mechanism (password, pincode, header auth, SSO, email whitelist, or mTLS). `not_protected` means the resource has no auth mechanisms. `none` means the resource is not protected by HTTP (i.e. it has no auth mechanisms and http is false)."},"required":false,"description":"Filter resources based on authentication state. `protected` means the resource has at least one auth mechanism (password, pincode, header auth, SSO, email whitelist, or mTLS). `not_protected` means the resource has no auth mechanisms. `none` means the resource is not protected by HTTP (i.e. it has no auth mechanisms and http is false).","name":"authState","in":"query"},{"schema":{"type":"string","enum":["healthy","degraded","offline","unknown"],"description":"Filter resources based on health status of their targets. `healthy` means all targets are healthy. `degraded` means at least one target is unhealthy, but not all are unhealthy. `offline` means all targets are unhealthy. `unknown` means all targets have unknown health status."},"required":false,"description":"Filter resources based on health status of their targets. `healthy` means all targets are healthy. `degraded` means at least one target is unhealthy, but not all are unhealthy. `offline` means all targets are unhealthy. `unknown` means all targets have unknown health status.","name":"healthStatus","in":"query"},{"schema":{"type":"string","enum":["http","https","tcp","udp","ssh","rdp","vnc","inference"],"description":"Filter resources by protocol. `http` and `https` match HTTP resources without and with SSL respectively."},"required":false,"description":"Filter resources by protocol. `http` and `https` match HTTP resources without and with SSL respectively.","name":"protocol","in":"query"},{"schema":{"type":"integer","description":"When set, only resources that have at least one target on this site are returned"},"required":false,"description":"When set, only resources that have at least one target on this site are returned","name":"siteId","in":"query"},{"schema":{"type":"string","enum":["pending","approved"],"description":"Filter by resource status"},"required":false,"description":"Filter by resource status","name":"status","in":"query"},{"schema":{"type":"array","description":"Filter by resource labels"},"required":false,"description":"Filter by resource labels","name":"labels","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/public-resources":{"get":{"description":"List resources for an organization.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["name"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"boolean","description":"Filter resources based on enabled status"},"required":false,"description":"Filter resources based on enabled status","name":"enabled","in":"query"},{"schema":{"type":"string","enum":["protected","not_protected","none"],"description":"Filter resources based on authentication state. `protected` means the resource has at least one auth mechanism (password, pincode, header auth, SSO, email whitelist, or mTLS). `not_protected` means the resource has no auth mechanisms. `none` means the resource is not protected by HTTP (i.e. it has no auth mechanisms and http is false)."},"required":false,"description":"Filter resources based on authentication state. `protected` means the resource has at least one auth mechanism (password, pincode, header auth, SSO, email whitelist, or mTLS). `not_protected` means the resource has no auth mechanisms. `none` means the resource is not protected by HTTP (i.e. it has no auth mechanisms and http is false).","name":"authState","in":"query"},{"schema":{"type":"string","enum":["healthy","degraded","offline","unknown"],"description":"Filter resources based on health status of their targets. `healthy` means all targets are healthy. `degraded` means at least one target is unhealthy, but not all are unhealthy. `offline` means all targets are unhealthy. `unknown` means all targets have unknown health status."},"required":false,"description":"Filter resources based on health status of their targets. `healthy` means all targets are healthy. `degraded` means at least one target is unhealthy, but not all are unhealthy. `offline` means all targets are unhealthy. `unknown` means all targets have unknown health status.","name":"healthStatus","in":"query"},{"schema":{"type":"string","enum":["http","https","tcp","udp","ssh","rdp","vnc","inference"],"description":"Filter resources by protocol. `http` and `https` match HTTP resources without and with SSL respectively."},"required":false,"description":"Filter resources by protocol. `http` and `https` match HTTP resources without and with SSL respectively.","name":"protocol","in":"query"},{"schema":{"type":"integer","description":"When set, only resources that have at least one target on this site are returned"},"required":false,"description":"When set, only resources that have at least one target on this site are returned","name":"siteId","in":"query"},{"schema":{"type":"string","enum":["pending","approved"],"description":"Filter by resource status"},"required":false,"description":"Filter by resource status","name":"status","in":"query"},{"schema":{"type":"array","description":"Filter by resource labels"},"required":false,"description":"Filter by resource labels","name":"labels","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/users":{"post":{"description":"Set users for a resource. This will replace all existing users. When the resource has an inline policy defined (no shared resource policy assigned), users are set on the inline policy instead of directly on the resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string"}}},"required":["userIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"List all users for a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/users":{"post":{"description":"Set users for a resource. This will replace all existing users. When the resource has an inline policy defined (no shared resource policy assigned), users are set on the inline policy instead of directly on the resource.","tags":["Public Resource","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string"}}},"required":["userIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"List all users for a resource.","tags":["Public Resource","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/password":{"post":{"description":"Set the password for a resource. Setting the password to null will remove it.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100}},"required":["password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/password":{"post":{"description":"Set the password for a resource. Setting the password to null will remove it.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100}},"required":["password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/pincode":{"post":{"description":"Set the PIN code for a resource. Setting the PIN code to null will remove it.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pincode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"nullable":true}]}},"required":["pincode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/pincode":{"post":{"description":"Set the PIN code for a resource. Setting the PIN code to null will remove it.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pincode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"nullable":true}]}},"required":["pincode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/whitelist":{"post":{"description":"Set email whitelist for a resource. This will replace all existing emails.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}}},"required":["emails"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get the whitelist of emails for a specific resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/whitelist":{"post":{"description":"Set email whitelist for a resource. This will replace all existing emails.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}}},"required":["emails"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get the whitelist of emails for a specific resource.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/rule":{"put":{"description":"Create a resource rule.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["ACCEPT","DROP","PASS"]},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"]},"value":{"type":"string","minLength":1},"priority":{"type":"integer"},"enabled":{"type":"boolean"}},"required":["action","match","value","priority"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/rule":{"put":{"description":"Create a resource rule.","tags":["Public Resource","Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["ACCEPT","DROP","PASS"]},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"]},"value":{"type":"string","minLength":1},"priority":{"type":"integer"},"enabled":{"type":"boolean"}},"required":["action","match","value","priority"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/rule/{ruleId}":{"delete":{"description":"Delete a resource rule.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"ruleId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a resource rule.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"ruleId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["ACCEPT","DROP","PASS"]},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"]},"value":{"type":"string","minLength":1},"priority":{"type":"integer"},"enabled":{"type":"boolean"}},"required":["priority"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/rule/{ruleId}":{"delete":{"description":"Delete a resource rule.","tags":["Public Resource","Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"ruleId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a resource rule.","tags":["Public Resource","Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"ruleId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["ACCEPT","DROP","PASS"]},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"]},"value":{"type":"string","minLength":1},"priority":{"type":"integer"},"enabled":{"type":"boolean"}},"required":["priority"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/rules":{"get":{"description":"List rules for a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/rules":{"get":{"description":"List rules for a resource.","tags":["Public Resource","Rule"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/header-auth":{"post":{"description":"Set or update the header authentication for a resource. If user and password is not provided, it will remove the header authentication.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","nullable":true,"minLength":4,"maxLength":100},"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100},"extendedCompatibility":{"type":"boolean","nullable":true}},"required":["user","password","extendedCompatibility"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/header-auth":{"post":{"description":"Set or update the header authentication for a resource. If user and password is not provided, it will remove the header authentication.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","nullable":true,"minLength":4,"maxLength":100},"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100},"extendedCompatibility":{"type":"boolean","nullable":true}},"required":["user","password","extendedCompatibility"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/whitelist/add":{"post":{"description":"Add a single email to the resource whitelist.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/whitelist/add":{"post":{"description":"Add a single email to the resource whitelist.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/whitelist/remove":{"post":{"description":"Remove a single email from the resource whitelist.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/whitelist/remove":{"post":{"description":"Remove a single email from the resource whitelist.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/roles/add":{"post":{"description":"Add a single role to a resource. When the resource has an inline policy defined (no shared resource policy assigned), the role is added to the inline policy instead of directly to the resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/roles/add":{"post":{"description":"Add a single role to a resource. When the resource has an inline policy defined (no shared resource policy assigned), the role is added to the inline policy instead of directly to the resource.","tags":["Public Resource","Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/roles/remove":{"post":{"description":"Remove a single role from a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/roles/remove":{"post":{"description":"Remove a single role from a resource.","tags":["Public Resource","Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/users/add":{"post":{"description":"Add a single user to a resource. When the resource has an inline policy defined (no shared resource policy assigned), the user is added to the inline policy instead of directly to the resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/users/add":{"post":{"description":"Add a single user to a resource. When the resource has an inline policy defined (no shared resource policy assigned), the user is added to the inline policy instead of directly to the resource.","tags":["Public Resource","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/users/remove":{"post":{"description":"Remove a single user from a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/users/remove":{"post":{"description":"Remove a single user from a resource.","tags":["Public Resource","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/resources-names":{"get":{"description":"List all resource names for an organization.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/public-resource-names":{"get":{"description":"List all resource names for an organization.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/resource-policy/{niceId}":{"get":{"description":"Get a resource policy by orgId and niceId. NiceId is a readable ID for the resource and unique on a per org basis.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"niceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}":{"get":{"description":"Get a resource policy by its resourcePolicyId.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"resourcePolicyId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a resource policy.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255},"mtlsEnabled":{"type":"boolean","description":"Require clients to present a certificate signed by one of the policy's trusted CA certificates. Requires at least one CA certificate, and only takes effect on resources with SSL enabled (not TCP/UDP)."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Update a resource policy. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255},"mtlsEnabled":{"type":"boolean","description":"Require clients to present a certificate signed by one of the policy's trusted CA certificates. Requires at least one CA certificate, and only takes effect on resources with SSL enabled (not TCP/UDP)."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/policies":{"get":{"description":"Get the inline and shared policies associated with a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/policies":{"get":{"description":"Get the inline and shared policies associated with a resource.","tags":["Public Resource","Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/ai-models":{"get":{"description":"List the models this resource has selected from its select-mode providers' allow/block lists. Providers in inherit mode are not represented here; they use their own lists.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Replace the allow/block model selection for an inference resource. Requires at least one attached AI provider in select mode. Models must belong to a select-mode provider and their listType must match the provider catalog entry. An empty array clears the selection, which denies all models for select-mode providers.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"listType":{"type":"string","enum":["allow","block"]}},"required":["modelId","listType"],"additionalProperties":false}}},"required":["models"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/ai-models/add":{"post":{"description":"Add a single model to an inference resource allow/block selection. Requires at least one attached AI provider in select mode. The model must belong to a select-mode provider and its listType must match the provider catalog entry. listType defaults to allow.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"listType":{"type":"string","enum":["allow","block"],"default":"allow"}},"required":["modelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/ai-models/remove":{"post":{"description":"Remove a single model from an inference resource allow/block list. Requires at least one attached AI provider.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["modelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/ai-providers":{"get":{"description":"List AI providers attached to an inference resource, including each attachment's accessMode.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Replace the AI providers attached to an inference resource. Each provider uses accessMode inherit (default, uses the provider's own allow/block lists) or select (uses the resource's selected subset of that provider's catalog). An empty list clears all providers. Effective allow model keys must be unique across attached providers.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"accessMode":{"type":"string","enum":["inherit","select"],"default":"inherit"},"enabled":{"type":"boolean","default":true}},"required":["providerId"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/ai-providers/add":{"post":{"description":"Add or replace a single AI provider attachment on an inference resource. The provider is attached in inherit mode, using its own allow/block lists.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["providerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/ai-providers/remove":{"post":{"description":"Remove an AI provider attachment from an inference resource. At least one provider must remain.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["providerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/blueprint":{"get":{"description":"Generate a blueprint YAML snippet that recreates this resource.","tags":["Public Resource","Blueprint"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/mtls/certificate/{mtlsCertificateId}":{"delete":{"description":"Remove a trusted CA certificate from a resource. If it is the last one, mTLS is disabled on the resource since it can no longer verify any client. When no shared resource policy is assigned, this updates the resource's inline policy.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"mtlsCertificateId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/mtls/certificate/{mtlsCertificateId}":{"delete":{"description":"Remove a trusted CA certificate from a resource. If it is the last one, mTLS is disabled on the resource since it can no longer verify any client. When no shared resource policy is assigned, this updates the resource's inline policy.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"mtlsCertificateId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/mtls/certificate":{"put":{"description":"Add a trusted CA certificate that clients must present a certificate signed by when mTLS is enabled on a resource. Accepts a PEM bundle; each certificate in the bundle is stored separately. When no shared resource policy is assigned, this updates the resource's inline policy.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"certificate":{"type":"string","minLength":1,"maxLength":100000}},"required":["certificate"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/mtls/certificate":{"put":{"description":"Add a trusted CA certificate that clients must present a certificate signed by when mTLS is enabled on a resource. Accepts a PEM bundle; each certificate in the bundle is stored separately. When no shared resource policy is assigned, this updates the resource's inline policy.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"certificate":{"type":"string","minLength":1,"maxLength":100000}},"required":["certificate"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/mtls/certificates":{"get":{"description":"List the trusted CA certificates for a resource's mTLS. When no shared resource policy is assigned, these are the resource's inline policy certificates.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/mtls/certificates":{"get":{"description":"List the trusted CA certificates for a resource's mTLS. When no shared resource policy is assigned, these are the resource's inline policy certificates.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/access-control":{"put":{"description":"Set access control users for a resource policy, including SSO, users, roles, Identity provider.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sso":{"type":"boolean"},"userIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array"},"skipToIdpId":{"type":"integer","description":"Default identity provider ID to skip to on login"}},"required":["sso","userIds","roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourceId}/access-control":{"post":{"description":"Set access control users for a resource policy, including SSO, users, roles, Identity provider.","tags":["Public Resource Policy","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sso":{"type":"boolean"},"userIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array"},"skipToIdpId":{"type":"integer","description":"Default identity provider ID to skip to on login"}},"required":["sso","userIds","roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set access control users for a resource policy, including SSO, users, roles, Identity provider. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sso":{"type":"boolean"},"userIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array"},"skipToIdpId":{"type":"integer","description":"Default identity provider ID to skip to on login"}},"required":["sso","userIds","roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourceId}/access-control":{"put":{"description":"Set access control users for a resource policy, including SSO, users, roles, Identity provider. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sso":{"type":"boolean"},"userIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array"},"skipToIdpId":{"type":"integer","description":"Default identity provider ID to skip to on login"}},"required":["sso","userIds","roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/password":{"post":{"description":"Set the password for a resource policy. Setting the password to null will remove it.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100}},"required":["password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set the password for a resource policy. Setting the password to null will remove it. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100}},"required":["password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}/password":{"post":{"description":"Set the password for a resource policy. Setting the password to null will remove it.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100}},"required":["password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set the password for a resource policy. Setting the password to null will remove it. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","nullable":true,"minLength":4,"maxLength":100}},"required":["password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/pincode":{"post":{"description":"Set the PIN code for a resource policy. Setting the PIN code to null will remove it.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pincode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"nullable":true}]}},"required":["pincode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set the PIN code for a resource policy. Setting the PIN code to null will remove it. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pincode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"nullable":true}]}},"required":["pincode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}/pincode":{"post":{"description":"Set the PIN code for a resource policy. Setting the PIN code to null will remove it.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pincode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"nullable":true}]}},"required":["pincode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set the PIN code for a resource policy. Setting the PIN code to null will remove it. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pincode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"nullable":true}]}},"required":["pincode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/header-auth":{"post":{"description":"Set or update the header authentication for a resource policy. If user and password is not provided, it will remove the header authentication.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"headerAuth":{"type":"object","nullable":true,"properties":{"user":{"type":"string","minLength":4,"maxLength":100},"password":{"type":"string","minLength":4,"maxLength":100},"extendedCompatibility":{"type":"boolean"}},"required":["user","password","extendedCompatibility"]}},"required":["headerAuth"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set or update the header authentication for a resource policy. If user and password is not provided, it will remove the header authentication. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"headerAuth":{"type":"object","nullable":true,"properties":{"user":{"type":"string","minLength":4,"maxLength":100},"password":{"type":"string","minLength":4,"maxLength":100},"extendedCompatibility":{"type":"boolean"}},"required":["user","password","extendedCompatibility"]}},"required":["headerAuth"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}/header-auth":{"post":{"description":"Set or update the header authentication for a resource policy. If user and password is not provided, it will remove the header authentication.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"headerAuth":{"type":"object","nullable":true,"properties":{"user":{"type":"string","minLength":4,"maxLength":100},"password":{"type":"string","minLength":4,"maxLength":100},"extendedCompatibility":{"type":"boolean"}},"required":["user","password","extendedCompatibility"]}},"required":["headerAuth"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set or update the header authentication for a resource policy. If user and password is not provided, it will remove the header authentication. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"headerAuth":{"type":"object","nullable":true,"properties":{"user":{"type":"string","minLength":4,"maxLength":100},"password":{"type":"string","minLength":4,"maxLength":100},"extendedCompatibility":{"type":"boolean"}},"required":["user","password","extendedCompatibility"]}},"required":["headerAuth"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/whitelist":{"post":{"description":"Set email whitelist for a resource policy. This will replace all existing emails.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emailWhitelistEnabled":{"type":"boolean"},"emails":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}}},"required":["emailWhitelistEnabled","emails"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set email whitelist for a resource policy. This will replace all existing emails. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emailWhitelistEnabled":{"type":"boolean"},"emails":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}}},"required":["emailWhitelistEnabled","emails"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}/whitelist":{"post":{"description":"Set email whitelist for a resource policy. This will replace all existing emails.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emailWhitelistEnabled":{"type":"boolean"},"emails":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}}},"required":["emailWhitelistEnabled","emails"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set email whitelist for a resource policy. This will replace all existing emails. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emailWhitelistEnabled":{"type":"boolean"},"emails":{"type":"array","items":{"anyOf":[{"type":"string","format":"email"},{"type":"string","pattern":"^\\*@[\\w.-]+\\.[a-zA-Z]{2,}$"}]}}},"required":["emailWhitelistEnabled","emails"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/rules":{"post":{"description":"Set all rules for a resource policy at once. This will replace all existing rules.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applyRules":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"action":{"type":"string","enum":["ACCEPT","DROP","PASS"],"description":"rule action"},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"],"description":"rule match"},"value":{"type":"string","minLength":1},"priority":{"type":"integer","description":"Rule priority"},"enabled":{"type":"boolean"}},"required":["action","match","value","priority"],"additionalProperties":false}}},"required":["applyRules","rules"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set all rules for a resource policy at once. This will replace all existing rules. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applyRules":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"action":{"type":"string","enum":["ACCEPT","DROP","PASS"],"description":"rule action"},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"],"description":"rule match"},"value":{"type":"string","minLength":1},"priority":{"type":"integer","description":"Rule priority"},"enabled":{"type":"boolean"}},"required":["action","match","value","priority"],"additionalProperties":false}}},"required":["applyRules","rules"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}/rules":{"post":{"description":"Set all rules for a resource policy at once. This will replace all existing rules.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applyRules":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"action":{"type":"string","enum":["ACCEPT","DROP","PASS"],"description":"rule action"},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"],"description":"rule match"},"value":{"type":"string","minLength":1},"priority":{"type":"integer","description":"Rule priority"},"enabled":{"type":"boolean"}},"required":["action","match","value","priority"],"additionalProperties":false}}},"required":["applyRules","rules"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"put":{"description":"Set all rules for a resource policy at once. This will replace all existing rules. Deprecated: use POST instead.","deprecated":true,"tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applyRules":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"action":{"type":"string","enum":["ACCEPT","DROP","PASS"],"description":"rule action"},"match":{"type":"string","enum":["CIDR","IP","PATH","COUNTRY","COUNTRY_IS_NOT","ASN","REGION","METHOD"],"description":"rule match"},"value":{"type":"string","minLength":1},"priority":{"type":"integer","description":"Rule priority"},"enabled":{"type":"boolean"}},"required":["action","match","value","priority"],"additionalProperties":false}}},"required":["applyRules","rules"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/mtls/certificate":{"put":{"description":"Add a trusted CA certificate that clients must present a certificate signed by when mTLS is enabled on a resource policy. Accepts a PEM bundle; each certificate in the bundle is stored separately.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"certificate":{"type":"string","minLength":1,"maxLength":100000}},"required":["certificate"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}/mtls/certificate":{"put":{"description":"Add a trusted CA certificate that clients must present a certificate signed by when mTLS is enabled on a resource policy. Accepts a PEM bundle; each certificate in the bundle is stored separately.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"certificate":{"type":"string","minLength":1,"maxLength":100000}},"required":["certificate"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/mtls/certificates":{"get":{"description":"List the trusted CA certificates for a resource policy's mTLS.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}/mtls/certificates":{"get":{"description":"List the trusted CA certificates for a resource policy's mTLS.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource-policy/{resourcePolicyId}/mtls/certificate/{mtlsCertificateId}":{"delete":{"description":"Remove a trusted CA certificate from a resource policy. If it is the last one, mTLS is disabled on the policy since it can no longer verify any client.","tags":["Public Resource Policy (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"mtlsCertificateId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource-policy/{resourcePolicyId}/mtls/certificate/{mtlsCertificateId}":{"delete":{"description":"Remove a trusted CA certificate from a resource policy. If it is the last one, mTLS is disabled on the policy since it can no longer verify any client.","tags":["Public Resource Policy"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"resourcePolicyId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"mtlsCertificateId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/domains":{"get":{"description":"List all domains for a organization.","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"domains":{"type":"array","items":{"type":"object","properties":{"domainId":{"type":"string"},"baseDomain":{"type":"string"},"verified":{"type":"boolean"},"type":{"type":"string","nullable":true},"failed":{"type":"boolean"},"tries":{"type":"number"},"configManaged":{"type":"boolean"},"certResolver":{"type":"string","nullable":true},"preferWildcardCert":{"type":"boolean","nullable":true},"errorMessage":{"type":"string","nullable":true}},"required":["domainId","baseDomain","verified","type","failed","tries","configManaged","certResolver","preferWildcardCert","errorMessage"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["domains","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/domain/{domainId}":{"get":{"description":"Get a domain by domainId.","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"domainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a domain by domainId.","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"domainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"domainId":{"type":"string"},"certResolver":{"type":"string","nullable":true},"preferWildcardCert":{"type":"boolean","nullable":true}},"required":["domainId","certResolver","preferWildcardCert"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"patch":{"description":"Update a domain by domainId. Deprecated: use POST instead.","deprecated":true,"tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"domainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"domainId":{"type":"string"},"certResolver":{"type":"string","nullable":true},"preferWildcardCert":{"type":"boolean","nullable":true}},"required":["domainId","certResolver","preferWildcardCert"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/domain/{domainId}/dns-records":{"get":{"description":"Get all DNS records for a domain by domainId.","tags":["Domain"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"domainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/user/{userId}":{"delete":{"description":"Remove a user from an organization.","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get a user in an organization.","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a user in an org.","tags":["Organization"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"autoProvisioned":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/users":{"get":{"description":"List users in an organization.","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["username"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["internal"]},{"type":"integer","minimum":0,"exclusiveMinimum":true},{"nullable":true}],"description":"Filter by identity provider id, or \"internal\" for internal users"},"required":false,"description":"Filter by identity provider id, or \"internal\" for internal users","name":"idp_id","in":"query"},{"schema":{"type":"object","nullable":true,"properties":{"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"includeOwner":{"type":"boolean"}},"required":["roleIds","includeOwner"],"description":"Filter users who have any of these role ids in the organization, or \"owner\" for organization owners (repeat query param)"},"required":false,"description":"Filter users who have any of these role ids in the organization, or \"owner\" for organization owners (repeat query param)","name":"role_id","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/role/{roleId}/add/{userId}":{"post":{"description":"Legacy: set exactly one role for the user (replaces any other roles the user has in the org).","tags":["Role","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number","nullable":true},"required":false,"name":"roleId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/create-invite":{"post":{"description":"Invite a user to join an organization.","tags":["User Invitation"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1},"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"validHours":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":168},"sendEmail":{"type":"boolean"},"regenerate":{"type":"boolean"}},"required":["email","validHours"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"inviteLink":{"type":"string"},"expiresAt":{"type":"number"}},"required":["inviteLink","expiresAt"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/user-by-username":{"get":{"description":"Get a user in an organization by username. When idpId is not passed, only internal users are searched (username is globally unique for them). For external (OIDC) users, pass idpId to search by username within that identity provider.","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"idpId","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/users":{"get":{"description":"List non–server-admin users (server admin).","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["username","email","name"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["internal"]},{"type":"integer","minimum":0,"exclusiveMinimum":true},{"nullable":true}],"description":"Filter by identity provider id, or \"internal\" for internal users"},"required":false,"description":"Filter by identity provider id, or \"internal\" for internal users","name":"idp_id","in":"query"},{"schema":{"type":"boolean","description":"Filter by 2FA state matching: enabled if twoFactorEnabled or twoFactorSetupRequested"},"required":false,"description":"Filter by 2FA state matching: enabled if twoFactorEnabled or twoFactorSetupRequested","name":"two_factor","in":"query"},{"schema":{"type":"boolean","description":"Filter by server admin status"},"required":false,"description":"Filter by server admin status","name":"server_admin","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/user/{userId}":{"get":{"description":"Get a user by ID.","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/user/{userId}/server-admin":{"post":{"description":"Promote or demote a user's server admin status (server admin).","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"serverAdmin":{"type":"boolean"}},"required":["serverAdmin"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"userId":{"type":"string"},"serverAdmin":{"type":"boolean"}},"required":["userId","serverAdmin"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/invitations":{"get":{"description":"List invitations in an organization.","tags":["User Invitation"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/invitations/{inviteId}":{"delete":{"description":"Remove an open invitation from an organization","tags":["User Invitation"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"inviteId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/user":{"put":{"description":"Create an organization user.","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"username":{"type":"string","minLength":1},"name":{"type":"string"},"type":{"type":"string","enum":["internal","oidc"]},"idpId":{"type":"number"},"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1},"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["username"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/user/{userId}/2fa":{"post":{"description":"Update a user's 2FA status.","tags":["User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"twoFactorSetupRequested":{"type":"boolean"}},"required":["twoFactorSetupRequested"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"userId":{"type":"string"},"twoFactorRequested":{"type":"boolean"}},"required":["userId","twoFactorRequested"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/pick-client-defaults":{"get":{"description":"Return pre-requisite data for creating a client.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"olmId":{"type":"string"},"olmSecret":{"type":"string"},"subnet":{"type":"string"}},"required":["olmId","olmSecret","subnet"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/client":{"put":{"description":"Create a new client for an organization.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"olmId":{"type":"string"},"secret":{"type":"string"},"subnet":{"type":"string"},"type":{"type":"string","enum":["olm"]}},"required":["name","olmId","secret","subnet","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}":{"delete":{"description":"Delete a client by its client ID.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a client by its client ID.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get a client by its client ID.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/archive":{"post":{"description":"Archive a client by its client ID.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/unarchive":{"post":{"description":"Unarchive a client by its client ID.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/block":{"post":{"description":"Block a client by its client ID.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/unblock":{"post":{"description":"Unblock a client by its client ID.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/clients":{"get":{"description":"List all clients for an organization.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["name","megabytesIn","megabytesOut"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"boolean","description":"Filter by online status"},"required":false,"description":"Filter by online status","name":"online","in":"query"},{"schema":{"type":"string","enum":["windows","android","cli","olm","macos","ios","ipados","unknown"],"description":"Filter by agent type. Use 'unknown' to filter clients with no agent detected."},"required":false,"description":"Filter by agent type. Use 'unknown' to filter clients with no agent detected.","name":"agent","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["active","blocked","archived"]},"default":["active"],"description":"Filter by client status. Can be a comma-separated list of values. Defaults to 'active'."},"required":false,"description":"Filter by client status. Can be a comma-separated list of values. Defaults to 'active'.","name":"status","in":"query"},{"schema":{"type":"array","description":"Filter by client labels"},"required":false,"description":"Filter by client labels","name":"labels","in":"query"},{"schema":{"type":"array","items":{"type":"integer"},"description":"Filter clients that have any of these role ids assigned (repeat query param or comma-separated)"},"required":false,"description":"Filter clients that have any of these role ids assigned (repeat query param or comma-separated)","name":"role_id","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/user-devices":{"get":{"description":"List all user devices for an organization.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["megabytesIn","megabytesOut","firstSeen","lastSeen"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"boolean","description":"Filter by online status"},"required":false,"description":"Filter by online status","name":"online","in":"query"},{"schema":{"type":"string","enum":["windows","android","cli","olm","macos","ios","ipados","unknown"],"description":"Filter by agent type. Use 'unknown' to filter clients with no agent detected."},"required":false,"description":"Filter by agent type. Use 'unknown' to filter clients with no agent detected.","name":"agent","in":"query"},{"schema":{"type":"string","description":"Filter by user ID"},"required":false,"description":"Filter by user ID","name":"userId","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["active","pending","denied","blocked","archived"]},"default":["active","pending"],"description":"Filter by device status. Can include multiple values separated by commas. 'active' means not archived, not blocked, and if approval is enabled, approved. 'pending' and 'denied' are only applicable if approval is enabled."},"required":false,"description":"Filter by device status. Can include multiple values separated by commas. 'active' means not archived, not blocked, and if approval is enabled, approved. 'pending' and 'denied' are only applicable if approval is enabled.","name":"status","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/client/{niceId}":{"get":{"description":"Get a client by orgId and niceId. NiceId is a readable ID for the site and unique on a per org basis.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"niceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/user/{userId}/client":{"put":{"description":"Create a new client for a user and associate it with an existing olm.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"olmId":{"type":"string"},"subnet":{"type":"string"},"type":{"type":"string","enum":["olm"]}},"required":["name","olmId","subnet","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/verify-associations-cache":{"get":{"description":"Read-only check of whether the client's site/site-resource association cache matches what the current permissions imply.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/rebuild-associations-cache":{"post":{"description":"Rebuild the client's site/site-resource association cache based on current permissions.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site-resource":{"put":{"description":"Create a new site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string"},"mode":{"type":"string","enum":["host","cidr","http","ssh","inference","gateway"]},"ssl":{"type":"boolean"},"scheme":{"type":"string","enum":["http","https"]},"siteIds":{"type":"array","items":{"type":"integer"}},"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"destinationPort":{"type":"integer","minimum":0,"exclusiveMinimum":true},"destination":{"type":"string","nullable":true,"minLength":1},"alias":{"type":"string","pattern":"^(?:[a-zA-Z0-9*?](?:[a-zA-Z0-9*?-]{0,61}[a-zA-Z0-9*?])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$","description":"Fully qualified domain name with optional wildcards, e.g., example.internal, *.example.internal, or host-0?.example.internal","example":"service.example.internal"},"userIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array","items":{"type":"integer"}},"clientIds":{"type":"array","items":{"type":"integer"}},"tcpPortRangeString":{"type":"string","description":"Port range string. Use \"*\" for all ports, a comma-separated list of ports, or ranges (e.g., \"80,443,8000-9000\"). Ports must be between 1 and 65535.","example":"80,443,8000-9000"},"udpPortRangeString":{"type":"string","description":"Port range string. Use \"*\" for all ports, a comma-separated list of ports, or ranges (e.g., \"80,443,8000-9000\"). Ports must be between 1 and 65535.","example":"80,443,8000-9000"},"disableIcmp":{"type":"boolean"},"authDaemonPort":{"type":"integer","minimum":0,"exclusiveMinimum":true},"authDaemonMode":{"type":"string","enum":["site","remote","native"]},"pamMode":{"type":"string","enum":["passthrough","push"]},"domainId":{"type":"string"},"subdomain":{"type":"string"},"aiProviders":{"type":"array","items":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"accessMode":{"type":"string","enum":["inherit","select"],"default":"inherit"},"enabled":{"type":"boolean","default":true}},"required":["providerId"],"additionalProperties":false},"description":"For inference-mode site resources: AI providers to attach. Providers are attached in inherit mode, using each provider's own allow/block lists. Effective allow model keys must be unique across attached providers."}},"required":["name","mode","userIds","roleIds","clientIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/private-resource":{"put":{"description":"Create a new site resource.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"niceId":{"type":"string"},"mode":{"type":"string","enum":["host","cidr","http","ssh","inference","gateway"]},"ssl":{"type":"boolean"},"scheme":{"type":"string","enum":["http","https"]},"siteIds":{"type":"array","items":{"type":"integer"}},"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"destinationPort":{"type":"integer","minimum":0,"exclusiveMinimum":true},"destination":{"type":"string","nullable":true,"minLength":1},"alias":{"type":"string","pattern":"^(?:[a-zA-Z0-9*?](?:[a-zA-Z0-9*?-]{0,61}[a-zA-Z0-9*?])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$","description":"Fully qualified domain name with optional wildcards, e.g., example.internal, *.example.internal, or host-0?.example.internal","example":"service.example.internal"},"userIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array","items":{"type":"integer"}},"clientIds":{"type":"array","items":{"type":"integer"}},"tcpPortRangeString":{"type":"string","description":"Port range string. Use \"*\" for all ports, a comma-separated list of ports, or ranges (e.g., \"80,443,8000-9000\"). Ports must be between 1 and 65535.","example":"80,443,8000-9000"},"udpPortRangeString":{"type":"string","description":"Port range string. Use \"*\" for all ports, a comma-separated list of ports, or ranges (e.g., \"80,443,8000-9000\"). Ports must be between 1 and 65535.","example":"80,443,8000-9000"},"disableIcmp":{"type":"boolean"},"authDaemonPort":{"type":"integer","minimum":0,"exclusiveMinimum":true},"authDaemonMode":{"type":"string","enum":["site","remote","native"]},"pamMode":{"type":"string","enum":["passthrough","push"]},"domainId":{"type":"string"},"subdomain":{"type":"string"},"aiProviders":{"type":"array","items":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"accessMode":{"type":"string","enum":["inherit","select"],"default":"inherit"},"enabled":{"type":"boolean","default":true}},"required":["providerId"],"additionalProperties":false},"description":"For inference-mode site resources: AI providers to attach. Providers are attached in inherit mode, using each provider's own allow/block lists. Effective allow model keys must be unique across attached providers."}},"required":["name","mode","userIds","roleIds","clientIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}":{"delete":{"description":"Delete a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get a specific site resource by siteResourceId.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"siteIds":{"type":"array","items":{"type":"integer"}},"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"niceId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9-]+$"},"mode":{"type":"string","enum":["host","cidr","http","ssh","inference","gateway"]},"ssl":{"type":"boolean"},"scheme":{"type":"string","nullable":true,"enum":["http","https",null]},"destinationPort":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"destination":{"type":"string","nullable":true,"minLength":1},"enabled":{"type":"boolean"},"alias":{"type":"string","nullable":true,"pattern":"^(?:[a-zA-Z0-9*?](?:[a-zA-Z0-9*?-]{0,61}[a-zA-Z0-9*?])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$","description":"Fully qualified domain name with optional wildcards, e.g., example.internal, *.example.internal, or host-0?.example.internal","example":"service.example.internal"},"userIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array","items":{"type":"integer"}},"clientIds":{"type":"array","items":{"type":"integer"}},"tcpPortRangeString":{"type":"string","description":"Port range string. Use \"*\" for all ports, a comma-separated list of ports, or ranges (e.g., \"80,443,8000-9000\"). Ports must be between 1 and 65535.","example":"80,443,8000-9000"},"udpPortRangeString":{"type":"string","description":"Port range string. Use \"*\" for all ports, a comma-separated list of ports, or ranges (e.g., \"80,443,8000-9000\"). Ports must be between 1 and 65535.","example":"80,443,8000-9000"},"disableIcmp":{"type":"boolean"},"authDaemonPort":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"authDaemonMode":{"type":"string","enum":["site","remote","native"]},"pamMode":{"type":"string","enum":["passthrough","push"]},"domainId":{"type":"string"},"subdomain":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{siteResourceId}":{"delete":{"description":"Delete a site resource.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get a specific site resource by siteResourceId.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update a site resource.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"siteIds":{"type":"array","items":{"type":"integer"}},"siteId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"niceId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9-]+$"},"mode":{"type":"string","enum":["host","cidr","http","ssh","inference","gateway"]},"ssl":{"type":"boolean"},"scheme":{"type":"string","nullable":true,"enum":["http","https",null]},"destinationPort":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"destination":{"type":"string","nullable":true,"minLength":1},"enabled":{"type":"boolean"},"alias":{"type":"string","nullable":true,"pattern":"^(?:[a-zA-Z0-9*?](?:[a-zA-Z0-9*?-]{0,61}[a-zA-Z0-9*?])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$","description":"Fully qualified domain name with optional wildcards, e.g., example.internal, *.example.internal, or host-0?.example.internal","example":"service.example.internal"},"userIds":{"type":"array","items":{"type":"string"}},"roleIds":{"type":"array","items":{"type":"integer"}},"clientIds":{"type":"array","items":{"type":"integer"}},"tcpPortRangeString":{"type":"string","description":"Port range string. Use \"*\" for all ports, a comma-separated list of ports, or ranges (e.g., \"80,443,8000-9000\"). Ports must be between 1 and 65535.","example":"80,443,8000-9000"},"udpPortRangeString":{"type":"string","description":"Port range string. Use \"*\" for all ports, a comma-separated list of ports, or ranges (e.g., \"80,443,8000-9000\"). Ports must be between 1 and 65535.","example":"80,443,8000-9000"},"disableIcmp":{"type":"boolean"},"authDaemonPort":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"authDaemonMode":{"type":"string","enum":["site","remote","native"]},"pamMode":{"type":"string","enum":["passthrough","push"]},"domainId":{"type":"string"},"subdomain":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site/{siteId}/resource/nice/{niceId}":{"get":{"description":"Get a specific site resource by niceId.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"niceId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site/{siteId}/resources":{"get":{"description":"List site resources for a site.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"100"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["name"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"string","enum":["pending","approved"],"description":"Filter by site resource status"},"required":false,"description":"Filter by site resource status","name":"status","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site/{siteId}/private-resources":{"get":{"description":"List site resources for a site.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"100"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["name"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"string","enum":["pending","approved"],"description":"Filter by site resource status"},"required":false,"description":"Filter by site resource status","name":"status","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/site-resources":{"get":{"description":"List all site resources for an organization.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["host","cidr","http","ssh","inference","gateway"],"description":"Filter site resources by mode"},"required":false,"description":"Filter site resources by mode","name":"mode","in":"query"},{"schema":{"type":"string","enum":["name"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"integer","description":"When set, only site resources associated with this site (via network) are returned"},"required":false,"description":"When set, only site resources associated with this site (via network) are returned","name":"siteId","in":"query"},{"schema":{"type":"string","enum":["pending","approved"],"description":"Filter by site resource status"},"required":false,"description":"Filter by site resource status","name":"status","in":"query"},{"schema":{"type":"boolean","description":"Filter site resources based on enabled status"},"required":false,"description":"Filter site resources based on enabled status","name":"enabled","in":"query"},{"schema":{"type":"array","description":"Filter by resource labels"},"required":false,"description":"Filter by resource labels","name":"labels","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/private-resources":{"get":{"description":"List all site resources for an organization.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["host","cidr","http","ssh","inference","gateway"],"description":"Filter site resources by mode"},"required":false,"description":"Filter site resources by mode","name":"mode","in":"query"},{"schema":{"type":"string","enum":["name"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"integer","description":"When set, only site resources associated with this site (via network) are returned"},"required":false,"description":"When set, only site resources associated with this site (via network) are returned","name":"siteId","in":"query"},{"schema":{"type":"string","enum":["pending","approved"],"description":"Filter by site resource status"},"required":false,"description":"Filter by site resource status","name":"status","in":"query"},{"schema":{"type":"boolean","description":"Filter site resources based on enabled status"},"required":false,"description":"Filter site resources based on enabled status","name":"enabled","in":"query"},{"schema":{"type":"array","description":"Filter by resource labels"},"required":false,"description":"Filter by resource labels","name":"labels","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/roles":{"get":{"description":"List all roles for a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Set roles for a site resource. This will replace all existing roles.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/roles":{"get":{"description":"List all roles for a site resource.","tags":["Private Resource","Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Set roles for a site resource. This will replace all existing roles.","tags":["Private Resource","Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["roleIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/users":{"get":{"description":"List all users for a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Set users for a site resource. This will replace all existing users.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string"}}},"required":["userIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/users":{"get":{"description":"List all users for a site resource.","tags":["Private Resource","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Set users for a site resource. This will replace all existing users.","tags":["Private Resource","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string"}}},"required":["userIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/clients":{"get":{"description":"List all clients for a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Set clients for a site resource. This will replace all existing clients. Clients with a userId cannot be added.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["clientIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/clients":{"get":{"description":"List all clients for a site resource.","tags":["Private Resource","Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Set clients for a site resource. This will replace all existing clients. Clients with a userId cannot be added.","tags":["Private Resource","Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"required":["clientIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/roles/add":{"post":{"description":"Add a single role to a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/roles/add":{"post":{"description":"Add a single role to a site resource.","tags":["Private Resource","Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/roles/remove":{"post":{"description":"Remove a single role from a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/roles/remove":{"post":{"description":"Remove a single role from a site resource.","tags":["Private Resource","Role"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/users/add":{"post":{"description":"Add a single user to a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/users/add":{"post":{"description":"Add a single user to a site resource.","tags":["Private Resource","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/users/remove":{"post":{"description":"Remove a single user from a site resource.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/users/remove":{"post":{"description":"Remove a single user from a site resource.","tags":["Private Resource","User"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/clients/add":{"post":{"description":"Add a single client to a site resource. Clients with a userId cannot be added.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["clientId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/clients/add":{"post":{"description":"Add a single client to a site resource. Clients with a userId cannot be added.","tags":["Private Resource","Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["clientId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/site-resources":{"post":{"description":"Add a machine client to multiple site resources at once.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteResourceIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1}},"required":["siteResourceIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/client/{clientId}/private-resources":{"post":{"description":"Add a machine client to multiple site resources at once.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteResourceIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1}},"required":["siteResourceIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/clients/remove":{"post":{"description":"Remove a single client from a site resource. Clients with a userId cannot be removed.","tags":["Private Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["clientId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/private-resource/{resourceId}/clients/remove":{"post":{"description":"Remove a single client from a site resource. Clients with a userId cannot be removed.","tags":["Private Resource","Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["clientId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/ai-models":{"get":{"description":"List the models this site resource has selected from its select-mode providers' allow/block lists. Providers in inherit mode are not represented here; they use their own lists.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Replace the allow/block model selection for an inference site resource. Requires at least one attached AI provider in select mode. Models must belong to a select-mode provider and their listType must match the provider catalog entry. An empty array clears the selection, which denies all models for select-mode providers.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"listType":{"type":"string","enum":["allow","block"]}},"required":["modelId","listType"],"additionalProperties":false}}},"required":["models"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/ai-models/add":{"post":{"description":"Add a single model to an inference site resource allow/block selection. Requires at least one attached AI provider in select mode. The model must belong to a select-mode provider and its listType must match the provider catalog entry. listType defaults to allow.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"listType":{"type":"string","enum":["allow","block"],"default":"allow"}},"required":["modelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/ai-models/remove":{"post":{"description":"Remove a single model from an inference site resource allow/block list. Requires at least one attached AI provider.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["modelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/ai-providers":{"get":{"description":"List AI providers attached to an inference site resource, including each attachment's accessMode.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Replace the AI providers attached to an inference site resource. Each provider uses accessMode inherit (default, uses the provider's own allow/block lists) or select (uses the site resource's selected subset of that provider's catalog). An empty list clears all providers. Effective allow model keys must be unique across attached providers.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"accessMode":{"type":"string","enum":["inherit","select"],"default":"inherit"},"enabled":{"type":"boolean","default":true}},"required":["providerId"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/ai-providers/add":{"post":{"description":"Add or replace a single AI provider attachment on an inference site resource. The provider is attached in inherit mode, using its own allow/block lists.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["providerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/ai-providers/remove":{"post":{"description":"Remove an AI provider attachment from an inference site resource. At least one provider must remain.","tags":["Private Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["providerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/site-resource/{siteResourceId}/blueprint":{"get":{"description":"Generate a blueprint YAML snippet that recreates this site resource.","tags":["Private Resource","Blueprint"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/access-token":{"post":{"description":"Generate a new access token for a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"validForSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true},"title":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"},"persistSession":{"type":"boolean","default":false},"userId":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/access-token":{"post":{"description":"Generate a new access token for a resource.","tags":["Public Resource","Access Token"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"validForSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true},"title":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"},"persistSession":{"type":"boolean","default":false},"userId":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/access-tokens":{"get":{"description":"List all access tokens in an organization.","tags":["Access Token"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/resource/{resourceId}/access-tokens":{"get":{"description":"List all access tokens for a resource.","tags":["Public Resource (Legacy)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"resourceId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/public-resource/{resourceId}/access-tokens":{"get":{"description":"List all access tokens for a resource.","tags":["Public Resource","Access Token"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number"},"required":true,"name":"resourceId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/access-token/{accessTokenId}":{"delete":{"description":"Delete a access token.","tags":["Access Token"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"accessTokenId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/idp/oidc":{"put":{"description":"Create an OIDC IdP.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"authUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"identifierPath":{"type":"string","minLength":1},"emailPath":{"type":"string"},"namePath":{"type":"string"},"scopes":{"type":"string","minLength":1},"autoProvision":{"type":"boolean"},"sessionRevalidation":{"type":"boolean"},"tags":{"type":"string"},"variant":{"type":"string","enum":["oidc","google","azure"],"default":"oidc"}},"required":["name","clientId","clientSecret","authUrl","tokenUrl","identifierPath","scopes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"idpId":{"type":"number"},"redirectUrl":{"type":"string"}},"required":["idpId","redirectUrl"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/idp/{idpId}/oidc":{"post":{"description":"Update an OIDC IdP.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"authUrl":{"type":"string"},"tokenUrl":{"type":"string"},"identifierPath":{"type":"string"},"emailPath":{"type":"string"},"namePath":{"type":"string"},"scopes":{"type":"string"},"autoProvision":{"type":"boolean"},"sessionRevalidation":{"type":"boolean"},"defaultRoleMapping":{"type":"string"},"defaultOrgMapping":{"type":"string"},"tags":{"type":"string"},"variant":{"type":"string","enum":["oidc","google","azure"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"idpId":{"type":"number"}},"required":["idpId"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/idp/{idpId}":{"delete":{"description":"Delete IDP.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"get":{"description":"Get an IDP by its IDP ID.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/idp":{"get":{"description":"List all IDP in the system.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"idps":{"type":"array","items":{"type":"object","properties":{"idpId":{"type":"number"},"name":{"type":"string"},"type":{"type":"string"},"variant":{"type":"string","nullable":true},"orgCount":{"type":"number"},"autoProvision":{"type":"boolean","nullable":true},"tags":{"type":"string","nullable":true}},"required":["idpId","name","type","variant","orgCount","autoProvision","tags"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["idps","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/idp/{idpId}/org/{orgId}":{"put":{"description":"Create an IDP policy for an existing IDP on an organization.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleMapping":{"type":"string"},"orgMapping":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Create an OIDC IdP for an organization.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Update an IDP org policy.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleMapping":{"type":"string"},"orgMapping":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/idp/{idpId}/org":{"get":{"description":"List all org policies on an IDP.","tags":["Identity Provider (Global)"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"number","nullable":true},"required":false,"name":"idpId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"policies":{"type":"array","items":{"type":"object","properties":{"idpId":{"type":"number"},"orgId":{"type":"string"},"assignDefaultOrgRoleId":{"type":"number","nullable":true}},"required":["idpId","orgId","assignDefaultOrgRoleId"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["policies","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/blueprints":{"get":{"description":"List all blueprints for a organization.","tags":["Blueprint"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/blueprint":{"put":{"description":"Apply a base64 encoded JSON blueprint to an organization","tags":["Blueprint"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"blueprint":{"type":"string"}},"required":["blueprint"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/blueprint/{blueprintId}":{"get":{"description":"Get a blueprint by its blueprint ID.","tags":["Blueprint"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"blueprintId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/api-key/{apiKeyId}":{"delete":{"description":"Delete an API key.","tags":["API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"apiKeyId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/api-key/{apiKeyId}/actions":{"get":{"description":"List all actions set for an API key.","tags":["API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"apiKeyId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"actions":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["actions","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Set actions for an API key. This will replace any existing actions.","tags":["API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"apiKeyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":1}},"required":["actionIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/api-keys":{"get":{"description":"List all API keys for an organization","tags":["API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","default":"1000"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"apiKeyId":{"type":"string"},"orgId":{"type":"string"},"lastChars":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string"}},"required":["apiKeyId","orgId","lastChars","createdAt","name"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["apiKeys","pagination"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/api-key":{"put":{"description":"Create a new API key scoped to the organization.","tags":["API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"apiKeyId":{"type":"string"},"name":{"type":"string"},"apiKey":{"type":"string"},"lastChars":{"type":"string"},"createdAt":{"type":"string"}},"required":["apiKeyId","name","apiKey","lastChars","createdAt"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/re-key/{clientId}/regenerate-client-secret":{"post":{"description":"Regenerate the secret for a machine client's olm. Optionally disconnects the olm so it must reconnect with the new secret.","tags":["Client"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"clientId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string","minLength":1},"disconnect":{"type":"boolean","default":true}},"required":["secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"olmId":{"type":"string"}},"required":["olmId"]},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/re-key/{siteId}/regenerate-site-secret":{"post":{"description":"Regenerate the credentials for a site. For newt sites a new secret is required; for wireguard sites a new public key is required.","tags":["Site"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["newt","wireguard"]},"secret":{"type":"string","minLength":1,"maxLength":255},"pubKey":{"type":"string"},"disconnect":{"type":"boolean","default":true}},"required":["type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"newtId":{"type":"string"}}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/re-key/{orgId}/regenerate-remote-exit-node-secret":{"put":{"description":"Regenerate the secret for a remote exit node. Optionally disconnects the node so it must reconnect with the new secret.","tags":["Remote Exit Node"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"remoteExitNodeId":{"type":"string","minLength":15,"maxLength":15},"secret":{"type":"string","minLength":48,"maxLength":48},"disconnect":{"type":"boolean","default":true}},"required":["remoteExitNodeId","secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"nullable":true},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/labels":{"get":{"description":"List labels in an organization.","tags":["Label"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"post":{"description":"Create a label in an organization.","tags":["Label"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"color":{"type":"string","minLength":1,"pattern":"^#?([0-9a-f]{6}|[0-9a-f]{3})$/i"},"siteId":{"type":"integer"},"resourceId":{"type":"integer"}},"required":["name","color"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/label/{labelId}":{"patch":{"description":"Update a label.","tags":["Label"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"labelId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"color":{"type":"string","minLength":1,"pattern":"^#?([0-9a-f]{6}|[0-9a-f]{3})$/i"}},"required":["color"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}},"delete":{"description":"Delete a label.","tags":["Label"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"labelId","in":"path"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/label/{labelId}/attach":{"put":{"description":"Attach a label to a site, public resource, private resource or client.","tags":["Label"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"labelId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteId":{"type":"integer"},"resourceId":{"type":"integer"},"siteResourceId":{"type":"integer"},"clientId":{"type":"integer"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/label/{labelId}/detach":{"put":{"description":"Detach a label from a site, public resource, private resource or client.","tags":["Label"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"labelId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"siteId":{"type":"integer"},"resourceId":{"type":"integer"},"siteResourceId":{"type":"integer"},"clientId":{"type":"integer"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/org/{orgId}/ai-provider":{"put":{"description":"Create an AI provider for an organization.","tags":["AI Provider"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["openai","anthropic","googleGemini","vertexAi","bedrock","microsoftFoundry","openRouter","vercelAiGateway","custom"]},"upstreamUrl":{"type":"string","nullable":true,"format":"uri"},"apiKey":{"type":"string"},"authType":{"type":"string","enum":["bearer","x-api-key","x-goog-api-key","hec","cf-aig-authorization","none","passthrough"]},"routingMode":{"type":"string","enum":["url","target"]},"capabilities":{"type":"array","items":{"type":"string","enum":["openai_chat","openai_responses","anthropic_messages","v1_models","gemini_generate_content","bedrock_model_invoke","google_generate_content","google_raw_predict","bedrock_converse"]}},"headers":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"skipTlsVerification":{"type":"boolean"},"enabled":{"type":"boolean"}},"required":["name","type"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful response"}}}},"/org/{orgId}/ai-providers":{"get":{"description":"List AI providers for an organization.","tags":["AI Provider"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/ai-provider/{providerId}":{"get":{"description":"Get an AI provider by ID.","tags":["AI Provider"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"providerId","in":"path"}],"responses":{"200":{"description":"Successful response"}}},"post":{"description":"Update an AI provider.","tags":["AI Provider"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"providerId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"niceId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9-]+$"},"upstreamUrl":{"type":"string","nullable":true,"format":"uri"},"apiKey":{"type":"string"},"authType":{"type":"string","enum":["bearer","x-api-key","x-goog-api-key","hec","cf-aig-authorization","none","passthrough"]},"routingMode":{"type":"string","enum":["url","target"]},"capabilities":{"type":"array","items":{"type":"string","enum":["openai_chat","openai_responses","anthropic_messages","v1_models","gemini_generate_content","bedrock_model_invoke","google_generate_content","google_raw_predict","bedrock_converse"]}},"headers":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"skipTlsVerification":{"type":"boolean"},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response"}}},"delete":{"description":"Delete an AI provider.","tags":["AI Provider"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"providerId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/ai-provider/{niceId}":{"get":{"description":"Get an AI provider by orgId and niceId. NiceId is a readable ID for the provider and unique on a per org basis.","tags":["AI Provider"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"niceId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/ai-provider/{providerId}/model":{"put":{"description":"Create an AI model under a provider.","tags":["AI Model"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"providerId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"modelKey":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"enabled":{"type":"boolean"},"listType":{"type":"string","enum":["allow","block"],"default":"allow"}},"required":["modelKey","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful response"}}}},"/ai-provider/{providerId}/models":{"get":{"description":"List AI models for a provider.","tags":["AI Model"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"providerId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/ai-provider/{providerId}/catalog-models":{"get":{"description":"List known catalog models for an AI provider's type. Used for model key suggestions.","tags":["AI Model"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"providerId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/ai-catalog-models":{"get":{"description":"List known catalog models for an AI provider type. Used for model key suggestions before a provider exists.","tags":["AI Model"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","enum":["openai","anthropic","googleGemini","vertexAi","bedrock","microsoftFoundry","openRouter","vercelAiGateway","custom"]},"required":true,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/ai-model/{modelId}":{"get":{"description":"Get an AI model by ID.","tags":["AI Model"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"modelId","in":"path"}],"responses":{"200":{"description":"Successful response"}}},"post":{"description":"Update an AI model.","tags":["AI Model"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"modelId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"modelKey":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"enabled":{"type":"boolean"},"listType":{"type":"string","enum":["allow","block"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response"}}},"delete":{"description":"Delete an AI model.","tags":["AI Model"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"modelId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/redirect":{"put":{"description":"Create a redirect for an organization.","tags":["Redirect"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"resourceId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"domainId":{"type":"string","nullable":true,"minLength":1},"subdomain":{"type":"string","nullable":true,"minLength":1,"pattern":"^(?!:\\/\\/)([a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"destinationHost":{"type":"string","minLength":1},"pathMatchType":{"type":"string","enum":["exact","prefix","regex"]},"matchPath":{"type":"string","nullable":true,"minLength":1},"rewritePath":{"type":"string","nullable":true,"minLength":1},"rewritePathType":{"type":"string","nullable":true,"enum":["exact","prefix","regex","stripPrefix",null]},"priority":{"type":"integer","nullable":true,"minimum":1,"maximum":1000},"permanent":{"type":"boolean"},"ssl":{"type":"boolean"},"enabled":{"type":"boolean"}},"required":["name","destinationHost"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful response"}}}},"/org/{orgId}/redirects":{"get":{"description":"List redirects for an organization.","tags":["Redirect"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["name","priority"],"description":"Field to sort by"},"required":false,"description":"Field to sort by","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order"},"required":false,"description":"Sort order","name":"order","in":"query"},{"schema":{"type":"string","enum":["permanent","temporary"],"description":"Filter redirects by type. `permanent` is a 308 redirect and `temporary` is a 307 redirect."},"required":false,"description":"Filter redirects by type. `permanent` is a 308 redirect and `temporary` is a 307 redirect.","name":"type","in":"query"},{"schema":{"type":"boolean","description":"Filter redirects based on enabled status"},"required":false,"description":"Filter redirects based on enabled status","name":"enabled","in":"query"},{"schema":{"type":"integer","description":"Filter redirects attached to this resource"},"required":false,"description":"Filter redirects attached to this resource","name":"resourceId","in":"query"},{"schema":{"type":"string","description":"Filter redirects attached to this domain"},"required":false,"description":"Filter redirects attached to this domain","name":"domainId","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/redirects/{redirectId}":{"get":{"description":"Get a redirect by ID.","tags":["Redirect"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"redirectId","in":"path"}],"responses":{"200":{"description":"Successful response"}}},"post":{"description":"Update a redirect.","tags":["Redirect"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"redirectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"niceId":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9-]+$"},"resourceId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"domainId":{"type":"string","nullable":true,"minLength":1},"subdomain":{"type":"string","nullable":true,"minLength":1,"pattern":"^(?!:\\/\\/)([a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"destinationHost":{"type":"string","minLength":1},"pathMatchType":{"type":"string","enum":["exact","prefix","regex"]},"matchPath":{"type":"string","nullable":true,"minLength":1},"rewritePath":{"type":"string","nullable":true,"minLength":1},"rewritePathType":{"type":"string","nullable":true,"enum":["exact","prefix","regex","stripPrefix",null]},"priority":{"type":"integer","minimum":1,"maximum":1000},"permanent":{"type":"boolean"},"ssl":{"type":"boolean"},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response"}}},"delete":{"description":"Delete a redirect.","tags":["Redirect"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"redirectId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/redirect/{niceId}":{"get":{"description":"Get a redirect by orgId and niceId. NiceId is a readable ID for the redirect and unique on a per org basis.","tags":["Redirect"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"niceId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/ai-budget":{"put":{"description":"Create an AI budget for an organization.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"modelId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"resourceId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"siteResourceId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"roleId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"virtualApiKeyId":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","enum":["usd","tokens"]},"period":{"type":"string","enum":["monthly","yearly","lifetime","daily","hourly","weekly"],"default":"monthly"},"enforcement":{"type":"string","enum":["hard","soft"],"default":"hard"},"enabled":{"type":"boolean"}},"required":["amount","unit"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful response"}}}},"/org/{orgId}/ai-budgets":{"get":{"description":"List AI budgets for an organization.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/ai-provider/{providerId}/ai-budgets":{"get":{"description":"List AI budgets scoped to an AI provider.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"providerId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/ai-model/{modelId}/ai-budgets":{"get":{"description":"List AI budgets scoped to an AI model.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"modelId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/resource/{resourceId}/ai-budgets":{"get":{"description":"List AI budgets scoped to a resource.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/site-resource/{siteResourceId}/ai-budgets":{"get":{"description":"List AI budgets scoped to a site resource.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"siteResourceId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/role/{roleId}/ai-budgets":{"get":{"description":"List AI budgets scoped to a role.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"roleId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/virtual-api-key/{virtualApiKeyId}/ai-budgets":{"get":{"description":"List AI budgets scoped to a virtual API key.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"virtualApiKeyId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/ai-budget/{budgetId}":{"get":{"description":"Get an AI budget by ID.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"budgetId","in":"path"}],"responses":{"200":{"description":"Successful response"}}},"post":{"description":"Update an AI budget.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"budgetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"modelId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"resourceId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"siteResourceId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"roleId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"virtualApiKeyId":{"type":"string","nullable":true,"minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","enum":["usd","tokens"]},"period":{"type":"string","enum":["monthly","yearly","lifetime","daily","hourly","weekly"]},"enforcement":{"type":"string","enum":["hard","soft"]},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response"}}},"delete":{"description":"Delete an AI budget.","tags":["AI Budget"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"budgetId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/virtual-api-key":{"put":{"description":"Create a manual virtual API key for an organization.","tags":["Virtual API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"allResources":{"type":"boolean","default":false},"resourceIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"validForSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true},"sendEmail":{"type":"boolean","default":false},"sendToAttributedUser":{"type":"boolean","default":false},"emails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":20,"default":[]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful response"}}}},"/org/{orgId}/virtual-api-keys":{"get":{"description":"List manual virtual API keys for an organization.","tags":["Virtual API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"integer","default":20,"description":"Number of items per page"},"required":false,"description":"Number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","default":1,"description":"Page number to retrieve"},"required":false,"description":"Page number to retrieve","name":"page","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"resourceId","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/my-virtual-api-keys":{"get":{"description":"List the signed-in user's identity virtual API key and manual keys attributed to them.","tags":["Virtual API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"resourceGuid","in":"query"}],"responses":{"200":{"description":"Successful response"}}}},"/virtual-api-key/{virtualApiKeyId}":{"get":{"description":"Get a manual virtual API key by ID, including the decrypted secret.","tags":["Virtual API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"virtualApiKeyId","in":"path"}],"responses":{"200":{"description":"Successful response"}}},"post":{"description":"Update a manual virtual API key metadata and resource assignment.","tags":["Virtual API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"virtualApiKeyId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"allResources":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"validForSeconds":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"sendEmail":{"type":"boolean","default":false},"sendToAttributedUser":{"type":"boolean","default":false},"emails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":20,"default":[]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response"}}},"delete":{"description":"Delete a manual virtual API key.","tags":["Virtual API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"virtualApiKeyId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/my-virtual-api-keys/{virtualApiKeyId}":{"get":{"description":"Get a virtual API key owned by the signed-in user, including the decrypted secret.","tags":["Virtual API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"virtualApiKeyId","in":"path"}],"responses":{"200":{"description":"Successful response"}}}},"/org/{orgId}/virtual-api-keys/email-identity-keys":{"post":{"description":"Email identity virtual API keys to selected organization members and roles, or to all members.","tags":["Virtual API Key"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sendToAll":{"type":"boolean","default":false},"userIds":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"roleIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"default":[]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response"}}}},"/maintenance/info":{"get":{"description":"Get maintenance information for a resource by domain.","tags":["Public Resource"],"security":[{"Bearer Auth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"fullDomain","in":"query"}],"responses":{"200":{"description":"Maintenance information retrieved successfully"},"404":{"description":"Resource not found"}}}},"/":{"get":{"description":"Health check","tags":[],"security":[{"Bearer Auth":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"success":{"type":"boolean"},"error":{"type":"boolean"},"message":{"type":"string"},"status":{"type":"number"}},"required":["data","success","error","message","status"]}}}}}}},"/openapi.json":{"get":{"description":"Get OpenAPI specification as JSON","tags":[],"security":[{"Bearer Auth":[]}],"responses":{"200":{"description":"OpenAPI specification as JSON","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/openapi.yaml":{"get":{"description":"Get OpenAPI specification as YAML","tags":[],"security":[{"Bearer Auth":[]}],"responses":{"200":{"description":"OpenAPI specification as YAML","content":{"application/yaml":{"schema":{"type":"string"}}}}}}}}}