{"openapi":"3.0.0","paths":{"/api/v1/customers":{"get":{"operationId":"CustomerController_getTechnicianCustomers_v1","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"example":25,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"example":1,"type":"number"}},{"name":"name","required":false,"in":"query","description":"Customer name","schema":{"example":"","type":"string"}},{"name":"directoryType","required":true,"in":"query","description":"With directory type","schema":{"example":"OFFICE","enum":["AD","OFFICE","LOCAL"],"type":"string"}}],"responses":{"200":{"description":"List of customers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCustomersResponse"}}}},"400":{"description":"Invalid pagination parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}}},"security":[{"oauth2":[]}],"summary":"Get a list of customers","tags":["Customer"]}},"/api/v1/customers/{id}/accounts/count":{"get":{"operationId":"CustomerController_getCustomerAccountsCountPerAccountType_v1","parameters":[{"name":"id","required":true,"in":"path","description":"CustomerId","schema":{"example":"","type":"string"}}],"responses":{"200":{"description":"Customer's accounts count per account type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAccountsCountResponse"}}}},"400":{"description":"Invalid format for customerId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Get counts of different account types for a customer by their ID","tags":["Customer"]}},"/api/v1/customers/installer":{"get":{"operationId":"CustomerController_downloadAgent_v1","parameters":[],"responses":{"200":{"description":"Get the latest version of the agent installer"},"401":{"description":"User is not authenticated","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"404":{"description":"No available agent found for download","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Download the agent installer","tags":["Customer"]}},"/api/v1/auth/login":{"get":{"operationId":"AuthController_oauth2Login_v1","parameters":[],"responses":{"200":{"description":"If you wish to generate and accessToken and refreshToken, add the path /api/v1/auth/login, you will be prompted to login from the CyberQP Dashboard"}},"summary":"Consuming this endpoint from swagger has no effect, if you wish to generate and accessToken and refreshToken, add the path /api/v1/auth/login in your browser and you will be prompted to login from the CyberQP Dashboard","tags":["Auth"]}},"/api/v1/auth/status":{"get":{"operationId":"AuthController_user_v1","parameters":[],"responses":{"200":{"description":"Returns the authentication status of the user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponseDto"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}}},"security":[{"oauth2":[]}],"summary":"Get user status","tags":["Auth"]}},"/api/v1/auth/refresh-token":{"post":{"operationId":"AuthController_refreshToken_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenRequestDto"}}}},"responses":{"200":{"description":"Returns a new access token and refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenResponseDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenResponseDto"}}}},"401":{"description":"Invalid refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}}},"summary":"Refresh an OAuth2 token using a refresh token","tags":["Auth"]}},"/api/v1/auth/revoke-token":{"post":{"operationId":"AuthController_revokeToken_v1","parameters":[],"responses":{"200":{"description":"Tokens successfully revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeTokenResponseDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeTokenResponseDto"}}}},"401":{"description":"Failed to revoke tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}}},"security":[{"oauth2":[]}],"summary":"Revoke all tokens for a specific technician by ID","tags":["Auth"]}},"/api/v1/auth/notification-engine-token":{"post":{"operationId":"AuthController_generateNotificationEngineToken_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallTokenRequestDto"}}}},"responses":{"201":{"description":""}},"tags":["Auth"]}},"/api/v1/tenants/install-token":{"get":{"operationId":"TenantController_getInstallToken_v1","parameters":[],"responses":{"200":{"description":"Successfully retrieved the agent installation token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallTokenResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}}},"security":[{"oauth2":[]}],"summary":"Get the agent installation token","tags":["Tenant"]}},"/api/v1/tenants/company-data":{"get":{"operationId":"TenantController_getTenantCompanyData_v1","parameters":[],"responses":{"200":{"description":"Successfully retrieved the tenant company data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTenantCompanyDataResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}}},"security":[{"oauth2":[]}],"summary":"Get tenant company data","tags":["Tenant"]}},"/api/v1/identity-verification/self-serve-notification":{"post":{"operationId":"IdentityVerificationController_triggerSelfServePushIdentityVerification_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityVerificationRequest"}}}},"responses":{"201":{"description":"Successfully created the identity verification process"},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"404":{"description":"No End-User account or ticket was found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}},"409":{"description":"End-user missing self-serve / Verification already in progress / End-user not matched to PSA Contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExcemptionError"}}}}},"security":[{"oauth2":[]}],"summary":"Trigger identity verification process through self-serve push notification (without code)","tags":["IdentityVerification"]}},"/api/v1/event":{"post":{"operationId":"EventController_processGenericEvent_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRequestDto"}}}},"responses":{"200":{"description":"Event accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericEventResponse"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericEventResponse"}}}},"400":{"description":"Invalid event data provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Customer or account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Process generic event","tags":["Events"]}},"/api/v1/jit/customer/{customerId}":{"get":{"operationId":"JitController_getCustomerJitAccounts_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"searchText","required":false,"in":"query","description":"Optional search text to filter accounts by username","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number (1-based)","schema":{"minimum":1,"type":"number"}}],"responses":{"200":{"description":"List of JIT accounts for the specified customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJitAccountsResponse"}}}},"400":{"description":"Invalid pagination parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to tenant's customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Customer doesn't exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Get JIT accounts for a specific customer","tags":["jit"]}},"/api/v1/jit/tenant":{"get":{"operationId":"JitController_getTenantJitAccounts_v1","parameters":[{"name":"searchText","required":false,"in":"query","description":"Optional search text to filter accounts by username","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number (1-based)","schema":{"minimum":1,"type":"number"}}],"responses":{"200":{"description":"List of JIT accounts for the entire tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJitAccountsResponse"}}}},"400":{"description":"Invalid pagination parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}}},"security":[{"oauth2":[]}],"summary":"Get JIT accounts for entire tenant","tags":["jit"]}},"/api/v1/jit/customer/{customerId}/account/check":{"get":{"operationId":"JitController_checkJitAccountExists_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userType","required":true,"in":"query","description":"Directory type of the account to check","schema":{"enum":["AD","OFFICE","LOCAL"],"type":"string"}},{"name":"agentId","required":false,"in":"query","description":"Agent ID for LOCAL accounts","schema":{"type":"string"}}],"responses":{"200":{"description":"Existing JIT account owned by the technician, or null if none exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckJitAccountResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to tenant's customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Customer doesn't exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Check if a JIT account exists for a given customer and directory type","tags":["jit"]}},"/api/v1/jit/customer/{customerId}/account/{accountId}/password":{"get":{"operationId":"JitController_getJitAccountPassword_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Password for the specified JIT account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJitAccountPasswordResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Get password for a specific JIT account","tags":["jit"]}},"/api/v1/jit/customer/{customerId}/account/{accountId}/otp":{"get":{"operationId":"JitController_getJitAccountOTP_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"OTP codes for the specified JIT account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJitAccountOtpResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Get OTP codes for a specific JIT account","tags":["jit"]},"post":{"operationId":"JitController_saveJitAccountOtpSecret_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveJitAccountOtpSecretRequest"}}}},"responses":{"200":{"description":"OTP saved successfully for the specified JIT account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveJitAccountOtpSecretResponse"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveJitAccountOtpSecretResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Save OTP for a specific JIT account","tags":["jit"]},"delete":{"operationId":"JitController_deleteJitAccountOtpSecret_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"OTP deleted successfully for the specified JIT account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteJitAccountOtpSecretResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Delete OTP for a specific JIT account","tags":["jit"]}},"/api/v1/jit/customer/{customerId}/account/{accountId}/enable":{"patch":{"operationId":"JitController_enableJitAccount_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableJitAccountRequest"}}}},"responses":{"200":{"description":"JIT account enabled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableJitAccountResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Enable a specific JIT account","tags":["jit"]}},"/api/v1/jit/customer/{customerId}/account/{accountId}/disable":{"patch":{"operationId":"JitController_disableJitAccount_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableJitAccountRequest"}}}},"responses":{"200":{"description":"JIT account disabled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableJitAccountResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Disable a specific JIT account","tags":["jit"]}},"/api/v1/jit/customer/{customerId}/account/{accountId}":{"delete":{"operationId":"JitController_deleteJitAccount_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"JIT account deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteJitAccountResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Delete a specific JIT account","tags":["jit"]}},"/api/v1/jit/customer/{customerId}/account":{"post":{"operationId":"JitController_createJitAccount_v1","parameters":[{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJitAccountRequest"}}}},"responses":{"200":{"description":"JIT account created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJitAccountResponse"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJitAccountResponse"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}},"403":{"description":"Technician has no access to account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDto"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDto"}}}}},"security":[{"oauth2":[]}],"summary":"Create a JIT account for a specific customer","tags":["jit"]}},"/api/v1/jit-policies/account":{"get":{"operationId":"JitPoliciesController_getJitPoliciesForCustomerByAccountType_v1","parameters":[{"name":"accountType","required":true,"in":"query","description":"Account Type","schema":{"enum":["AD","OFFICE","LOCAL","HYBRID"],"type":"string"}},{"name":"customerId","required":true,"in":"query","description":"Customer ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of JIT policies for the specified account type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJitPoliciesResponse"}}}},"400":{"description":"Invalid account type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDto"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorUnauthorized"}}}}},"security":[{"oauth2":[]}],"summary":"Get JIT policies for a specific account type","tags":["jit-policies"]}}},"info":{"title":"CyberQP Public API","description":"CyberQP Public API document\n\nYou can download the OpenAPI document and use it in your API client to interact with the API.\n\n[https://ca.cyberqp.com/api/docs-json](https://ca.cyberqp.com/api/docs-json)","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://ca.cyberqp.com/oauth2/auth","tokenUrl":"https://ca.cyberqp.com/oauth2/token","scopes":{"offline_access":"offline_access","profile":"profile","customer":"customer","password_rotation_write":"password_rotation_write"}}},"scheme":"bearer"}},"schemas":{"CustomersList":{"type":"object","properties":{"type":{"type":"string","description":"Entity type","example":"ADClient"},"id":{"type":"string","description":"Customer id","example":"653bdcc428f23b00c71b60e6"},"attributes":{"type":"object","properties":{"guid":{"type":"string"},"name":{"type":"string"}},"required":["guid","name"]}},"required":["type","id","attributes"]},"TenantCustomersResponse":{"type":"object","properties":{"totalItems":{"type":"number","description":"Total customers count","example":1},"data":{"description":"Customers list","example":[{"type":"ADClient","id":"653bdcc428f23b00c71b60e6","attributes":{"guid":"609a41b0-9c25-43f5-b698-28726ec24203","name":"Some customer name"}}],"allOf":[{"$ref":"#/components/schemas/CustomersList"}]}},"required":["totalItems","data"]},"BadRequestErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","example":400},"message":{"type":"string","example":"Invalid parameters"},"error":{"type":"string","example":"Bad Request"}},"required":["statusCode","message","error"]},"ErrorUnauthorized":{"type":"object","properties":{"statusCode":{"type":"number","example":401},"message":{"type":"string","example":"Unauthorized"},"error":{"type":"string","example":"Unauthorized"}},"required":["statusCode","message","error"]},"CustomerAccountsCountResponseContent":{"type":"object","properties":{"_id":{"type":"string","description":"Customer id","example":"64f0bcebd1521e00859177e8"},"guid":{"type":"string","description":"Customer guid","example":"be36eb21-2afb-419e-b574-8005756e5cb6"},"name":{"type":"string","description":"Customer name","example":"Customer ABC"},"enduser":{"type":"number","description":"End-user accounts count","example":0},"admin":{"type":"number","description":"Administrator accounts count","example":0},"service":{"type":"number","description":"Service accounts count","example":0},"jit":{"type":"number","description":"Just-in-time accounts count","example":0}},"required":["_id","guid","name","enduser","admin","service","jit"]},"CustomerAccountsCountResponse":{"type":"object","properties":{"data":{"description":"Count data","example":{"_id":"64f0bcebd1521e00859177e8","guid":"be36eb21-2afb-419e-b574-8005756e5cb6","name":"Customer ABC","enduser":5,"admin":4,"service":0,"jit":1},"allOf":[{"$ref":"#/components/schemas/CustomerAccountsCountResponseContent"}]}},"required":["data"]},"NotFoundErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","example":404},"message":{"type":"string","example":"Resource not found"},"error":{"type":"string","example":"Not Found"}},"required":["statusCode","message","error"]},"ObjectId":{"type":"object","properties":{}},"AvailableRoles":{"type":"string","enum":["PRIMARY","SUPER","MANAGER","ENGINEER","HELPDESK"]},"TechnicianDto":{"type":"object","properties":{"_id":{"description":"Technician ID","example":"626bf73555af470011ea3923","allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"firstName":{"type":"string","description":"Technician name","example":"Clara"},"lastName":{"type":"string","description":"Technician last name","example":"Nitzsche"},"email":{"type":"string","format":"email","description":"Technician email","example":"clara_nitzsche@test.com"},"tenantId":{"description":"Tenant ID","example":"62f2aca82e7805001127e65e","allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"role":{"description":"Technician role","allOf":[{"$ref":"#/components/schemas/AvailableRoles"}]}},"required":["_id","firstName","lastName","email","tenantId","role"]},"StatusResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Status","example":"Authenticated"},"user":{"description":"Information of the logged in user","allOf":[{"$ref":"#/components/schemas/TechnicianDto"}]}},"required":["message","user"]},"RefreshTokenRequestDto":{"type":"object","properties":{"refreshToken":{"type":"string","description":"The refresh token to use for obtaining a new access token","example":"refresh_token_example"}},"required":["refreshToken"]},"RefreshTokenResponseDto":{"type":"object","properties":{"access_token":{"type":"string","description":"The new access token","example":"access_token_example"},"refresh_token":{"type":"string","description":"The new refresh token (if provided)","example":"refresh_token_example"},"token_type":{"type":"string","description":"The token type","example":"bearer"},"expires_in":{"type":"number","description":"The expiration time in seconds","example":3600},"scope":{"type":"string","description":"The scope of the token","example":"offline_access profile customer"}},"required":["access_token","refresh_token","token_type","expires_in","scope"]},"RevokeTokenResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates whether the token was successfully revoked","example":true}},"required":["success"]},"InstallTokenRequestDto":{"type":"object","properties":{"installToken":{"type":"string"}},"required":["installToken"]},"InstallTokenResponseInternal":{"type":"object","properties":{"installToken":{"type":"string","description":"The agent installation token","example":"2d9a44b03cbac3da6918f203c1ea65de"}},"required":["installToken"]},"InstallTokenResponse":{"type":"object","properties":{"data":{"description":"The agent installation token","example":{"installToken":"2d9a44b03cbac3da6918f203c1ea65de"},"allOf":[{"$ref":"#/components/schemas/InstallTokenResponseInternal"}]}},"required":["data"]},"TenantCompanyData":{"type":"object","properties":{"name":{"type":"string","description":"Company name"},"address":{"type":"string","description":"Company address"},"city":{"type":"string","description":"City"},"stateProvinceCode":{"type":"string","description":"State/Province code"},"zipCode":{"type":"string","description":"Zip code"},"countryCode":{"type":"string","description":"Country code"},"phoneNumber":{"type":"string","description":"Phone number"},"timeZone":{"type":"string","description":"Time zone"},"companyImage":{"type":"string","description":"Company image URL"}},"required":["name","address","city","stateProvinceCode","zipCode","countryCode","phoneNumber","timeZone"]},"GetTenantCompanyDataResponse":{"type":"object","properties":{"data":{"description":"Tenant company data","allOf":[{"$ref":"#/components/schemas/TenantCompanyData"}]}},"required":["data"]},"IdentityVerificationRequest":{"type":"object","properties":{"email":{"type":"string","description":"End-user's email to whom we'll trigger identity verification.","example":"placeHolder@domain.com"},"ticketId":{"type":"string","description":"PSA TicketID in which an identity verification note will be created.","example":"1"}},"required":["email","ticketId"]},"HTTPExcemptionError":{"type":"object","properties":{"statusCode":{"type":"number","readOnly":true},"message":{"type":"string","readOnly":true},"error":{"type":"string","readOnly":true}},"required":["statusCode","message","error"]},"EventRequestDto":{"type":"object","properties":{"customerId":{"type":"string","description":"Customer ID associated with the event","example":"60d21b4667d0d01f8d5d42b8"},"accountId":{"type":"string","description":"Account ID associated with the event","example":"60d21b4667d0d01f8d5d42c9"},"action":{"type":"string","description":"Action to be performed","example":"otp_copied"}},"required":["customerId","accountId","action"]},"GenericEventResponse":{"type":"object","properties":{"status":{"type":"number","description":"Status code of the response","example":202},"message":{"type":"string","description":"Response message","example":"Event accepted for processing"}},"required":["status","message"]},"ForbiddenErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","example":403},"message":{"type":"string","example":"Access forbidden"},"error":{"type":"string","example":"Forbidden"}},"required":["statusCode","message","error"]},"JitPolicyItem":{"type":"object","properties":{"_id":{"description":"JIT policy ID","allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"name":{"type":"string","description":"JIT policy name"},"description":{"type":"string","description":"JIT policy description"},"adminId":{"description":"Admin ID","allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"active":{"type":"boolean","description":"Whether the policy is active"},"privilegedGroups":{"description":"Privileged groups","type":"array","items":{"type":"string"}},"customSecurityGroups":{"description":"Custom security groups","type":"array","items":{"type":"string"}},"directoryType":{"type":"string","description":"Directory type"},"isLoginGroupRestricted":{"type":"boolean","description":"Whether login group is restricted"},"durations":{"description":"Durations","type":"array","items":{"type":"string"}},"createdAt":{"format":"date-time","type":"string","description":"Creation date"}},"required":["_id","name","adminId","active","privilegedGroups","directoryType","isLoginGroupRestricted","durations","createdAt"]},"JitAccountItem":{"type":"object","properties":{"customerId":{"type":"string","description":"Customer ID"},"customerName":{"type":"string","description":"Customer name"},"id":{"type":"string","description":"Account ID"},"displayName":{"type":"string","description":"Display Name"},"username":{"type":"string","description":"Username"},"userType":{"type":"string","description":"User type"},"accountType":{"type":"string","description":"Account type"},"enabled":{"type":"boolean","description":"Whether the JIT account is enabled"},"computerName":{"type":"string","description":"Computer name"},"expiration":{"format":"date-time","type":"string","description":"Expiration as ISO string"},"reason":{"type":"string","description":"Reason for JIT access"},"jitPolicy":{"description":"JIT Policy","allOf":[{"$ref":"#/components/schemas/JitPolicyItem"}]},"domainName":{"type":"string","description":"Domain name"},"mode":{"enum":["STANDARD","BURNER"],"type":"string","description":"JIT mode"},"isGccHigh":{"type":"boolean","description":"This variable determines whether the customer has GCC High enabled"}},"required":["customerId","customerName","id","displayName","username","userType","accountType","enabled","computerName","expiration","reason","jitPolicy","domainName"]},"GetJitAccountsResponse":{"type":"object","properties":{"data":{"description":"List of JIT accounts","type":"array","items":{"$ref":"#/components/schemas/JitAccountItem"}},"maxCount":{"type":"number","description":"Total count of JIT accounts"}},"required":["data","maxCount"]},"CheckJitAccountResponse":{"type":"object","properties":{"account":{"nullable":true,"description":"Existing JIT account for the given customer and directory type, or null if none exists","allOf":[{"$ref":"#/components/schemas/JitAccountItem"}]}},"required":["account"]},"GetJitAccountPasswordResponse":{"type":"object","properties":{"password":{"type":"string","description":"Password for the JIT account"},"updatedAt":{"type":"string","description":"Timestamp when the JIT account password was last updated"}},"required":["password","updatedAt"]},"OtpItem":{"type":"object","properties":{"code":{"type":"string","description":"OTP code","example":"123456"},"validUntil":{"type":"string","description":"Expiration timestamp","example":"2025-04-29T17:42:12-07:00"}},"required":["code","validUntil"]},"GetJitAccountOtpResponse":{"type":"object","properties":{"data":{"description":"Array of OTP codes with expiration timestamps","type":"array","items":{"$ref":"#/components/schemas/OtpItem"}}},"required":["data"]},"SaveJitAccountOtpSecretRequest":{"type":"object","properties":{"otp":{"type":"string","minLength":16,"pattern":"/^[A-Za-z2-7]+(={1,6})?$/","description":"The OTP secret to save for the JIT account, must be in base 32 and minimum 16 characters","example":"OJSXE53FOJZGK53XMVZHEZLXO5SXEZLXOI======"}},"required":["otp"]},"SaveJitAccountOtpSecretResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status of the operation","example":true},"message":{"type":"string","description":"Message about the operation result","example":"OTP saved successfully"}},"required":["success","message"]},"EnableJitAccountRequest":{"type":"object","properties":{"policyId":{"type":"string","description":"JIT Policy ID to apply","example":"507f1f77bcf86cd799439011"},"duration":{"type":"string","enum":["1h","4h","8h","1d","3d","7d","30d"],"description":"Duration for JIT account access","example":"1h"},"reason":{"type":"string","description":"Reason for enabling JIT account","example":"User requested access for system maintenance"}},"required":["policyId","duration","reason"]},"EnableJitAccountResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status of enabling JIT account","example":true},"message":{"type":"string","description":"Message describing the result","example":"JIT account enabled successfully"},"expirationDate":{"type":"string","description":"Expiration date of JIT access","example":"2025-05-06T03:21:43.000Z"}},"required":["success","message","expirationDate"]},"DisableJitAccountMetadata":{"type":"object","properties":{"application":{"type":"string","description":"Application initiating the request","example":"Technician App"},"device":{"type":"string","description":"Device used by the requester","example":"iPhone SE"},"ipAddress":{"type":"string","description":"IP address of the requester","example":"192.168.x.x"}},"required":["application"]},"DisableJitAccountRequest":{"type":"object","properties":{"metadata":{"description":"Metadata to use in events","example":{"application":"Technician App","device":"iPhone SE","ipAddress":"192.168.x.x"},"allOf":[{"$ref":"#/components/schemas/DisableJitAccountMetadata"}]}}},"DisableJitAccountResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status of the disable operation","example":true},"message":{"type":"string","description":"Message indicating the result of the disable operation","example":"JIT account disabled successfully"}},"required":["success","message"]},"DeleteJitAccountOtpSecretResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status of the operation","example":true},"message":{"type":"string","description":"Message about the operation result","example":"OTP secret deleted successfully"}},"required":["success","message"]},"DeleteJitAccountResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status of the operation","example":true},"message":{"type":"string","description":"Message about the operation result","example":"JIT account deleted successfully"}},"required":["success","message"]},"CreateJitAccountRequest":{"type":"object","properties":{"username":{"type":"string","pattern":"/^[^.].*/","description":"Username for the JIT account","example":"johndoe"},"userType":{"type":"string","description":"User type for the JIT account","example":"OFFICE","enum":["AD","OFFICE","LOCAL"]},"policyId":{"type":"string","description":"Policy ID to apply for the JIT account","example":"60a1e2c3d4e5f6a7b8c9d0e1"},"duration":{"type":"string","enum":["1h","4h","8h","1d","3d","7d","30d"],"description":"Duration for JIT account access","example":"1h"},"reason":{"type":"string","description":"Reason for creating the JIT account","example":"Administrative access needed for system maintenance"},"agentId":{"type":"string","description":"Agent Id when creating Local JIT account","example":"DVS0001"}},"required":["username","userType","policyId","duration","reason"]},"CreateJitAccountResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Result status of JIT account creation","example":"true"},"data":{"type":"object","description":"Created JIT account","properties":{"_id":{"type":"string","example":"60a1e2c3d4e5f6a7b8c9d0e1"},"qpUUID":{"type":"string","example":"abc123-def456-ghi789"},"active":{"type":"boolean","example":true},"adclientId":{"type":"string","example":"60a1e2c3d4e5f6a7b8c9d0e2"},"userType":{"type":"string","example":"office365"},"displayName":{"type":"string","example":"John Doe"},"userPrincipalName":{"type":"string","example":"johndoe@example.com"},"enabled":{"type":"boolean","example":true},"accountType":{"type":"string","example":"jit"},"features":{"type":"object","properties":{"jit":{"type":"object","properties":{"active":{"type":"boolean","example":true},"delegateId":{"type":"string","example":"60a1e2c3d4e5f6a7b8c9d0e4"},"notes":{"type":"string","example":"Administrative access needed for system maintenance"},"policyId":{"type":"string","example":"60a1e2c3d4e5f6a7b8c9d0e5"},"privilegedGroup":{"type":"string","example":"Global Admin"},"expirationDate":{"type":"string","example":"2023-06-01T00:00:00.000Z"}}}}},"tenantId":{"type":"string","example":"60a1e2c3d4e5f6a7b8c9d0e6"},"customerName":{"type":"string","example":"Acme Corporation"}}}},"required":["success","data"]},"GetJitPoliciesResponse":{"type":"object","properties":{"data":{"description":"List of JIT policies","type":"array","items":{"$ref":"#/components/schemas/JitPolicyItem"}},"maxCount":{"type":"number","description":"Total count of JIT policies"}},"required":["data","maxCount"]}}}}