{"openapi":"3.0.0","info":{"title":"GuardRails.io","version":"2.0.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"updatedAccount":{"type":"object","properties":{"idAccount":{"type":"string","example":1},"fkParentAccount":{"type":"string","example":null},"login":{"type":"string","example":"Jane"},"type":{"type":"string","example":"USER"},"provider":{"type":"string","example":"GITHUB"},"providerInternalId":{"type":"string","example":132342},"installationId":{"type":"string","example":31999455},"cliToken":{"type":"string","example":"1f20d30892a1eb5802598"},"personalAccessToken":{"type":"string","example":null},"patExpiredAt":{"type":"string","example":null},"filterReposByWriteAccess":{"type":"string","example":null},"configuration":{"type":"string","example":null},"providerMetadata":{"type":"object","example":null},"usersSynchronized":{"type":"boolean","example":false},"createdAt":{"type":"string","example":"2022-12-08T19:14:43.152+00:00"},"updatedAt":{"type":"string","example":"2023-02-20T08:56:32.427+00:00"},"deletedAt":{"type":"string","example":null}}},"configuration":{"type":"object","properties":{"bundles":{"oneOf":[{"type":"string","example":"auto"},{"type":"array","example":[{"javascript":["eslint","retirejs"]}],"items":{"type":"object","properties":{"lang":{"type":"array","items":{"type":"string","example":"eslint"}}}}}]},"ignore":{"type":"string","example":"path/to/ignored/file"},"notifications":{"type":"object","properties":{"slack":{"type":"object","properties":{"notify":{"type":"string"},"enabled":{"type":"boolean","example":true},"webhookUrl":{"type":"string"}}}}},"report":{"type":"object","properties":{"pullRequest":{"type":"object","properties":{"comment":{"type":"boolean"},"findings":{"type":"string"},"paranoid":{"type":"boolean"},"showPublicReposChecks":{"type":"boolean"}}}}},"integrations":{"type":"object","properties":{"scwConfig":{"type":"object","properties":{"showCourseUrl":{"type":"boolean"}}}}},"defaultShowArchivedRepos":{"type":"boolean","example":false}}},"findingConfiguration":{"type":"object","properties":{"requireApprovalOnUpdate":{"type":"boolean"}}},"plan":{"type":"object","properties":{"idPlan":{"type":"integer","example":1},"name":{"type":"string","example":"Free"},"code":{"type":"string","example":"FREE"},"queuePriority":{"type":"number"},"features":{"type":"array","items":{"type":"object","properties":{"feature":{"type":"string"},"value":{"type":"string"}}}},"description":{"type":"string","example":"For individuals and small teams that can get value from GuardRails and don’t have to pay for it."},"bullets":{"type":"array","items":{"type":"string","example":"Limited Language Support"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"price":{"type":"object","properties":{"monthlyPriceBase":{"type":"number"},"monthlyPricePerUnit":{"type":"number"},"yearlyPriceBase":{"type":"number"},"yearlyPricePerUnit":{"type":"number"},"minUnits":{"type":"number"}}}}},"subscription":{"type":"object","properties":{"cancelAtPeriodEnd":{"type":"boolean"},"extraRepositories":{"type":"number"},"freeActiveUsers":{"type":"number"},"hadFreeTrial":{"type":"boolean"},"idSubscription":{"type":"integer"},"interval":{"type":"string","enum":["MONTHLY","YEARLY"]},"isCheckoutCompleted":{"type":"boolean"},"periodStart":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z"},"periodEnd":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z"},"status":{"type":"string"},"stripeCustomerId":{"type":"string"},"stripeProductId":{"type":"string","nullable":true},"stripeSubscriptionId":{"type":"string"},"trialEnd":{"type":"string"},"plan":{"$ref":"#/components/schemas/plan"}}},"userSchema":{"type":"object","properties":{"idUser":{"type":"string","required":true},"role":{"type":"object","properties":{"idRole":{"type":"integer","required":true},"name":{"type":"string"},"description":{"type":"string"}}}}},"account":{"type":"object","properties":{"idAccount":{"type":"integer","required":true},"login":{"type":"string"},"type":{"type":"string","enum":["USER","ORGANIZATION"]},"provider":{"type":"string","enum":["GITHUB","GITLAB","BITBUCKET","BITBUCKET_DATA_CENTER"]},"providerInternalId":{"type":"string"},"installationId":{"type":"integer"},"cliToken":{"type":"string"},"filterReposByWriteAccess":{"type":"boolean"},"findingConfiguration":{"$ref":"#/components/schemas/findingConfiguration"},"usersSynchronized":{"type":"boolean"},"configuration":{"$ref":"#/components/schemas/configuration"},"avatar_url":{"type":"string"},"url":{"type":"string"},"hasAccessTo":{"type":"object","properties":{"read":{"type":"array","items":{"type":"string"}},"write":{"type":"array","items":{"type":"string"}}}},"user":{"$ref":"#/components/schemas/userSchema"},"gitMetadata":{"type":"object"},"childrenQty":{"type":"number"},"fkParentAccount":{"type":"integer","nullable":true},"idRootAccount":{"type":"integer"},"subscription":{"$ref":"#/components/schemas/subscription"},"providerMetadata":{"type":"object","nullable":true},"createdAt":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z"},"updatedAt":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z","nullable":true},"deletedAt":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z","nullable":true}}},"actionChangeLog":{"type":"object","properties":{"idActionChangeLog":{"type":"integer"},"type":{"type":"string","enum":["ACTION_CREATED","ACTION_UPDATED","ACTION_DELETED"]},"fromStatus":{"type":"string","enum":["WONT_FIX","FALSE_POSITIVE","MARK_AS_FIXED","MARK_AS_VULNERABILITY"]},"toStatus":{"type":"string","enum":["FALSE_POSITIVE","WONT_FIX","MARK_AS_FIXED","MARK_AS_VULNERABILITY"]},"createdAt":{"type":"date","example":"2020-02-25T05:28:36.134+00:00"},"user":{"$ref":"#/components/schemas/actionChangeLogUser"}}},"actionChangeLogUser":{"type":"object","properties":{"login":{"type":"string","example":"john-doe"}}},"normalizedAction":{"type":"object","properties":{"actionFromStatus":"string","actionToStatus":"string","findingStatus":"string","engineRule":{"type":"object","properties":{"idEngineRule":"number","title":"string","name":"string","docs":"string","engineName":"string","cvssSeverity":"string","cvssScore":"number","cvssVector":"string","severity":{"type":"object","properties":{"id":"number","name":"string"}}}}}},"action":{"type":"object","properties":{"idAction":{"type":"number","example":1},"action":{"type":"string","enum":["WONT_FIX","FALSE_POSITIVE","MARK_AS_FIXED","MARK_AS_VULNERABILITY"],"example":"WONT_FIX"},"path":{"type":"string","example":"readme.md"},"lineNumber":{"type":"number","example":1},"lineContent":{"type":"string","example":"warning"},"dependencyName":{"type":"string","example":"lodash"},"dependencyVersion":{"type":"string","example":3.2},"transitiveDependency":{"type":"string","example":"lodash"},"rule":{"type":"object","properties":{"idRule":{"type":"number","example":1},"name":{"type":"string","example":"rule"},"title":{"type":"string","example":"rule title"}}},"engineRule":{"type":"object","properties":{"idEngineRule":{"type":"number","example":1},"name":{"type":"string","example":"engine rule name"}}},"repository":{"type":"object","properties":{"idRepository":{"type":"number","example":1},"name":{"type":"string","example":"repository name"}}},"account":{"type":"object","properties":{"idAccount":{"type":"string","example":1},"login":{"type":"string","example":"Jane"}}},"status":{"type":"string","enum":["APPROVED","PENDING","REJECTED"],"example":"APPROVED"}}},"application":{"type":"object","properties":{"idApplication":{"type":"integer","example":1},"fkAccount":{"type":"integer","example":100},"name":{"type":"string","example":"Frontend"},"description":{"type":"string","example":"Frontend application"},"createdAt":{"type":"string","example":"2023-02-20T11:20:33.424Z"},"updatedAt":{"type":"string","example":"2023-02-20T11:20:33.424Z"}}},"createOrPatchApplication":{"type":"object","properties":{"name":{"type":"string","example":"Frontend"},"description":{"type":"string","example":"Frontend application"}}},"asset":{"type":"object","properties":{"idAsset":{"type":"integer","example":42},"name":{"type":"string","example":"My Asset Name"},"type":{"type":"string","example":"API"},"fkAccount":{"type":"integer","example":3,"description":"Id of the account that owns the asset"},"fkDefaultEnvironment":{"type":"integer","example":1},"fkAssetType":{"type":"integer","example":1},"environments":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"date","example":"2020-02-25T05:28:36.134+00:00"},"updatedAt":{"type":"date","example":"2020-02-25T05:28:36.134+00:00"},"deletedAt":{"type":"date","example":null},"lastScan":{"type":"object","schema":{"$ref":"#/components/schemas/lastScan"}}}},"assetType":{"type":"object","properties":{"idAssetType":{"type":"number","example":1},"name":{"type":"string","example":"API"},"createdAt":{"type":"string","format":"date-time","example":"2020-01-01"},"updatedAt":{"type":"string","format":"date-time","example":"2020-01-01"},"deletedAt":{"type":"string","format":"date-time","example":null}}},"branch":{"type":"object","properties":{"name":{"type":"string","example":"develop"},"commit":{"type":"object","properties":{"sha":{"type":"string","example":"c8a2d940efa6d1ef7afb4f6e154d74c2a3773999"},"url":{"type":"string","example":"https://api.github.com/repos/randomuser/reponame/commits/c8a2d940efa6d1ef7afb4f6e154d74c2a3773999"}}},"protected":{"type":"boolean","example":false},"lastScans":{"type":"array","items":{"type":"object","properties":{"totalVulnerabilities":{"type":"integer","example":4},"finishedAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"}}}}}},"branchDetail":{"type":"object","properties":{"name":{"type":"string","example":"main"},"protection_url":{"type":"string","example":"protection-url"},"protected":{"type":"boolean","example":false},"_link":{"type":"object","properties":{"self":{"type":"string","example":"self-url"},"html":{"type":"string","example":"html-url"}}},"commit":{"type":"object","properties":{"sha":{"type":"string","example":"10dd4986c16ff86"},"node_id":{"type":"string","example":"commit-node-id"},"html_url":{"type":"string","example":"commit-html-url"},"comments_url":{"type":"string","example":"commit-comments-url"},"committer":{"type":"object","properties":{"login":{"type":"string","example":"web-flow"},"id":{"type":"string","example":1},"node_id":{"type":"string","example":"MDQ6VXNlcjE"},"avatar_url":{"type":"string","example":"https://avatars.githubusercontent.com/u/19864447?v=4"},"gravatar_id":{"type":"string","example":"gravatar-id"},"url":{"type":"string","example":"https://api.github.com/users/web-flow"},"html_url":{"type":"string","example":"https://github.com/web-flow"},"followers_url":{"type":"string","example":"https://api.github.com/users/web-flow/followers"},"following_url":{"type":"string","example":"https://api.github.com/users/web-flow/following{/other_user}"},"gists_url":{"type":"string","example":"https://api.github.com/users/web-flow/gists{/gist_id}"},"starred_url":{"type":"string","example":"https://api.github.com/users/web-flow/starred{/owner}{/repo}"},"subscriptions_url":{"type":"string","example":"https://api.github.com/users/web-flow/subscriptions"},"organizations_url":{"type":"string","example":"https://api.github.com/users/web-flow/orgs"},"repos_url":{"type":"string","example":"https://api.github.com/users/web-flow/repos"},"events_url":{"type":"string","example":"https://api.github.com/users/web-flow/events{/privacy}"},"received_events_url":{"type":"string","example":"https://api.github.com/users/web-flow/received_events"},"type":{"type":"string","example":"User"},"site_admin":{"type":"string","example":false}}},"parents":{"type":"array","items":{"type":"object","properties":{"sha":{"type":"string","example":"sha-value"},"url":{"type":"string","example":"https://api.github.com/repos"},"html_url":{"type":"string","example":"https://github.com/jane"}}}},"author":{"type":"object","properties":{"login":{"type":"string","example":"Jane"},"id":{"type":"string","example":115444191},"node_id":{"type":"string","example":"U_kgDOBuGJ3w"},"avatar_url":{"type":"string","example":"https://avatars.githubusercontent.com/u/115444191?v=4"},"gravatar_id":{"type":"string","example":"gravatar_id"},"url":{"type":"string","example":"https://api.github.com/users/jane"},"html_url":{"type":"string","example":"https://github.com/jane"},"followers_url":{"type":"string","example":"https://api.github.com/users/jane/followers"},"following_url":{"type":"string","example":"https://api.github.com/users/jane/following{/other_user}"},"gists_url":{"type":"string","example":"https://api.github.com/users/jane/gists{/gist_id}"},"starred_url":{"type":"string","example":"https://api.github.com/users/jane/starred{/owner}{/repo}"},"subscriptions_url":{"type":"string","example":"https://api.github.com/users/jane/subscriptions"},"organizations_url":{"type":"string","example":"https://api.github.com/users/jane/orgs"},"repos_url":{"type":"string","example":"https://api.github.com/users/jane/repos"},"events_url":{"type":"string","example":"https://api.github.com/users/jane/events{/privacy}"},"received_events_url":{"type":"string","example":"https://api.github.com/users/jane/received_events,"},"type":{"type":"string","example":"User"},"site_admin":{"type":"string","example":false}}},"commit":{"type":"object","properties":{"author":{"type":"object","properties":{"name":{"type":"string","example":"Jane"},"email":{"type":"string","example":"jane@gmail.com"},"date":{"type":"string","format":"date-time","example":"2023-02-19T08:52:51Z"}}},"committer":{"type":"object","properties":{"name":{"type":"string","example":"Github"},"email":{"type":"string","example":"noreply@github.com"},"date":{"type":"string","format":"date-time","example":"2023-02-19T08:52:51Z"}}},"message":{"type":"string","example":"update test.js"},"tree":{"type":"object","properties":{"sha":{"type":"string","example":"sha"},"url":{"type":"string","example":"url"}}},"url":{"type":"string","example":"url"},"comment_count":{"type":"number","example":1},"verification":{"type":"object","properties":{"verified":{"type":"boolean","example":true},"reason":{"type":"string","example":"valid"},"signature":{"type":"string","example":"-----BEGIN PGP SIGNATURE-----"},"payload":{"type":"string","example":"tree 875024a5c"}}}}}}},"protection":{"type":"object","properties":{"enabled":{"type":"boolean","example":false},"required_status_checks":{"type":"object","properties":{"enforcement_level":{"type":"string","example":"off"},"contexts":{"type":"array","example":[]},"checks":{"type":"array","example":[]}}}}}}},"runtimeFinding":{"type":"object","properties":{"idFinding":{"type":"string","example":"b84f6cb0-26c4-49e8-81eb-4c2de96040ea"},"asset":{"type":"object","properties":{"name":{"type":"string","example":"Guardrails API"},"type":{"type":"string","example":"Web Application"}}},"environment":{"type":"object","properties":{"name":{"type":"string","example":"Staging"},"url":{"type":"string","example":"https://staging.guardrails.io"}}},"language":{"type":"string","example":"php"},"location":{"type":"object","properties":{"path":{"type":"string","example":"src/DataFixtures/ORM/LoadPurchasingPowerData.php"},"method":{"type":"string","example":"GET"}}},"status":{"type":"string","enum":["VULNERABILITY","MARK_AS_VULNERABILITY","FIXED","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE",null]},"path":{"type":"string","example":"src/DataFixtures/ORM/LoadPurchasingPowerData.php"},"method":{"type":"string","example":"GET"},"fkAsset":{"type":"integer","example":1},"fkEnvironment":{"type":"integer","example":1},"metadata":{"type":"object","properties":{"risk":{"type":"string","example":"high"},"requestBody":{"type":"string"},"responseBody":{"type":"string"},"responseHeader":{"type":"string"},"requestHeader":{"type":"string"}}},"type":{"type":"string","example":"dast"},"foundBy":{"type":"string","example":"aBadUser"},"createdAt":{"type":"string","format":"date-time","example":"2020-03-17T08:09:32.823+00:00"},"fixedAt":{"type":"string","nullable":true,"format":"date-time","example":"2020-03-19T08:09:32.823+00:00"},"rule":{"type":"object","properties":{"idRule":{"type":"integer","example":1},"name":{"type":"string","example":"GR0001"},"title":{"type":"string","example":"Vulnerable Library"},"docs":{"type":"string","nullable":true,"example":"hard-coded_secrets.html"}}},"severity":{"type":"object","properties":{"idSeverity":{"type":"integer","example":1},"name":{"type":"string","example":"5"}}},"scanId":{"type":"string","example":"16124010-5550-4b17-b292-42c533bbeede"},"engineRule":{"type":"object","properties":{"idEngineRule":{"type":"number","example":2},"title":{"type":"string","example":"Hard-coded Secrets"},"name":{"type":"string","example":"gr-custom-secrets"},"docs":{"type":"string","nullable":true,"example":null},"engineName":{"type":"string","example":"gr-secrets"},"cvssSeverity":{"type":"string","example":"medium"},"cvssScore":{"type":"number","example":6.8},"cvssVector":{"type":"string","example":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N"}}},"jiraIssue":{"type":"object","properties":{"link":{"type":"string","example":"https://weburl.com/browse/EXT-123"},"externalKey":{"type":"string","example":"EXT - 123"}}}}},"count":{"type":"object","properties":{"total":{"type":"integer","example":50},"open":{"type":"integer","example":10},"resolved":{"type":"integer","example":30},"fixed":{"type":"integer","example":20},"findings":{"type":"integer","example":10}}},"department":{"type":"object","properties":{"idDepartment":{"type":"number","example":1},"name":{"type":"string","example":"engineering"},"createdAt":{"type":"string","format":"date-time","example":"2022-05-05"},"updatedAt":{"type":"string","format":"date-time","example":null}}},"dependency":{"type":"object","properties":{"id":{"type":"string","example":"00003eb9-cd07-47da-976a"},"onpremise":{"type":"boolean","example":false},"account_name":{"type":"string","example":"guardrailsio"},"repo_name":{"type":"string","example":"node test"},"branch":{"type":"string","example":"master"},"provider_internal_id":{"type":"string","example":63639880},"id_purl":{"type":"string","example":"847f2e7f-4d00-401d-86e8"},"pkg_name":{"type":"string","example":"plugin-proposal"},"pkg_version":{"type":"string","example":"7.7.7"},"pkg_ecosystem":{"type":"string","example":"npm"},"created_at":{"type":"string","format":"date-time","example":"2022-05-05"},"updated_at":{"type":"string","format":"date-time","example":"2022-05-05"},"dep_filepath":{"type":"string","example":"package.json"},"license":{"type":"string","example":"MIT"},"purl":{"type":"string","example":"docs"},"has_vulnerability":{"type":"boolean","example":false}}},"engineConfig":{"type":"object","properties":{"specId":{"type":"string","example":"334546-34454"},"format":{"type":"string","example":"yaml"},"validation":{"type":"string","example":"yaml"},"filename":{"type":"string","example":"config-spec.yaml"},"engine":{"type":"object","properties":{"idEngine":{"type":"number","example":1},"name":{"type":"string","example":"php-semgrep"},"language":{"type":"string","example":"php"}}}}},"engines":{"type":"array","items":{"type":"object","properties":{"lang":{"type":"array","items":{"type":"object","properties":{"idEngine":{"type":"number","example":3},"fkAccount":{"type":"number","example":1},"name":{"type":"string","example":"eslint"},"language":{"type":"string","example":"javascript"},"allowFor":{"type":"string","example":"allow-for"},"isPrivate":{"type":"boolean","example":false},"version":{"type":"string","example":"v2.2.8"}}}}}}},"engineRules":{"type":"array","items":{"type":"object","properties":{"engineName":{"type":"string","example":"engine name"},"engineLanguage":{"type":"string","example":"engine language"},"rules":{"type":"array","items":{"type":"object","properties":{"idEngineRule":{"type":"number","example":1},"fkEngine":{"type":"number","example":1},"name":{"type":"string","example":"ApexBadCrypto"},"createdAt":{"type":"string","format":"date-time","example":"2022-12-08T19:09:56.580Z"},"updatedAt":{"type":"string","format":"date-time","example":"2022-12-08T19:10:04.333Z"},"deletedAt":{"type":"string","format":"date-time","example":null},"title":{"type":"string","example":"Hard-coded Cryptographic Key"},"docs":{"type":"string","example":null},"enable":{"type":"boolean","example":true},"order":{"type":"string","example":null},"cvssVector":{"type":"string","example":"CVSS"},"cvssScore":{"type":"number","example":6.8},"cvssSeverity":{"type":"string","example":"medium"},"rule":{"type":"object","properties":{"idRule":{"type":"number","example":1},"name":{"type":"string","example":"GR0009"},"docs":{"type":"string","example":"insecure_use_of_crypto.html"}}}}}}}}},"createEnvironment":{"type":"object","properties":{"fkAsset":{"type":"number","example":1},"fkTemplateType":{"type":"number","example":1},"name":{"type":"string","example":"development"},"url":{"type":"string","example":"https://example.com/api"},"autoScan":{"type":"boolean","example":false},"isDefault":{"type":"boolean","example":false}}},"environment":{"type":"object","properties":{"idEnvironment":{"type":"number","example":1},"fkAsset":{"type":"number","example":1},"fkTemplateType":{"type":"number","example":1},"name":{"type":"string","example":"development"},"url":{"type":"string","example":"https://example.com/api"},"template":{"type":"string","example":""},"templateFileName":{"type":"string","example":""},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","example":"2022-01-01"},"updatedAt":{"type":"string","example":"2022-01-01"},"deletedAt":{"type":"string","example":null}}},"finding":{"type":"object","properties":{"idFinding":{"type":"string","example":"b84f6cb0-26c4-49e8-81eb-4c2de96040ea"},"repository":{"type":"object","properties":{"idRepository":{"type":"integer","example":99},"name":{"type":"string","example":"MyRepository"},"path":{"type":"string","nullable":true,"example":null}}},"branch":{"type":"string","example":"master"},"language":{"type":"string","example":"php"},"type":{"type":"string","example":"sast"},"status":{"type":"string","enum":["VULNERABILITY","MARK_AS_VULNERABILITY","FIXED","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE",null]},"path":{"type":"string","example":"src/DataFixtures/ORM/LoadPurchasingPowerData.php"},"lineNumber":{"type":"integer","example":33},"score":{"type":"integer","nullable":true,"example":1},"metadata":{"type":"object","properties":{"severity":{"type":"string","example":"5"},"description":{"type":"string","example":"Filesystem function file_get_contents() detected with dynamic parameter"}}},"ticketLink":{"type":"string","nullable":true,"example":null},"introducedBy":{"type":"string","example":"aBadUser"},"introducedAt":{"type":"string","format":"date-time","example":"2020-03-17T08:09:32.823+00:00"},"fixedAt":{"type":"string","nullable":true,"format":"date-time","example":"2020-03-19T08:09:32.823+00:00"},"fixedBy":{"type":"string","nullable":true,"example":"aNiceUser"},"rule":{"type":"object","properties":{"idRule":{"type":"integer","example":1},"name":{"type":"string","example":"GR0001"},"title":{"type":"string","example":"Vulnerable Library"},"docs":{"type":"string","nullable":true,"example":"hard-coded_secrets.html"}}},"severity":{"type":"object","properties":{"idSeverity":{"type":"integer","example":1},"name":{"type":"string","example":"5"}}},"sha":{"type":"string","example":"d237d6cb5be3281c93cdad4511c5e47d34c0f7b1"},"scanId":{"type":"string","example":"16124010-5550-4b17-b292-42c533bbeede"},"engineRunId":{"type":"string","example":"8baecf14-9c56-4541-bbff-acd6cf2da7ec"},"duplicatedWith":{"type":"string","nullable":true,"example":"b84f6cb0-26c4-49e8-81eb-4c2de96040ea"},"cwe":{"type":"object","properties":{"idCwe":{"type":"integer","example":1},"title":{"type":"string","example":"hard-coded vulns"}}},"engineRule":{"type":"object","properties":{"idEngineRule":{"type":"number","example":2},"title":{"type":"string","example":"Hard-coded Secrets"},"name":{"type":"string","example":"gr-custom-secrets"},"docs":{"type":"string","nullable":true,"example":null},"engineName":{"type":"string","example":"gr-secrets"},"cvssSeverity":{"type":"string","example":"medium"},"cvssScore":{"type":"number","example":6.8},"cvssVector":{"type":"string","example":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N"}}},"jiraIssue":{"type":"object","properties":{"link":{"type":"string","example":"https://weburl.com/browse/EXT-123"},"externalKey":{"type":"string","example":"EXT - 123"}}}}},"monorepoConfigsBody":{"type":"object","properties":{"repositoryId":{"type":"integer","required":true},"configuration":{"type":"object","properties":{"monorepo":{"type":"string","required":true}}}},"required":["repositoryId","configuration"]},"reports":{"type":"object","properties":{"metadata":{"type":"object","properties":{"resource":"string","repo":"string","branch":"string"}},"data":{"type":"array","properties":{"idScan":"string","repo":"string","branch":"string","prNumber":"string","totalVulnerabilities":"number","finishedAt":"string","scanningAt":"string","updatedAt":"string","langs":"string[]"}}},"example":{"metadata":{"resource":"package.json","repo":"frontend","branch":"develop"},"data":[{}]}},"repoStats":{"type":"object","properties":{"idRepository":{"type":"object","example":{"2020-02-25":5},"properties":{"date":{"type":"integer","example":5}}}}},"repository":{"type":"object","properties":{"idRepository":{"type":"integer","example":42},"name":{"type":"string","example":"MySuperRepo"},"providerInternalId":{"type":"string","example":"1"},"provider":{"type":"string","example":"github"},"fkAccount":{"type":"integer","example":3,"description":"Id of the account that owns the repository"},"isPrivate":{"type":"boolean","example":false},"isEnabled":{"type":"boolean","example":true},"description":{"type":"string","example":"description of my super repo"},"default_branch":{"type":"string","example":"master"},"ssh_url":{"type":"string","example":"ssh://mysuperrepossh_url"},"homepage":{"type":"string","example":"http://mysuperepo.com"},"http_url":{"type":"string","example":"mysuperrepo_url"},"language":{"type":"string","example":"javascript"},"archived":{"type":"boolean","example":false},"badgeToken":{"type":"string","example":"b4dg3t0k3n"},"configuration":{"type":"object"},"createdAt":{"type":"date","example":"2020-02-25T05:28:36.134+00:00"},"updatedAt":{"type":"date","example":"2020-02-25T05:28:36.134+00:00"},"deletedAt":{"type":"date","example":null},"gitMetadata":{"type":"object"},"lastScan":{"type":"object","schema":{"$ref":"#/components/schemas/lastScan"}}}},"role":{"type":"object","properties":{"idRole":{"type":"integer","example":2},"name":{"type":"string","example":"developer"},"description":{"type":"string","example":"Developer"},"createdAt":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z"},"updatedAt":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z"}}},"teamRole":{"type":"object","properties":{"idTeamRole":{"type":"integer","example":1},"name":{"type":"string","example":"team_admin"},"description":{"type":"string","example":"Team Admin"},"createdAt":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z"},"updatedAt":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z"}}},"Rules":{"type":"array","example":[{"idRule":1,"name":"GR0001","title":"Insecure Use of SQL Queries","enable":true,"languages":{"c":true,"php":true}}],"items":{"type":"object","properties":{"idRule":"integer","name":"string","title":"string","enable":"boolean","languages":{"type":"object","properties":{"languageName":"boolean"}}}}},"samlProvider":{"type":"object","properties":{"idSamlProvider":{"type":"string","require":true},"idAccount":{"type":"integer"},"entryPoint":{"type":"string"},"cert":{"type":"string"},"contactEmail":{"type":"string","example":"asd@asd.net"},"enabled":{"type":"boolean"},"gitProvider":{"type":"string","enum":["GITHUB","GITLAB","BITBUCKET","BITBUCKET_DATA_CENTER"]}}},"samlUser":{"type":"object","properties":{"idSamlUser":{"type":"string","require":true},"idUser":{"type":"string"},"email":{"type":"string"}}},"githookMetadata":{"type":"object","properties":{"ref":{"type":"string","example":"master-UserName"},"commit":{"type":"object","properties":{"message":{"type":"string","example":"On-demand scan triggered via the Dashboard"}}},"sender":{"type":"object","properties":{"login":{"type":"string","example":"GreatUser"},"avatar_url":{"type":"string","example":"http://myavatarUrl.com"}}},"scanConfigs":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"package.json"},"index":{"type":"number","example":0},"excluded":{"type":"array","items":{"type":"string"}},"scanType":{"type":"number","example":3},"smartScan":{"type":"object","properties":{"type":{"type":"number","example":3},"others":{"type":"object","example":{}},"fileRemove":{"type":"object","example":{}},"fileRename":{"type":"object","example":{}},"onlyLineRemove":{"type":"object","example":{}}}},"config":{"type":"object","properties":{"ignore":{"type":"array","items":{"type":"string"},"example":[]},"report":{"type":"object","properties":{"pullRequest":{"type":"object","properties":{"comment":{"type":"boolean","example":true},"findings":{"type":"string","example":"onChangedLinesOnly"},"paranoid":{"type":"boolean","example":false}}}}},"bundles":{"type":"string","example":"auto"},"ruleOverride":{"type":"object","properties":{"GuardRailsRules":{"type":"object","properties":{"idGuardRailsRule":{"type":"object","properties":{"title":{"type":"string","example":"title"},"enabled":{"type":"boolean","example":true},"languages":{"type":"object","properties":{"language":{"type":"boolean","example":true}}}}}}},"engineRules":{"type":"object","properties":{"violation1":{"type":"object","properties":{"violation2":{"type":"object","properties":{"docs":{"type":"string","example":"docs"},"enable":{"type":"boolean","example":true}}}}}}}}},"notification":{"type":"object","properties":{"slack":{"type":"object","properties":{"notify":{"type":"string","example":"whenScanHasFindingsOnly"},"enabled":{"type":"boolean","example":false},"webhookUrl":{"type":"string","example":"https://example.com"}}}}},"excludeBundles":{"type":"string","example":"auto"}}}}}}}},"scan":{"type":"object","properties":{"idScan":{"type":"string","example":"scanId"},"type":{"type":"string","enum":["BRANCH","PULL","CLI"]},"branch":{"type":"string","example":"master"},"sha":{"type":"string","example":"094t523s"},"githookMetadata":{"type":"object","schema":{"$ref":"#/components/schemas/githookMetadata"}},"totalVulnerabilities":{"type":"integer","example":7},"newVulnerabilities":{"type":"integer","example":3},"queuedAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"scanningAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"finishedAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"updatedAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"prNumber":{"type":"number","example":42},"isParanoid":{"type":"boolean","example":true},"repository":{"type":"object","properties":{"idRepository":{"type":"number","example":1},"name":{"type":"string","example":"betting-app-client"},"fkAccount":{"type":"number","example":1},"defaultBranch":{"type":"string","example":"main"},"provider":{"type":"string","example":"GITHUB"},"providerInternalId":{"type":"number","example":555277543},"badgeToken":{"type":"string","example":"4f47d37bcf14f1abeedc3434b"},"isPrivate":{"type":"boolean","example":true},"isEnabled":{"type":"boolean","example":true},"configuration":{"type":"object","example":{}},"createdAt":{"type":"string","format":"date-time","example":"2022-12-08T19:14:44.064Z"},"updatedAt":{"type":"string","format":"date-time","example":"2023-01-04T17:43:24.196Z"},"fullName":{"type":"string","example":"betting-app-client"},"description":{"type":"string","example":null},"language":{"type":"string","example":"JavaScript"},"path":{"type":"string","example":null},"fkParentRepository":{"type":"string","example":null}}},"status":{"type":"object","properties":{"idScanStatus":{"type":"integer","example":99},"name":{"type":"string","enum":["queued","scanning","success","error"],"example":"queued"}}},"result":{"type":"object","properties":{"idScanResult":{"type":"integer","example":100},"name":{"type":"string","enum":["pass","fail"],"example":"pass"}}}}},"dastScan":{"type":"object","properties":{"idScan":{"type":"string","example":"scanId"},"type":{"type":"string","example":"runtime"},"githookMetadata":{"type":"object","schema":{"$ref":"#/components/schemas/githookMetadata"}},"totalVulnerabilities":{"type":"integer","example":7},"newVulnerabilities":{"type":"integer","example":3},"queuedAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"scanningAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"finishedAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"updatedAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"assetName":{"type":"string"},"environment":{"type":"object","properties":{"idEnvironment":{"type":"number","example":1},"name":{"type":"string","example":"staging"},"url":{"type":"string","example":"http://google.com"},"templateType":{"type":"string","example":"Simple"},"isDefault":{"type":"boolean","example":true}}},"status":{"type":"object","properties":{"idScanStatus":{"type":"integer","example":99},"name":{"type":"string","enum":["queued","scanning","success","error"],"example":"queued"}}},"result":{"type":"object","properties":{"idScanResult":{"type":"integer","example":100},"name":{"type":"string","enum":["pass","fail"],"example":"pass"}}}}},"lastScan":{"type":"object","properties":{"fkRepository":{"type":"number","example":99},"branch":{"type":"string","example":"master"},"sha":{"type":"string","example":123},"totalVulnerabilities":{"type":"number","example":666},"finishedAt":{"type":"string","format":"date-time","example":"2020-08-06 16:31:03"}}},"lastAssetScan":{"type":"object","properties":{"fkAsset":{"type":"number","example":99},"fkEnvironment":{"type":"number","example":1},"totalVulnerabilities":{"type":"number","example":666},"finishedAt":{"type":"string","format":"date-time","example":"2020-08-06 16:31:03"}}},"statsRules":{"type":"object","example":{"XSS Vulnerability on closeText option":{"javascript":5}},"properties":{"vulnerability":{"type":"object","properties":{"language":{"type":"integer"}}}}},"statsOrganizations":{"type":"object","example":{"guardrailsio":{"secret":5}},"properties":{"organization":{"type":"object","properties":{"type":{"type":"integer"}}}}},"statsMain":{"example":{"count":29,"perRepository":{"1000":29},"perType":{"secret":2,"sca":27},"perLanguage":{"general":2,"go":27},"perRuleAndLanguage":{"Vulnerable Libraries":{"go":27},"Hard-Coded Secrets":{"general":2}},"repoStats":{"total":"1","enabled":"1","scanned":"1"}},"type":"object","properties":{"count":"number","perRepository":{"type":"object","properties":{"repositoryId":"number"}},"perType":{"type":"object","properties":{"typeName":"number"}},"perLanguage":{"type":"object","properties":{"language":"number"}},"perRuleAndLanguage":{"type":"object","properties":{"ruleName":{"type":"object","properties":{"language":"number"}}}},"repoStats":{"type":"object","properties":{"count":"string","enabled":"string","scanned":"string"}}}},"statsTime":{"type":"object","properties":{"date":{"type":"object","properties":{"opened":{"type":"integer"},"fixed":{"type":"integer"}}}},"example":{"2020-02-25":{"opened":50,"fixed":25},"2020-02-26":{"opened":30,"fixed":25}}},"statsOpen":{"type":"array","example":[{"idFinding":"24345-sdfq3-fdsfr4-123ed","idRepository":50,"fixedAt":"2020-09-09","introducedAt":"2020-01-23"}],"items":{"stat":{"type":"object","properties":{"idFinding":{"type":"string","example":"24345-sdfq3-fdsfr4-123ed"},"idRepository":{"type":"integer","example":99},"introducedAt":{"type":"string","example":"2020-01-23"},"fixedAt":{"type":"string","example":"2020-09-09"}}}}},"statsAverage":{"type":"object","example":{"avg":50,"perc":75},"properties":{"avg":{"type":"float32","example":55.1},"perc":{"type":"integer","example":75}}},"statsLanguages":{"type":"object","properties":{"language":"number"},"example":{"javascript":42,"php":33,"golang":4,"others":3}},"teamUserData":{"type":"object","properties":{"userId":"string","teamRoleId":"number"},"example":{"userId":"e2706cb7-c980-4623-a669-ee5ad95","teamRoleId":123}},"team":{"type":"object","properties":{"idTeam":{"type":"integer","example":1},"fkAccount":{"type":"integer","example":100},"name":{"type":"string","example":"Frontend"},"description":{"type":"string","example":"Frontend team in charge of web apps"},"fkDepartment":{"type":"integer","example":1},"createdAt":{"type":"string","format":"date-time","example":"2022-02-18T07:22:58.165Z"},"updatedAt":{"type":"string","format":"date-time","example":"2022-02-18T07:22:58.165Z"},"usersCount":{"type":"string","example":1},"applicationsCount":{"type":"string","example":1},"repositoriesCount":{"type":"string","example":1},"write":{"type":"boolean","example":false}}},"createdOrUpdatedTeam":{"type":"object","properties":{"idTeam":{"type":"integer","example":1},"fkAccount":{"type":"integer","example":100},"name":{"type":"string","example":"Frontend"},"description":{"type":"string","example":"Frontend team in charge of web apps"},"fkDepartment":{"type":"integer","example":1},"createdAt":{"type":"string","format":"date-time","example":"2022-02-18T07:22:58.165Z"},"updatedAt":{"type":"string","format":"date-time","example":"2022-02-18T07:22:58.165Z"}}},"createOrPatchTeam":{"type":"object","properties":{"name":{"type":"string","example":"Frontend"},"description":{"type":"string","example":"Frontend team in charge of web apps"},"fkDepartment":{"type":"integer","example":1}}},"GitProviderTeam":{"type":"object","properties":{"id":{"type":"object","properties":{"name":{"type":"string","example":"Frontend"},"id":{"type":"integer","example":1},"memberCount":{"type":"integer","example":1},"repositoryCount":{"type":"integer","example":1},"slug":{"type":"string","example":"frontend"},"htmlUrl":{"type":"string","example":"html url"},"description":{"type":"string","example":"frontend team"},"children":{"type":"array","items":{"$ref":"#/components/schemas/GitProviderTeam"}}}}}},"createTemplateType":{"type":"object","properties":{"name":{"type":"string","example":"simple"}}},"templateType":{"type":"object","properties":{"idTemplateType":{"type":"number","example":1},"name":{"type":"string","example":"Simple"},"createdAt":{"type":"string","example":"2022-01-01"},"updatedAt":{"type":"string","example":"2022-01-01"},"deletedAt":{"type":"string","example":null}}},"transaction":{"type":"object","properties":{"idTransaction":{"type":"string","example":"6b64827c-f430"},"fkMonorepoConfig":{"type":"string","example":"87efff7e-6005"},"commitSHA":{"type":"string","example":"6fd2fbf1a5617"},"status":{"type":"string","example":"SUCCESS"},"createdAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"updatedAt":{"type":"string","format":"date-time","example":"2020-02-25T05:28:36.134+00:00"},"fkRepository":{"type":"number","example":0}}},"user":{"type":"object","properties":{"idUser":"uuid","login":"string","provider":"string","name":"string","email":"string","avatarUrl":"string","lastLoginAt":{"type":"string","format":"date-time"},"providerInternalId":"string","providerMetadata":{"type":"string","nullable":true},"role":{"type":"object","properties":{"idRole":"string","name":"string","description":"string"}}},"example":{"idUser":"e2706cb7-ee5ad95f28a7","login":"devX","provider":"github","name":"Dev X","email":"devx@guardrails.io","avatarUrl":"https://avatars.githubusercontent.com/u/1?v=4","lastLoginAt":"2023-01-17T08:11:15.375Z","providerInternalId":"100000000","providerMetadata":null,"roleOverwrittenAt":null,"role":{"idRole":5,"name":"admin","description":"Admin"}}},"UserEvent":{"type":"object","properties":{"idUserEvent":{"type":"integer","example":1},"fkAccount":{"type":"integer","example":1},"userRef":{"type":"string","example":"john"},"type":{"type":"string","example":"PR"},"createdAt":{"type":"string","format":"date-time","example":"2017-07-21T17:32:28Z"},"avatar":{"type":"string","example":"https://avatars.githubusercontent.com/u/1?v=0"}}}}},"paths":{"/v2/accounts":{"get":{"tags":["Accounts"],"summary":"get the list of the user accounts","description":"Get the list of the user accounts","produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Returns the list of the user accounts","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"array","items":{"$ref":"#/components/schemas/account"}}}}}}}}},"patch":{"tags":["Accounts"],"summary":"update an account","description":"Patch an account","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filterReposByWriteAccess":{"type":"boolean","example":false},"findingConfiguration":{"$ref":"#/components/schemas/findingConfiguration"}}}}}},"responses":{"200":{"description":"Returns the updated account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatedAccount"}}}}}},"delete":{"tags":["Accounts"],"summary":"delete a user account for a given accountId","description":"Delete a user account for a given accountId","content":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","required":true,"example":1}],"responses":{"204":{"description":"Returns an empty response body with status code 204"}}}},"/v2/accounts/configuration":{"patch":{"tags":["Accounts"],"summary":"update an account configuration","description":"Patch an account configuration","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/configuration"}}}},"responses":{"200":{"description":"Returns an empty body with status code 200"},"400":{"description":"Some fields didn't pass validation"}}}},"/v2/accounts/global-configuration":{"patch":{"tags":["Accounts"],"summary":"update an global configuration","description":"Patch an global configuration","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/configuration"}}}},"responses":{"200":{"description":"Returns an empty body with status code 200"},"400":{"description":"Some fields didn't pass validation"}}}},"/v2/accounts/personal-access-token":{"patch":{"tags":["Accounts"],"summary":"update an account personal access token","description":"Patch an account personal access token","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","example":"Personal Access Token"},"expiredAt":{"type":"string","format":"date-time"}}}}}},"responses":{"204":{"description":"Returns an empty body with status code 204"}}}},"/v2/action-changelogs":{"get":{"tags":["ActionChangeLogs"],"summary":"get the list of action change logs","description":"Get the list of action change logs","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get action change logs","in":"query","type":"integer","example":9,"required":true},{"name":"actionId","in":"query","type":"integer","example":42,"required":true,"description":"id of the action to get the action change logs"}],"responses":{"200":{"description":"Returns the list of action change logs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/actionChangeLog"}}}}},"404":{"description":"Action not found."}}}},"/v2/actions":{"get":{"tags":["Actions"],"summary":"get the list of actions for a given repositoryId","description":"Get the list of actions for a given repositoryId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the actions","type":"integer"},{"name":"repositoryId","in":"query","description":"the repositoryId to get the actions","type":"integer","required":true}],"responses":{"200":{"description":"Response will contain the list of actions for a given repositoryId","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/action"}}}}},"404":{"description":"Repository not found."}}}},"/v2/actions/count":{"get":{"tags":["Actions"],"summary":"get the total count for actions","description":"Get the total count for actions","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the total count","type":"integer"},{"name":"status","in":"query","description":"the action status to get the total count","type":"string","required":true,"enum":["PENDING","APPROVED","REJECTED"]}],"responses":{"200":{"description":"Response will contain the total count for a specific status","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"array","items":{"type":"object","properties":{"total":{"type":"integer"},"type":{"type":"string"}}}},"total":{"type":"string","example":"0"}}}}}}}}},"/v2/actions/groupedByRules":{"get":{"tags":["Actions"],"summary":"get all the actions grouped by rules","description":"Get all the actions grouped by rules","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"type":"integer"},{"name":"actionStatus","in":"query","type":"integer","required":true,"example":"APPROVED"},{"name":"actionChangeLogType","in":"query","type":"string","example":"ACTION_CREATED","required":true},{"name":"fromStatus","in":"query","type":"string","example":"MARK_AS_VULNERABILITY"},{"name":"toStatus","in":"query","type":"string","example":"WONT_FIX"}],"responses":{"200":{"description":"Response will contain the actions grouped by rules","content":{"application/json":{"schema":{"type":"array","example":[]}}}}}}},"/v2/actions/{ruleId}":{"get":{"tags":["Actions"],"summary":"get all the actions grouped by a given ruleId","description":"Get all the actions grouped by a given ruleId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"ruleId","in":"path","required":true,"type":"integer"},{"name":"accountId","in":"query","required":true,"description":"the accountId to get the actions grouped by rules","type":"integer"},{"name":"actionStatus","in":"query","description":"the actionStatus to get the actions grouped by rules","type":"integer","required":true,"example":"APPROVED"},{"name":"actionChangeLogType","in":"query","description":"the actionChangeLogType to get the actions grouped by rules","type":"string","example":"ACTION_CREATED","required":true},{"name":"fromStatus","in":"query","type":"string","enum":["WONT_FIX","FALSE_POSITIVE","MARK_AS_FIXED","MARK_AS_VULNERABILITY"]},{"name":"toStatus","in":"query","type":"string","enum":["FALSE_POSITIVE","WONT_FIX","MARK_AS_FIXED","MARK_AS_VULNERABILITY"]},{"name":"limit","in":"query","type":"number","example":2},{"name":"offset","in":"query","type":"number","example":2}],"responses":{"200":{"description":"Response will contain actions by a given ruleId","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"metadata":{"type":"object","example":{}},"actionFromStatus":{"type":"string","example":"Pending"},"actionToStatus":{"type":"string","example":"Approved"},"findingStatus":{"type":"string","example":"Open"},"engineRule":{"type":"object","properties":{"idEngineRule":{"type":"number","example":1},"name":{"type":"string","example":"name"},"title":{"type":"string","example":"engineTitle"},"docs":{"type":"string","example":"engineDocs"},"engineName":{"type":"string","example":"engineName"},"cvssSeverity":{"type":"string","example":"cvssSeverity"},"cvssScore":{"type":"number","example":6},"cvssVector":{"type":"string","example":"cvssVector"},"severity":{"type":"object","properties":{"id":{"type":"number","example":1},"name":{"type":"string","example":"severityName"}}}}}}}}}}},"400":{"description":"Invalid parameter limit or Invalid parameter offset"}}}},"/v2/actions/{actionId}":{"delete":{"tags":["Actions"],"summary":"delete an action by a given actionId","description":"delete an action by a given actionId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the actions","type":"integer"},{"name":"actionId","in":"path","description":"the actionId to delete","type":"integer","required":true}],"responses":{"204":{"description":"Returns empty response body with status 204"},"404":{"description":"Action with this actionId not found."}}},"patch":{"tags":["Actions"],"summary":"update pending action by a given actionId","description":"Patch pending action by a given actionId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to update the action","type":"integer"},{"name":"actionId","in":"path","required":true,"description":"the accountId to update the action","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"],"example":"APPROVED"}}}}}},"responses":{"200":{"description":"Returns the updated action","content":{"application/json":{"schema":{"type":"object","properties":{"idAction":{"type":"number","example":1},"fkAccount":{"type":"number","example":1},"action":{"type":"string","example":"false_positive"},"status":{"type":"string","example":"APPROVED"}}}}}},"400":{"description":"There was no actions to update or Action status must be APPROVED or REJECTED."}}}},"/v2/actions/bulk":{"patch":{"tags":["Actions"],"summary":"update the actions in bulk","description":"Patch the actions in bulk","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the actions","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"object","properties":{"status":{"type":"string","enum":["APPROVED","PENDING","REJECTED"]},"actionIds":{"type":"array","items":{"type":"number"}}}}}}}}},"responses":{"200":{"description":"Returns updated actions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"idAction":{"type":"integer","example":9},"action":{"type":"string","example":""},"status":{"type":"string","example":"PENDING"},"fkAccount":{"type":"integer","example":1}}}}}}},"400":{"description":"There was no actions to update or Action status must be APPROVED or REJECTED."}}}},"/v2/actions/bulkByRules":{"patch":{"tags":["Actions"],"summary":"update the actions in bulkByRules","description":"Patch the actions in bulkByRules","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the actions","type":"integer"},{"name":"actionStatus","in":"query","required":true,"type":"string","enum":["PENDING","APPROVED","REJECTED"]},{"name":"actionChangeLogType","in":"query","required":true,"type":"string","enum":["ACTION_CREATED","ACTION_UPDATED","ACTION_DELETED","ACTION_REQUESTED","ACTION_APPROVED","ACTION_REJECTED"]},{"name":"fromStatus","in":"query","required":false,"type":"string"},{"name":"toStatus","in":"query","required":false,"type":"string"},{"name":"language","in":"query","required":false,"type":"string"},{"name":"assetIds","in":"query","required":false,"type":"string"},{"name":"severityIds","in":"query","required":false,"type":"string"},{"name":"engineRuleIds","in":"query","required":false,"type":"string"},{"name":"environments","in":"query","required":false,"type":"string"},{"name":"requestedBy","in":"query","required":false,"type":"string"},{"name":"path","in":"query","required":false,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"status":{"required":true,"type":"string","enum":["APPROVED","REJECTED"],"example":"APPROVED"},"ruleIds":{"type":"array","items":{"type":"number"}},"excludedIds":{"type":"array","items":{"type":"number"}}}}}}},"responses":{"200":{"description":"Returns the number of total updated findings","content":{"application/json":{"schema":{"type":"object","properties":{"totalUpdatedFindings":{"type":"number","example":0}}}}}},"400":{"description":"There was no actions to update or Action status must be APPROVED or REJECTED."}}}},"/v2/applications":{"get":{"tags":["Applications"],"summary":"get the paginated list of applications","description":"Get the paginated list of applications and total count for an account","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the applications from","type":"integer"},{"name":"teamId","in":"query","description":"the teamId to get the applications from","type":"integer"},{"name":"search","in":"query","required":false,"description":"used to search applications by their name","type":"string"},{"name":"limit","in":"query","type":"integer"},{"name":"offset","in":"query","type":"integer"}],"responses":{"200":{"description":"Response will contain the list of applications for the current page and the total count","content":{"application/json":{"schema":{"type":"object","properties":{"applications":{"type":"array","items":{"$ref":"#/components/schemas/application"}},"totalCount":{"type":"number","example":1}}}}}}}},"post":{"tags":["Applications"],"summary":"create an application","description":"Create an application based on the application sent in the request's body","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to create an application","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"application":{"$ref":"#/components/schemas/createOrPatchApplication"}}}}}},"responses":{"200":{"description":"Response will contain the created application","content":{"application/json":{"schema":{"type":"object","properties":{"application":{"$ref":"#/components/schemas/application"}}}}}}}}},"/v2/applications/filters":{"get":{"tags":["Applications"],"summary":"get all the application filters","description":"Get all the application filters","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the filters from","type":"integer"},{"name":"teamId","in":"query","required":false,"description":"the teamId to get the filters from","type":"integer"},{"name":"search","in":"query","required":false,"description":"used to filter out filters by the applications name","type":"string"},{"name":"department","in":"query","required":false,"description":"the department to filter out filters by","type":"string"}],"responses":{"200":{"description":"Response will contain the filters for the entire list of applications in the account","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Frontend"},"value":{"type":"string","example":"Frontend"}}}}}}}}}}}},"/v2/applications/{applicationId}":{"get":{"tags":["Applications"],"summary":"get the application by a given applicationId","description":"Get the application for an account by a given applicationId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the application","type":"integer"},{"name":"applicationId","in":"path","required":true,"description":"the applicationId to get the application","type":"integer"}],"responses":{"200":{"description":"Response will contain the application by a given applicationId","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/application"}}}}}}},"/v2/assets":{"get":{"summary":"get the paginated list of assets","description":"Get the paginated list of assets, totalCount and allows to filter them and order them by column","tags":["Assets"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the assets from","example":123,"in":"query","required":true,"type":"number"},{"name":"search","description":"search by name","example":"GR","in":"query","type":"string"},{"name":"environments","description":"filter by environments","example":"dev,prod","in":"query","type":"string"},{"name":"typeIds","description":"filter by type ids","example":"1,2","in":"query","type":"string"},{"name":"limit","description":"Amount of assets to get per page","in":"query","required":false,"type":"integer"},{"name":"offset","description":"Initial position of the assets list to get assets paginated from","in":"query","required":false,"type":"integer"},{"name":"orderBy","description":"sorting parameter with format column, direction (updatedAt, desc)","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"Successful operation. Returns an array of assets","content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/asset"}},"totalCount":{"type":"integer","example":1}}}}}}}},"post":{"summary":"create a new asset","tags":["Assets"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to create an asset","example":123,"in":"query","required":true,"type":"number"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"name":{"type":"string","example":"GR API"},"fkAssetType":{"type":"number","example":1}}}}}}}},"responses":{"200":{"description":"Successful operation. Returns a new created asset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/asset"}}}}}}},"/v2/assets/filters":{"get":{"summary":"get list filters applicable for assets","description":"Get all the filters applicable for all assets.","tags":["Assets","Filters"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns an object including the array of filters applicable to assets","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Development"},"value":{"type":"string","example":"Development"}}}},"type":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Web Application"},"value":{"type":"number","example":1}}}}}}}}}}}},"/v2/assets/{assetId}":{"get":{"summary":"get the asset by asset id","description":"Get the asset details by id","tags":["Assets"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the assets from","example":1,"in":"query","required":true,"type":"integer"},{"name":"assetId","description":"asset id","example":1,"in":"path","type":"number","required":true}],"responses":{"200":{"description":"Successful operation. Returns asset details","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/asset"}}}}}}}},"patch":{"summary":"update an asset with name, defaultEnvironment and assetType","tags":["Assets"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to patch the assets","example":1,"in":"query","required":true,"type":"number"},{"name":"assetId","description":"the assetId to patch","in":"path","required":true,"type":"number"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"object","properties":{"name":{"type":"string","example":"GR API"},"fkAssetType":{"type":"number","example":1},"fkDefaultEnvironment":{"type":"number","example":1}}}}}}}},"responses":{"200":{"description":"Successful operation. Returns an updated asset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/asset"}}}}}},"delete":{"tags":["Assets"],"summary":"delete an asset by a given assetId","description":"delete an asset by a given assetId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"type":"integer"},{"name":"assetId","in":"path","description":"the assetId to delete an asset","type":"integer","required":true}],"responses":{"204":{"description":"Returns empty response body with status 204"},"404":{"description":"asset with this assetId not found."}}}},"/v2/asset-types":{"get":{"summary":"get the list of asset types","tags":["AssetTypes"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the asset types from","example":1,"in":"query","required":true,"type":"number"}],"responses":{"200":{"description":"Successful operation. Returns an array of asset types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/assetType"}}}}}}}},"/v2/auth":{"post":{"tags":["Authentication"],"summary":"get JWT token by using user's API Key from our dashboard","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","example":"api-key"}}}}}},"responses":{"200":{"description":"response will contain a JWT token that is valid for 1 hour","content":{"application/json":{"schema":{"type":"object","properties":{"jwtToken":{"type":"string","example":"Personal Access Token"},"expiresAt":{"type":"number","example":167388049617}}}}}},"404":{"description":"No user found with the given api key."}}}},"/v2/badges/{repositoryId}":{"get":{"tags":["Badges"],"summary":"get the list of badges for a given repositoryId","description":"Get the list of badges for a given repositoryId","produces":["application/json"],"parameters":[{"name":"repositoryId","in":"path","type":"integer","example":1,"required":true},{"name":"token","in":"query","type":"string","example":"Personal Access Token"}],"responses":{"302":{"description":"redirect url with status 302"}}}},"/v2/billing/payment-method":{"get":{"tags":["Billing"],"summary":"get the list of payment methods","description":"Get the list of payment methods","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"responses":{"200":{"description":"ok with status 200","content":{"application/json":{"schema":{"type":"object","properties":{"brand":"string","last4":"string","expMonth":"number","expYear":"number"},"example":{"brand":"Stripe","last4":"","expMonth":4,"expYear":2023}}}}},"404":{"description":"Customer has no payment method attached or Account has no Customer, Subscription or Payment method associated."}}},"post":{"tags":["Billing"],"summary":"save payment method","description":"Create payment method","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"paymentMethodId":{"type":"string","example":"payment-method-id"}}}}}},"responses":{"200":{"description":"ok with status 200","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"boolean","example":true}}}}}}}}},"/v2/billing/portal":{"get":{"tags":["Billing"],"summary":"redirect to billing portal","description":"Redirect to billing portal","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"responses":{"302":{"description":"redirect to a given url"},"400":{"description":"Account has no active Subscription associated."}}}},"/v2/billing/check-coupon":{"post":{"tags":["Billing"],"summary":"check coupon","description":"Check coupon","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"planId":{"type":"number"},"interval":{"type":"string"}}}}}},"responses":{"200":{"description":"Returns coupon containing promoCode, name, percentOff","content":{"application/json":{"schema":{"type":"object","properties":{"promoCode":{"type":"string","example":"up_sale"},"name":{"type":"string","example":"coupon name"},"percentageOff":{"type":"number","example":10}}}}}},"404":{"description":"No Coupon has been found for the entered promotion code. or The Plan to apply this promotion code has not been found. or No applicable Coupon has been found for the selected plan."}}}},"/v2/billing/customer-info":{"get":{"tags":["Billing"],"summary":"get billing customer info","description":"Get billing customer info","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"responses":{"200":{"description":"ok with status 200","content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"Doe"},"email":{"type":"string","example":"john@gmail.com"}}}}}}}}},"/v2/branches":{"get":{"summary":"get the list of branches","description":"Get the list of branches","tags":["Branches"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":1,"required":true,"description":"The accountId to find branches"},{"name":"repositoryId","in":"query","type":"integer","example":42,"required":true,"description":"The id of the repository containing the desired branches"},{"name":"limit","in":"query","type":"integer","required":false,"description":"Amount of branches to get per page"},{"name":"offset","in":"query","type":"integer","required":false,"description":"Initial position of the branches list to get branches paginated from"},{"name":"total","in":"query","type":"integer","required":false,"description":"Total amount of branches to avoid getting this value from the git providers (specially for Gitlab, because they not always return it)"},{"name":"excludeChildren","in":"query","type":"boolean","required":false}],"responses":{"200":{"description":"Successful operation. Returns an array containing all the branches of a given repository and the totalCount of them","content":{"application/json":{"schema":{"type":"object","properties":{"branches":{"type":"array","items":{"$ref":"#/components/schemas/branch"}},"totalCount":{"type":"number","example":1,"nullable":true},"hasNextPage":{"type":"boolean","example":true}}}}}},"404":{"description":"Resources not Found. The Branches could not be found with the given repoId"}}}},"/v2/branches/{branch}":{"get":{"summary":"get the list of branches by a given branch","description":"Get the list of branches by a given branch","tags":["Branches"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":1,"required":true,"description":"The accountId to find branches"},{"name":"repositoryId","in":"query","type":"integer","example":42,"required":true,"description":"The id of the repository containing the desired branches"},{"name":"branch","in":"path","type":"string","example":"master","required":true,"description":"The name of the desired branch"}],"responses":{"200":{"description":"Successful operation. Returns an object containing the branch","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/branchDetail"}}}},"404":{"description":"Resource not Found. The Branch could not be found with the given repoId and branch"}}}},"/v2/cli/trigger-scan":{"post":{"tags":["CLI"],"summary":"trigger scan for cli","description":"Trigger scan for cli","produces":["application/json"],"parameters":[{"name":"clitoken","in":"body","type":"string","required":true},{"name":"repository","in":"body","type":"string","required":true},{"name":"sha","in":"body","type":"string","required":true},{"name":"branch","in":"body","type":"string","required":true}],"responses":{"200":{"description":"Returns result with idScan and dashboardUrl","content":{"application/json":{"schema":{"type":"object","properties":{"idScan":{"type":"string"},"dashboardUrl":{"type":"string"}}}}}},"404":{"description":"Repository not found"}}}},"/v2/cli/trigger-zip-scan":{"post":{"tags":["CLI"],"summary":"trigger zip scan for cli","description":"Trigger zip scan for cli","produces":["application/json"],"parameters":[{"name":"clitoken","in":"body","type":"string","required":true},{"name":"repository","in":"body","type":"string","required":true},{"name":"sha","in":"body","type":"string","required":true},{"name":"branch","in":"body","type":"string","required":true},{"name":"fileName","in":"body","type":"string","required":true}],"responses":{"200":{"description":"Returns result with idScan and dashboardUrl","content":{"application/json":{"schema":{"type":"object","properties":{"idScan":{"type":"string"},"dashboardUrl":{"type":"string"}}}}}},"404":{"description":"Repository not found"}}}},"/v2/cli/trigger-zip-scan-upload-url":{"post":{"tags":["CLI"],"summary":"trigger zip scan upload url for cli","description":"Trigger zip scan upload url for cli","produces":["application/json"],"parameters":[{"name":"clitoken","in":"body","type":"string","required":true},{"name":"file","in":"body","type":"string","required":true}],"responses":{"200":{"description":"Returns signedUrl","content":{"application/json":{"schema":{"type":"object","properties":{"signedUrl":{"type":"string"}}}}}},"404":{"description":"Account not found"}}}},"/v2/cli/scan":{"get":{"tags":["CLI"],"summary":"get scan results by clitoken and id","description":"Get scan results by clitoken and id","produces":["application/json"],"parameters":[{"name":"clitoken","in":"header","type":"string","required":true},{"name":"idscan","in":"header","type":"string","required":true}],"responses":{"200":{"description":"Returns scan results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/scan"}}}},"404":{"description":"Scan not found"}}}},"/v2/cwe":{"get":{"summary":"get the list of cwe","tags":["CWE"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Successful operation. Returns an array of cwe","content":{"application/json":{"schema":{"type":"object","properties":{"cwe":{"type":"array","items":{"type":"object","properties":{"idCwe":"number","title":"string","createdAt":"string","updatedAt":"string"}}},"totalCount":{"type":"integer","example":1}}}}}}}}},"/v2/dast/findings":{"get":{"summary":"get the list of findings including total count and grouped by rule, language, count","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"},{"name":"assetIds","description":"used to filter by assetIds (1,2)","in":"query","required":false,"type":"string"},{"name":"environments","description":"used to filter by environment names (staging, production,..)","in":"query","required":false,"type":"string"},{"name":"scanId","description":"used to filter by scanId","in":"query","required":false,"type":"string"},{"name":"ruleIds","description":"used to filter by ruleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"languages","description":"used to filter by language (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"status","description":"used to filter by status (fixed)","in":"query","required":false,"type":"string"},{"name":"environmentIds","description":"used to filter by environment ids","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"Successful operation. Returns total count and grouped by rule, language, count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/count"},"data":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"object","properties":{"idRule":"string","title":"string","name":"string","docs":"string"},"example":{"idRule":1,"title":"Hard-Coded Secrets","name":"GR0004","docs":"hard-coded_secrets.html"}},"language":{"type":"array","items":{"type":"string","example":"javascript"}},"count":{"$ref":"#/components/schemas/count"}}}}}}}}},"400":{"description":"Bad request for invalid parameters"}}}},"/v2/dast/findings/{ruleId}":{"get":{"summary":"get the list of findings for a given rule","description":"Get the list of findings for a given rule","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"ruleId","description":"ruleId","example":7,"in":"path","required":true,"type":"number"},{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"assetIds","description":"used to filter by asset ids (1,2)","in":"query","required":false,"type":"string"},{"name":"environments","description":"used to filter by environment names (staging)","in":"query","required":false,"type":"string"},{"name":"scanId","description":"used to filter by scanId","in":"query","required":false,"type":"string"},{"name":"ruleIds","description":"used to filter by ruleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"environmentIds","description":"used to filter by environmentIds (1,2)","in":"query","required":false,"type":"string"},{"name":"languages","description":"used to filter by languages (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"status","description":"used to filter by status (FIXED)","in":"query","required":false,"type":"string"},{"name":"limit","in":"query","type":"integer"},{"name":"offset","in":"query","type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns an  array of findings filtered by many fields","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/runtimeFinding"}}}}},"400":{"description":"Bad request for invalid parameters"}}}},"/v2/dast/findings/bulk":{"patch":{"summary":"update findings by a list of ids","description":"Patch one or more findings in bulk","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"]},"findingIds":{"type":"array","items":{"type":"string","example":"findingId"}}}}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","properties":{"totalUpdatedFindings":{"type":"array","items":{"$ref":"#/components/schemas/runtimeFinding"}}}}}}},"400":{"description":"There was not findings/vulnerabilities to update. This happens when all changes aren't allowed. Please refer to the documentation or contact support."}}}},"/v2/dast/findings/bulkByRules":{"patch":{"summary":"update findings on the same rules","description":"Patch findings on the same rules","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"assetIds","description":"used to filter by assetIds (1,2)","in":"query","required":false,"type":"string"},{"name":"environments","description":"used to filter by environment names (staging)","in":"query","required":false,"type":"string"},{"name":"scanId","description":"used to filter by scanId","in":"query","required":false,"type":"string"},{"name":"environmentIds","description":"used to filter by environment ids (1,2)","in":"query","required":false,"type":"boolean"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"languages","description":"used to filter by language (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"status","description":"used to filter by status (FIXED)","in":"query","required":false,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"},"total":{"type":"number"},"excludedIds":{"type":"array","items":{"type":"string"}},"ruleIds":{"type":"array","items":{"type":"number"}}}}}}},"responses":{"200":{"description":"Successful operation. Returns total updated findings count.","content":{"application/json":{"schema":{"type":"object","properties":{"totalUpdatedFindings":{"type":"number","example":0}}}}}},"400":{"description":"Invalid value for parameter status. It can only be undefined, 'null', or a valid status enum"}}}},"/v2/dast/findings/bulk-request-change":{"patch":{"summary":"request change findings' statuses by a list of ids","description":"request change one or more findings' statuses in bulk","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"},"comments":{"type":"string"},"findingIds":{"type":"array","items":{"type":"string","example":1}}}}}}},"responses":{"200":{"description":"Successful operation. Returns the updated Findings result."},"400":{"description":"There was not findings/vulnerabilities to update. This happens when all changes aren't allowed. Please refer to the documentation or contact support."},"403":{"description":"The approval process has been disabled. Please use this endpoint to update vulnerability status - v2/dast/findings/bulk"}}}},"/v2/dast/findings/requestChangeByRules":{"patch":{"summary":"patch findings by a rule","description":"patch findings by a rule","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"assetIds","description":"used to filter by assetIds (1,2)","in":"query","required":false,"type":"string"},{"name":"environments","description":"used to filter by environment names (staging)","in":"query","required":false,"type":"string"},{"name":"scanId","description":"used to filter by scanId","in":"query","required":false,"type":"string"},{"name":"environmentIds","description":"used to filter by environment ids (1,2)","in":"query","required":false,"type":"boolean"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"languages","description":"used to filter by language (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"status","description":"used to filter by status (FIXED)","in":"query","required":false,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"},"comments":{"type":"string"},"total":{"type":"number"},"ruleIds":{"type":"array","items":{"type":"number"}},"excludedIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful operation. Returns total requested actions count.","content":{"application/json":{"schema":{"type":"object","properties":{"totalRequestedActions":{"type":"number","example":0}}}}}},"403":{"description":"The approval process has been disabled. Please use this endpoint to update vulnerability status - v2/dast/findings/bulkByRules"}}}},"/v2/dast/findings/{idFinding}":{"patch":{"summary":"patch a finding's status","description":"patch a finding with a status to manually alter the state of a finding or vulnerability","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"findingId","example":7,"in":"path","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"}}}}}},"responses":{"200":{"description":"Successful operation. The finding is returned with the updated status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/runtimeFinding"}}}},"400":{"description":"You are not allowed to change a finding/vulnerability status."},"403":{"description":"The approval process has been enabled. Please use this endpoint to update finding status - v2/findings/{idFinding}/request-change."},"404":{"description":"No finding exists with this Id"}}}},"/v2/dast/findings/{findingId}/request-change":{"patch":{"summary":"request change a finding's status","description":"request change a finding with a status to manually alter the state of a finding or vulnerability","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"findingId","example":7,"in":"path","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"},"comments":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful operation. A request to change finding's status is created and pending to review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/runtimeFinding"}}}},"400":{"description":"You are not allowed to change a finding/vulnerability status."},"403":{"description":"The approval process has been disabled. Please use this endpoint to update vulnerability status - v2/dast/findings/{findingId}."},"404":{"description":"No finding exists with this Id."}}}},"/v2/departments":{"get":{"tags":["Departments"],"summary":"get the list of departments","description":"get the list of departments","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"the accountId to get the departments","example":7,"in":"query","required":true,"type":"integer"}],"responses":{"200":{"description":"Returns all departments","content":{"application/json":{"schema":{"type":"object","properties":{"departments":{"type":"array","items":{"$ref":"#/components/schemas/department"}}}}}}}}},"post":{"tags":["Departments"],"summary":"create a new department","description":"Create a new department","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"the accountId to create a department","example":7,"in":"query","required":true,"type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"department":{"type":"object","properties":{"name":{"type":"string","example":"engineering"}},"required":true}}}}}},"responses":{"200":{"description":"Returns the created department","content":{"application/json":{"schema":{"type":"object","properties":{"department":{"$ref":"#/components/schemas/department"}}}}}}}}},"/v2/dependencies":{"get":{"summary":"get the paginated list of dependencies","description":"Get the paginated list of dependencies for each repository's master branch.","tags":["Dependencies","Filters"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"the accountId to get the dependencies","example":7,"in":"query","required":true,"type":"integer"},{"name":"hasVulnerability","in":"query","description":"Show dependencies that have vulnerabilities","type":"boolean","required":false},{"name":"repoId","description":"the repositoryId to get the dependencies","in":"query","required":false,"type":"string"},{"name":"license","description":"the license to get the dependencies","in":"query","required":false,"type":"string"},{"name":"limit","description":"the amount of dependencies to get per page","in":"query","required":false,"type":"integer"},{"name":"offset","description":"Initial position of the dependencies list to get dependencies paginated from","in":"query","required":false,"type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns an object including the array of filters applicable to dependencies and total count","content":{"application/json":{"schema":{"type":"object","properties":{"dependencies":{"type":"array","items":{"$ref":"#/components/schemas/dependency"}},"totalCount":{"type":"string","example":"0"}}}}}}}}},"/v2/engine-configs":{"get":{"tags":["EngineConfigs"],"summary":"get the list of engine configs","description":"Get the list of engine configs","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the engine configs from","type":"integer"}],"responses":{"200":{"description":"Response will contain the list of engine configs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/engineConfig"}}}}}}}},"/v2/engine-configs/{engineId}":{"post":{"tags":["EngineConfigs"],"summary":"create a new engine config for a given engineId","description":"create a new engine config for a given engineId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to create the engine configs from","type":"integer"},{"name":"engineId","in":"path","required":true,"description":"the engineId to create engine configs","type":"integer"},{"name":"configSpecId","in":"query","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"string"},"envVars":{"type":"object","properties":{"ignoreGuardRailsRules":{"type":"boolean","example":false},"disableCustomRules":{"type":"boolean","example":false}}}}}}}},"responses":{"201":{"description":"Response will contain created engine configs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/engineConfig"}}}},"404":{"description":"Error - config spec not found for this account"}}},"patch":{"tags":["EngineConfigs"],"summary":"update engine configs for a given engineId","description":"Patch engine configs for a given engineId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the engine configs from","type":"integer"},{"name":"engineId","in":"path","required":true,"description":"the engineId to update engine configs","type":"number"},{"name":"configSpecId","in":"query","required":true,"type":"string"},{"name":"engineConfigId","in":"query","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"string"},"envVars":{"type":"object","properties":{"ignoreGuardRailsRules":{"type":"boolean","example":false},"disableCustomRules":{"type":"boolean","example":false}}}}}}}},"responses":{"201":{"description":"Response will contain updated engine configs for a given engineId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/engineConfig"}}}},"404":{"description":"Error - config spec not found for this account"}}}},"/v2/engines":{"get":{"summary":"get the list of engines grouped by language","description":"get the list of engines groupd by language","tags":["Engines"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"}],"responses":{"200":{"description":"List engines grouped by language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/engines"}}}}}}},"/v2/engines/listRules":{"get":{"summary":"get the list of engines and their respective rules","description":"get the list of engines and their respective rules","tags":["Engines"],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"}],"produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List of engines and their respective rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/engineRules"}}}}}}},"/v2/engines/custom":{"post":{"summary":"upload custom engine","description":"Upload custom engine","tags":["Engines"],"parameters":[{"name":"login","description":"login user","in":"query","required":true,"type":"string"},{"name":"provider","description":"git provider","example":"github","in":"query","required":true,"type":"string"}],"produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"uploaded custom engine successfully"},"404":{"description":"No files were uploaded or Account Not Found"}}}},"/v2/environments":{"post":{"tags":["Environments"],"summary":"create a new environment for a given assetId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to create a new environment","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createEnvironment"}}}},"responses":{"200":{"description":"Response will contain created new environment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/environment"}}}}}},"get":{"summary":"get the list of environments","description":"Get the list of environments","tags":["Environments"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the list of environments","type":"integer","example":1},{"name":"assetIds","in":"query","type":"string","example":"2,3","required":true,"description":"The ids of the asset containing the desired environments"},{"name":"limit","in":"query","type":"integer","required":false,"description":"Amount of environments to get per page"},{"name":"offset","in":"query","type":"integer","required":false,"description":"Initial position of the environments list to get environments paginated from"}],"responses":{"200":{"description":"Successful operation. Returns an array containing all the environments of a given asset and the totalCount of them","content":{"application/json":{"schema":{"type":"object","properties":{"environments":{"type":"array","items":{"$ref":"#/components/schemas/environment"}},"totalCount":{"type":"number","example":1}}}}}},"404":{"description":"Resources not Found. The environments could not be found with the given assetId"}}}},"/v2/environments/{environmentId}":{"get":{"summary":"get the environment by environment id","description":"Get the environment details by id","tags":["Environments"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the environment","example":123,"in":"query","required":true,"type":"number"},{"name":"environmentId","description":"environment id","example":1,"in":"path","type":"number"}],"responses":{"200":{"description":"Successful operation. Returns environment details","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"$ref":"#/components/schemas/environment"}}}}}}}},"patch":{"summary":"update the environment by environment id","tags":["Environments"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the environment","example":1,"in":"query","required":true,"type":"number"},{"name":"environmentId","description":"environment id to update the environment","example":1,"in":"path","type":"number"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fkTemplateType":{"type":"number","example":1},"name":{"type":"string","example":"development"},"url":{"type":"string","example":"https://example.com"},"isDefault":{"type":"boolean","example":false},"fkAsset":{"type":"number","example":1}}}}}},"responses":{"200":{"description":"Successful operation. Returns the updated environment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/environment"}}}}}},"delete":{"summary":"delete the environment by environment id","tags":["Environments"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to delete the environment","example":1,"in":"query","required":true,"type":"number"},{"name":"environmentId","description":"environment id to delete the environment","example":1,"in":"path","type":"number"}],"responses":{"204":{"description":"Returns empty response body with status 204"},"404":{"description":"Environment with this environmentId not found."}}}},"/v2/environments/jobs/validate":{"post":{"summary":"validate the job file","description":"Validate the job file","tags":["Environments"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the environment","example":123,"in":"query","required":true,"type":"number"},{"name":"template","description":"job template to validate","in":"files","required":true}],"responses":{"200":{"description":"Successful operation. Returns validated job file"}}}},"/v2/environments/url/validate":{"delete":{"summary":"validate the environment url","tags":["Environments"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to delete the environment","example":1,"in":"query","required":true,"type":"number"},{"name":"url","description":"the environment url to validate","example":"https://example.com","in":"body","required":true,"type":"string"}],"responses":{"200":{"description":"Successfully validate the url"}}}},"/v2/findings/links":{"get":{"summary":"get the link by a findingId and scanId","description":"Get the link by a findingId and scanId","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"},{"name":"findingId","example":7,"in":"query","required":true,"type":"string"},{"name":"scanId","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"Successful operation. Returns the link by a findingId and scanId","content":{"application/json":{"schema":{"type":"object","properties":{"providerCodeLink":{"type":"string","example":"provider-code-link"}}}}}},"404":{"description":"Finding with this findingId doesn't exist."}}}},"/v2/findings/codeBlock/{findingId}":{"get":{"summary":"get the codeblock by a findingId","description":"Get the codeblock by a findingId","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"},{"name":"findingId","example":7,"in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Successful operation. Returns the codeblock by a findingId","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","example":"this.options.scroll == window"},"language":{"type":"string","example":"javascript"},"error":{"type":"boolean","example":false}}}}}},"404":{"description":"Finding with this findingId doesn't exist."}}}},"/v2/findings":{"get":{"summary":"get the list of findings including total count and grouped by rule, language, count","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"},{"name":"repositoryIds","description":"used to filter by repositoryIds (1,2)","in":"query","required":false,"type":"string"},{"name":"branchName","description":"used to filter by branchName (master)","in":"query","required":false,"type":"string"},{"name":"scanId","description":"used to filter by scanId","in":"query","required":false,"type":"string"},{"name":"isParanoid","description":"allow to shallow delete in the dbs (true/false)","in":"query","required":false,"type":"boolean"},{"name":"ruleIds","description":"used to filter by ruleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"cweIds","description":"used to filter by cweIds (1,2)","in":"query","required":false,"type":"string"},{"name":"language","description":"used to filter by language (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"status","description":"used to filter by status (fixed)","in":"query","required":false,"type":"string"},{"name":"verificationStatus","description":"used to filter by token verification status","in":"query","required":false,"type":"string"},{"name":"type","description":"used to filter by type (vulnerable dependency)","in":"query","required":false,"type":"string"},{"name":"introducedBy","description":"used to filter by introducedBy (john)","in":"query","required":false,"type":"string"},{"name":"path","description":"used to filter by path (src/auth/index.js)","in":"query","required":false,"type":"string"},{"name":"hasTicket","description":"used to filter by hasTicket (t/f)","in":"query","required":false,"type":"string"},{"name":"excludeChildren","description":"used to filter by excludeChildren (t/f)","in":"query","required":false,"type":"string"},{"name":"since","description":"beginning of the chosen timeframe of the query data","in":"query","required":false,"type":"date"},{"name":"until","description":"ending of the chosen timeframe of the query data","in":"query","required":false,"type":"date"}],"responses":{"200":{"description":"Successful operation. Returns total count and grouped by rule, language, count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/count"},"data":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"object","properties":{"idRule":"string","title":"string","name":"string","docs":"string"},"example":{"idRule":1,"title":"Hard-Coded Secrets","name":"GR0004","docs":"hard-coded_secrets.html"}},"language":{"type":"array","items":{"type":"string","example":"javascript"}},"count":{"$ref":"#/components/schemas/count"}}}}}}}}},"400":{"description":"Bad request for invalid parameters"}}}},"/v2/findings/count":{"get":{"summary":"get the findings count","description":"Get the findings count","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"},{"name":"repositoryIds","description":"used to filter by repositories Ids (1,2)","in":"query","required":true,"type":"string"},{"name":"branchName","description":"used to filter by branchName (master)","in":"query","required":true,"type":"string"},{"name":"excludeChildren","description":"used to filter by excludeChildren (true/false)","in":"query","required":false,"type":"boolean"},{"name":"since","description":"beginning of the chosen timeframe of the query data","in":"query","required":false,"type":"date"},{"name":"until","description":"ending of the chosen timeframe of the query data","in":"query","required":false,"type":"date"}],"responses":{"200":{"description":"Successful operation. Returns the total findings count.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number","example":1}}}}}}}}},"/v2/findings/{ruleId}":{"get":{"summary":"get the list of findings for a given rule","description":"Get the list of findings for a given rule","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"ruleId","description":"ruleId","example":7,"in":"path","required":true,"type":"number"},{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"repositoryIds","description":"used to filter by repositoryIds (1,2)","in":"query","required":false,"type":"string"},{"name":"branchName","description":"used to filter by branchName (master)","in":"query","required":false,"type":"string"},{"name":"scanId","description":"used to filter by scanId","in":"query","required":false,"type":"string"},{"name":"isParanoid","description":"allow to shallow delete in the dbs (true/false)","in":"query","required":false,"type":"boolean"},{"name":"ruleIds","description":"used to filter by ruleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"cweIds","description":"used to filter by cweIds (1,2)","in":"query","required":false,"type":"string"},{"name":"language","description":"used to filter by language (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"status","description":"used to filter by status (FIXED)","in":"query","required":false,"type":"string"},{"name":"verificationStatus","description":"used to filter by token verification status","in":"query","required":false,"type":"string"},{"name":"type","description":"used to filter by type (vulnerable dependency)","in":"query","required":false,"type":"string"},{"name":"introducedBy","description":"used to filter by introducedBy (john)","in":"query","required":false,"type":"string"},{"name":"path","description":"used to filter by path (src/auth/index.js)","in":"query","required":false,"type":"string"},{"name":"hasTicket","description":"used to filter by hasTicket (true/false)","in":"query","required":false,"type":"boolean"},{"name":"excludeChildren","description":"used to filter by excludeChildren (true/false)","in":"query","required":false,"type":"boolean"},{"name":"limit","in":"query","type":"integer"},{"name":"offset","in":"query","type":"integer"},{"name":"since","description":"beginning of the chosen timeframe of the query data (2022-01-01)","in":"query","required":false,"type":"date"},{"name":"until","description":"ending of the chosen timeframe of the query data (2022-02-01)","in":"query","required":false,"type":"date"}],"responses":{"200":{"description":"Successful operation. Returns an  array of findings filtered by many fields","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/finding"}}}}},"400":{"description":"Bad request for invalid parameters"}}}},"/v2/findings/bulk":{"patch":{"summary":"update findings by a list of ids","description":"Patch one or more findings in bulk","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"}}},"findingIds":{"type":"array","items":{"type":"string","example":1}}}}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","properties":{"updatedFindings":{"type":"array","items":{"$ref":"#/components/schemas/finding"}}}}}}},"400":{"description":"There was not findings/vulnerabilities to update. This happens when all changes aren't allowed. Please refer to the documentation or contact support."},"403":{"description":"The approval process has been enabled. Please use this endpoint to update finding status - v2/findings/bulk-request-change"}}}},"/v2/findings/bulkByRules":{"patch":{"summary":"update findings on the same rules","description":"Patch findings on the same rules","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"repositoryIds","description":"used to filter by repositoryIds (1,2)","in":"query","required":false,"type":"string"},{"name":"branchName","description":"used to filter by branchName (master)","in":"query","required":false,"type":"string"},{"name":"scanId","description":"used to filter by scanId","in":"query","required":false,"type":"string"},{"name":"isParanoid","description":"allow to shallow delete in the dbs (true/false)","in":"query","required":false,"type":"boolean"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"language","description":"used to filter by language (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"status","description":"used to filter by status (FIXED)","in":"query","required":false,"type":"string"},{"name":"verificationStatus","description":"used to filter by token verification status","in":"query","required":false,"type":"string"},{"name":"type","description":"used to filter by type (vulnerable dependency)","in":"query","required":false,"type":"string"},{"name":"introducedBy","description":"used to filter by introducedBy (john)","in":"query","required":false,"type":"string"},{"name":"path","description":"used to filter by path (src/auth/index.js)","in":"query","required":false,"type":"string"},{"name":"hasTicket","description":"used to filter by hasTicket (true/false)","in":"query","required":false,"type":"boolean"},{"name":"excludeChildren","description":"used to filter by excludeChildren (true/false)","in":"query","required":false,"type":"boolean"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"},"total":{"type":"number"},"excludedIds":{"type":"array","items":{"type":"string"}},"ruleIds":{"type":"array","items":{"type":"number"}}}}}}},"responses":{"200":{"description":"Successful operation. Returns total updated findings count.","content":{"application/json":{"schema":{"type":"object","properties":{"totalUpdatedFindings":{"type":"number","example":0}}}}}},"400":{"description":"Invalid value for parameter status. It can only be undefined, 'null', or a valid status enum"}}}},"/v2/findings/requestChangeByRules":{"patch":{"summary":"patch findings by a rule","description":"patch findings by a rule","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"repositoryIds","description":"used to filter by repositoryIds (1,2)","in":"query","required":false,"type":"string"},{"name":"branchName","description":"used to filter by branchName (master)","in":"query","required":false,"type":"string"},{"name":"scanId","description":"used to filter by scanId","in":"query","required":false,"type":"string"},{"name":"isParanoid","description":"allow to shallow delete in the dbs (true/false)","in":"query","required":false,"type":"boolean"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"language","description":"used to filter by language (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"status","description":"used to filter by status (FIXED)","in":"query","required":false,"type":"string"},{"name":"type","description":"used to filter by type (vulnerable dependency)","in":"query","required":false,"type":"string"},{"name":"introducedBy","description":"used to filter by introducedBy (john)","in":"query","required":false,"type":"string"},{"name":"path","description":"used to filter by path (src/auth/index.js)","in":"query","required":false,"type":"string"},{"name":"hasTicket","description":"used to filter by hasTicket (true/false)","in":"query","required":false,"type":"boolean"},{"name":"verificationStatus","description":"used to filter by token verification status","in":"query","required":false,"type":"string"},{"name":"excludeChildren","description":"used to filter by excludeChildren (true/false)","in":"query","required":false,"type":"boolean"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"},"comments":{"type":"string"}}},"total":{"type":"number"},"ruleIds":{"type":"array","items":{"type":"number"}},"excludedIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful operation. Returns total updated findings count.","content":{"application/json":{"schema":{"type":"object","properties":{"totalUpdatedFindings":{"type":"number","example":0}}}}}},"403":{"description":"The approval process has been disabled. Please use this endpoint to update vulnerability status - v2/findings/bulkByRules"}}}},"/v2/findings/bulk-request-change":{"patch":{"summary":"request change findings' statuses by a list of ids","description":"request change one or more findings' statuses in bulk","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"},"comments":{"type":"string"}}},"findingIds":{"type":"array","items":{"type":"string","example":1}}}}}}},"responses":{"200":{"description":"Successful operation. Returns the updated Findings result.","content":{"application/json":{"schema":{"type":"object","properties":{"updatedFindings":{"type":"array","example":[]}}}}}},"400":{"description":"There was not findings/vulnerabilities to update. This happens when all changes aren't allowed. Please refer to the documentation or contact support."},"403":{"description":"The approval process has been disabled. Please use this endpoint to update vulnerability status - v2/findings/bulk"}}}},"/v2/findings/{idFinding}":{"patch":{"summary":"patch a finding's status","description":"patch a finding with a status to manually alter the state of a finding or vulnerability","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"findingId","example":7,"in":"path","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"}}}}}},"responses":{"200":{"description":"Successful operation. The finding is returned with the updated status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/finding"}}}},"400":{"description":"You are not allowed to change a finding/vulnerability status."},"403":{"description":"The approval process has been enabled. Please use this endpoint to update finding status - v2/findings/{idFinding}/request-change."},"404":{"description":"No finding exists with this Id"}}}},"/v2/findings/{idFinding}/request-change":{"patch":{"summary":"request change a finding's status","description":"request change a finding with a status to manually alter the state of a finding or vulnerability","tags":["Findings"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"findingId","example":7,"in":"path","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["MARK_AS_VULNERABILITY","MARK_AS_FIXED","WONT_FIX","FALSE_POSITIVE"],"example":"FALSE_POSITIVE"},"comments":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful operation. A request to change finding's status is created and pending to review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/finding"}}}},"400":{"description":"You are not allowed to change a finding/vulnerability status."},"403":{"description":"The approval process has been disabled. Please use this endpoint to update vulnerability status - v2/findings/{idFinding}."},"404":{"description":"No finding exists with this Id."}}}},"/v2/integrations/jira/integration-configs":{"get":{"tags":["Jira"],"summary":"get the list of integration configs","description":"Get the list of integration configs","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the integration configs from","type":"integer"}],"responses":{"200":{"description":"Response will contain the list of integration configs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/jiraIntegrationConfig"}}}}}}},"post":{"tags":["Jira"],"summary":"create a new integration service on jira","description":"Create a new integration service on jira","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to create integration configs","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"webUrl":{"type":"string"},"apiUrl":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"Response will contain the list of integration configs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jiraIntegrationConfig"}}}},"400":{"description":"invalid api url or web url"}}}},"/v2/integrations/jira/integration-configs/{idJiraIntegrationConfig}":{"patch":{"tags":["Jira"],"summary":"update jira integration configs for a given idJiraIntegrationConfig","description":"Patch jira integration configs for a given idJiraIntegrationConfig","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to update integration configs","type":"integer"},{"name":"idJiraIntegrationConfig","in":"path","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"webUrl":{"type":"string"},"apiUrl":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"Response will contain the list of integration configs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jiraIntegrationConfig"}}}},"400":{"description":"invalid api url or web url or The jira integration config with this idJiraIntegrationConfig doesn't belong to the account with this accountId"},"404":{"description":"No jira integration found with this JiraIntegrationConfigId"}}},"delete":{"tags":["Jira"],"summary":"delete jira integration configs for a given idJiraIntegrationConfig","description":"Delete jira integration configs for a given idJiraIntegrationConfig","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to delete the integration configs","type":"integer"},{"name":"idJiraIntegrationConfig","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Returns empty with status 204"},"400":{"description":"The jira integration config with this idJiraIntegrationConfig doesn't belong to the account with this accountId"},"404":{"description":"No jira integration found with this JiraIntegrationConfigId"}}}},"/v2/integrations/jira/repository-config":{"get":{"tags":["Jira"],"summary":"get the jira repository config for a given repositoryId","description":"Get the jira repository config for a given repositoryId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the repository config from","type":"integer"},{"name":"repositoryId","in":"query","required":true,"type":"integer"}],"responses":{"200":{"description":"Returns repository config for a given repositoryId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jiraRepositoryConfig"}}}},"404":{"description":"No repository exist with this repositoryId or Jira repository config not found."}}},"post":{"tags":["Jira"],"summary":"create a new jira repository config","description":"create a new jira repository config","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the repository config from","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idJiraIntegrationConfig":{"type":"string"},"idRepository":{"type":"number"},"externalProjectId":{"type":"string"},"externalIssueTypeId":{"type":"string"}}}}}},"responses":{"200":{"description":"Returns created repository config for a given repositoryId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jiraRepositoryConfig"}}}},"400":{"description":"The jira integration config and the jira repository config must be on the same account or A jira repository config already exist on the repository or Invalid jira project id. Project id was not found or Invalid jira issue type id. Issue type id was not found."},"404":{"description":"No jira integration found with this idJiraIntegrationConfig."}}}},"/v2/integrations/jira/repository-config/{idJiraRepositoryConfig}":{"patch":{"tags":["Jira"],"summary":"update jira repository config for a given idJiraRepositoryConfig","description":"Patch jira repository config for a given idJiraRepositoryConfig","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to create the repository config","type":"integer"},{"name":"idJiraRepositoryConfig","in":"path","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idJiraIntegrationConfig":{"type":"string"},"externalProjectId":{"type":"string"},"externalIssueTypeId":{"type":"string"}}}}}},"responses":{"200":{"description":"Returns created repository config for a given repositoryId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jiraRepositoryConfig"}}}},"400":{"description":"The jira integration config with this idJiraIntegrationConfig doesn't belong to the account with this accountId or The jira integration config and the jira repository config must be on the same account or Invalid jira project id or Invalid jira issue type id."},"404":{"description":"No jira repository config found with this idJiraRepositoryConfig or No jira integration found with this idJiraIntegrationConfig."}}},"delete":{"tags":["Jira"],"summary":"delete jira repository config for a given idJiraRepositoryConfig","description":"Delete jira repository config for a given idJiraRepositoryConfig","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to delete the repository config","type":"integer"},{"name":"idJiraRepositoryConfig","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Returns empty with status 204"},"404":{"description":"No jira repository config found with this idJiraRepositoryConfig or No repository exist with this repositoryId."}}}},"/v2/integrations/jira/projects":{"get":{"tags":["Jira"],"summary":"get the list of projects integrated with jira","description":"get the list of projects integrated with jira","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get jira projects from","type":"integer"},{"name":"idJiraIntegrationConfig","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"Returns jira projects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/jiraProjectConfig"}}}}},"400":{"description":"The jira integration config with this idJiraIntegrationConfig doesn't belong to the account with this accountId"},"404":{"description":"No jira integration found with this idJiraIntegrationConfig."}}}},"/v2/integrations/jira/issue-types":{"get":{"tags":["Jira"],"summary":"get the list of issue types integrated with jira","description":"get the list of issue types integrated with jira","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get jira issue types from","type":"integer"},{"name":"idJiraIntegrationConfig","in":"query","required":true,"type":"string"},{"name":"externalProjectId","in":"query","required":true,"type":"number"}],"responses":{"200":{"description":"Returns list of issue types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/jiraIssueTypeConfig"}}}}},"400":{"description":"The jira integration config with this idJiraIntegrationConfig doesn't belong to the account with this accountId"},"404":{"description":"No jira integration found with this idJiraIntegrationConfig."}}}},"/v2/integrations/jira/issues":{"post":{"tags":["Jira"],"summary":"create a new jira issue","description":"Create a new jira issue","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to create a jira issue","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"findingId":{"type":"string"},"scanId":{"type":"string"}}}}}},"responses":{"200":{"description":"Returns created jira issue","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/jiraIssueConfig"}}}}},"400":{"description":"A Jira issue has already been created for this finding."},"404":{"description":"Finding with this findingId does not exist or No jira configuration found for this repository or Repository not found."}}}},"/v2/integrations/jira/dast/issues":{"post":{"tags":["Jira"],"summary":"create a new jira issue for DAST","description":"Create a new jira issue for DAST","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to create a jira issue","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"findingId":{"type":"string"},"scanId":{"type":"string"}}}}}},"responses":{"200":{"description":"Returns created jira issue for DAST","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/jiraIssueConfig"}}}}},"400":{"description":"A Jira issue has already been created for this finding."},"404":{"description":"Finding with this findingId does not exist or No jira configuration found for this repository or Repository not found."}}}},"/v2/integrations/jira/test-connection":{"get":{"tags":["Jira"],"summary":"test jira connection","description":"Test jira connection","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to test the jira connection","type":"integer"},{"name":"idJiraIntegrationConfig","in":"query","required":true,"type":"string"}],"responses":{"204":{"description":"Returns empty with status 204"},"400":{"description":"The jira integration config with this idJiraIntegrationConfig doesn't belong to the account with this accountId."},"404":{"description":"No jira integration found with this idJiraIntegrationConfig."}}}},"/v2/integrations/jira/asset-config":{"get":{"tags":["Jira"],"summary":"get the jira asset config for a given assetId","description":"Get the jira asset config for a given assetId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the asset config from","type":"integer"},{"name":"assetId","in":"query","required":true,"type":"integer"}],"responses":{"200":{"description":"Returns asset config for a given assetId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jiraAssetConfig"}}}},"404":{"description":"No asset exist with this assetId or Jira asset config not found."}}},"post":{"tags":["Jira"],"summary":"create a new jira asset config","description":"create a new jira asset config","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the asset config from","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fkJiraIntegrationConfig":{"type":"string"},"fkAsset":{"type":"number"},"externalProjectId":{"type":"string"},"externalIssueTypeId":{"type":"string"}}}}}},"responses":{"200":{"description":"Returns created asset config for a given assetId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jiraAssetConfig"}}}},"400":{"description":"The jira integration config and the jira asset config must be on the same account or A jira asset config already exist on the asset or Invalid jira project id. Project id was not found or Invalid jira issue type id. Issue type id was not found."},"404":{"description":"No jira integration found with this idJiraIntegrationConfig."}}}},"/v2/integrations/jira/asset-config/{idJiraAssetConfig}":{"patch":{"tags":["Jira"],"summary":"update jira asset config for a given idJiraAssetConfig","description":"Patch jira asset config for a given idJiraAssetConfig","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to create the asset config","type":"integer"},{"name":"idJiraAssetConfig","in":"path","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fkJiraIntegrationConfig":{"type":"string"},"externalProjectId":{"type":"string"},"externalIssueTypeId":{"type":"string"}}}}}},"responses":{"200":{"description":"Returns updated asset config for a given assetId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jiraAssetConfig"}}}},"400":{"description":"The jira integration config with this idJiraIntegrationConfig doesn't belong to the account with this accountId or The jira integration config and the jira asset config must be on the same account or Invalid jira project id or Invalid jira issue type id."},"404":{"description":"No jira asset config found with this idJiraAssetConfig or No jira integration found with this idJiraIntegrationConfig."}}},"delete":{"tags":["Jira"],"summary":"delete jira asset config for a given idJiraAssetConfig","description":"Delete jira asset config for a given idJiraAssetConfig","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to delete the asset config","type":"integer"},{"name":"idJiraAssetConfig","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"Returns empty with status 204"},"404":{"description":"No jira asset config found with this idJiraAssetConfig or No asset exist with this assetId."}}}},"/v2/monorepo-config":{"post":{"summary":"update monorepo configuration","description":"update monorepo configuration","tags":["Monorepo-configurations"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true}],"requestBody":{"description":"body to update monorepo configs","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/monorepoConfigsBody"}}}},"responses":{"200":{"description":"Successful operation."}}}},"/v2/plans":{"get":{"tags":["Plans"],"summary":"get the list of subscription plans","description":"Get the list of subscription plans","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the plans from","type":"integer"}],"responses":{"200":{"description":"Response will contain the list of subscription plans","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/plan"}},"isFlatPrice":{"type":"boolean"}}}}}}}}},"/v2/pre-hook/trigger-scan":{"post":{"summary":"trigger a new pre-hook scan","description":"Create a new pre-hook scan to check commit for vulnerabilities","tags":["PreHook"],"produces":["application/json"],"parameters":[{"name":"cliToken","description":"CLI token of the organization","in":"body","required":true,"type":"string"},{"name":"repositoryProviderInternalId","description":"id of the repository as defined in the git provider","example":"123","in":"body","required":true,"type":"string"},{"name":"sha","description":"sha of the commit that will be scanned","example":"e26fe25a26f504d8ee0a7d70babbf90ba6cb99f1","in":"body","required":true,"type":"string"},{"name":"branch","description":"name of the branch that will be scanned","example":"main","in":"body","required":true,"type":"string"},{"name":"gitArchiveFileName","description":"file name of the git archive that has been uploaded","example":"ecd00941-7433-42cf-a9c2-ec0edee0202e","in":"body","required":true,"type":"string"},{"name":"gitDiffFileName","description":"file name of the git diff file that has been uploaded","example":"91a2e59e-372b-48fe-b7e4-dcf840a57331","in":"body","required":true,"type":"string"}],"responses":{"200":{"description":"Successful operation. Returns the id and link to the newly created scan.","content":{"application/json":{"schema":{"type":"object","properties":{"idScan":{"type":"string","example":"57095202-98cb-44eb-9075-43ea9e2847c3"},"dashboardUrl":{"type":"string","example":"https://dashboard.guardrails-instance.com/gl/test-user/scans?sha=e26fe25a26f504d8ee0a7d70babbf90ba6cb99f1"}}}}}},"400":{"description":"Endpoint is only available in on-premise installations."}}}},"/v2/pre-hook/upload-url":{"post":{"summary":"create a unique upload url","description":"Create a unique url that can be used to upload Git archive and Git diff to be scanned","tags":["PreHook"],"produces":["application/json"],"parameters":[{"in":"body","name":"cliToken","type":"string","required":true,"description":"CLI token for the organization"},{"name":"preHookToken","in":"body","type":"string","required":true,"description":"PreHook token"}],"responses":{"200":{"description":"Successful operation. Returns the url for uploading the file and the filename.","content":{"application/json":{"schema":{"type":"object","properties":{"signedUrl":{"type":"string"},"fileName":{"type":"string"}}}}}}}}},"/v2/pre-hook/scan":{"get":{"summary":"get scan information","description":"Get information about a specific scan","tags":["PreHook"],"produces":["application/json"],"parameters":[{"in":"query","name":"cliToken","type":"string","required":true,"description":"CLI token of the organization"},{"in":"query","name":"idScan","type":"string","required":true,"description":"Id of the scan that should be looked up"}],"responses":{"200":{"description":"Successful operation. Returns details about the scan.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/scan"}}}}},"400":{"description":"Not allowed to fetch a scan that isn't a pre-hook scan."},"404":{"description":"Scan not found"}}}},"/v2/pre-hook/version":{"get":{"summary":"check pre-hook plugin version compatibility","description":"Check pre-hook plugin version compatibility","tags":["PreHook"],"produces":["application/json"],"parameters":[{"in":"query","name":"provider","type":"string","required":true,"description":"Git provider name"},{"in":"query","name":"version","type":"string","required":true,"description":"The version number of the pre-hook plugin"}],"responses":{"200":{"description":"Successful operation. Returns information about compatibility of the pre-hook plugin.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"info":{"type":"string"}}}}}},"400":{"description":"Version should be a string or Invalid version format or Unexpected provider."}}}},"/v2/pre-hook/configuration":{"get":{"summary":"get pre-hook plugin configuration","description":"Get pre-hook plugin configuration","tags":["PreHook"],"produces":["application/json"],"parameters":[{"in":"query","name":"cliToken","type":"string","required":false,"description":"CLI token of the organization"},{"in":"query","name":"preHookToken","type":"string","required":false,"description":"Pre-hook token secret"},{"in":"query","name":"provider","type":"string","required":true,"description":"Git provider name"},{"in":"query","name":"repositoryProviderInternalId","type":"string","required":true,"description":"id of the repository as defined in the git provider"}],"responses":{"200":{"description":"Successful operation. Returns information about compatibility of the pre-hook plugin.","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}}},"400":{"description":"Endpoint is only available in on-premise installations."},"404":{"description":"Repository not found."}}}},"/v2/reports":{"get":{"tags":["Reports"],"summary":"get the list of reports and the metadata","description":"Get the list of the reports and the metadata","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true},{"name":"resource","in":"query","type":"string","example":"","required":true,"description":"the resource to get the reports"},{"name":"repositoryId","in":"query","type":"number","example":1,"required":false,"description":"the repositoryId to get the reports"},{"name":"branch","in":"query","type":"string","example":"master","required":false,"description":"the branch to get the reports"},{"name":"days","in":"query","type":"number","example":30,"required":false,"description":"the period to get the reports"}],"responses":{"200":{"description":"Returns all the reports and the metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reports"}}}}}}},"/v2/repositories":{"get":{"summary":"get the paginated list of repositories","description":"Get the paginated list of repositories, totalCount and allows to filter them and order them by column","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the repositories from","example":123,"in":"query","required":true,"type":"number"},{"name":"search","description":"used to search by text","example":"","in":"query","required":false,"type":"string"},{"name":"isPrivate","description":"used to filter by isPrivate (true = t / false = f)","in":"query","type":"string","required":false},{"name":"language","description":"used to filter by language (javascript)","in":"query","required":false,"type":"string"},{"name":"isEnabled","description":"used to filter by enabled/disabled repositories (true = t / false = f)","in":"query","type":"string","required":false},{"name":"isScanned","description":"used to filter by scanned/not scanned repositories (true = t / false = f)","in":"query","type":"string","required":false},{"name":"remark","description":"used to filter by remark/not remark repositories (true = t / false = f)","in":"query","type":"string","required":false},{"name":"limit","description":"Amount of repositories to get per page","in":"query","required":false,"type":"integer"},{"name":"offset","description":"Initial position of the repositories list to get repositories paginated from","in":"query","required":false,"type":"integer"},{"name":"orderBy","description":"sorting parameter with format column, direction (updatedAt, desc)","in":"query","required":false,"type":"string"},{"name":"monorepoId","description":"get all repos descendant and sub-descendant for the repo with this id (238)","in":"query","required":false,"type":"string"},{"name":"useDependencies","description":"Enable the dependencies filters and retrieve the license attribute in the repositories objects","in":"query","example":"f","required":false,"type":"string","default":"f"},{"name":"license","description":"Filter repositories by package license (only when useDependencies is enabled)","in":"query","required":false,"type":"string"},{"name":"pkg_ecosystem","description":"Filter repositories by package ecosystem (only when useDependencies is enabled)","in":"query","required":false,"type":"string","example":"npm"},{"name":"dependency","description":"Filter repositories by dependency (only when useDependencies is enabled)","in":"query","required":false,"type":"string","example":"axios"}],"responses":{"200":{"description":"Successful operation. Returns an array of repositories","content":{"application/json":{"schema":{"type":"object","properties":{"repositories":{"type":"array","items":{"$ref":"#/components/schemas/repository"}},"totalCount":{"type":"string","example":"1"}}}}}}}}},"/v2/repositories/stats":{"get":{"summary":"get stats of scan enabled repositories of an organization within certain days","description":"Get stats of scan enabled repositories of an organization within certain days by providing an accountId and days","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the desired organization","in":"query","required":true,"type":"integer"},{"name":"repositoryIds","description":"comma separated ids of the desired repositories","in":"query","required":false,"type":"string"},{"name":"days","description":"scope of days to calculate stats of the scan enabled repositories of an organization","example":30,"in":"query","required":false,"type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns the organization scan enabled repositories stats corresponding to the given account id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/repoStats"}}}},"404":{"description":"Resource not found . No organization corresponds to the given accountId"}}}},"/v2/repositories/filters":{"get":{"summary":"get list filters applicable for repositories","description":"Get all the filters applicable for all repositories for each repository's master branch.","tags":["Repositories","Filters"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"},{"name":"search","description":"used to search by text","example":"","in":"query","required":false,"type":"string"},{"name":"isPrivate","description":"used to filter by isPrivate (true = t / false = f)","in":"query","type":"string","required":false,"example":"t"},{"name":"language","description":"used to filter by language (javascript)","in":"query","required":false,"type":"string"},{"name":"isEnabled","description":"used to filter by enabled/disabled repositories (true = t / false = f)","in":"query","type":"string","required":false,"example":"t"},{"name":"monorepoId","description":"used to filter by monorepoId (12345)","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"Successful operation. Returns an object including the array of filters applicable to repositories","content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"CSS"},"value":{"type":"string","example":"CSS"}}}}}}}}}}}},"/v2/repositories/migrations":{"get":{"summary":"get all pending migration repository ids","description":"Get all pending migration repository ids","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the desired organization","in":"query","required":true,"type":"integer"},{"name":"repositoryIds","description":"list of repositories to filter","in":"query","required":false,"type":"string"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"number","example":1}}}}}}}}}},"/v2/repositories/{repositoryId}/root":{"get":{"summary":"find root repository of a repository","description":"Find a root repository of a sub repository","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the repositories from","in":"query","required":true,"type":"integer","example":7},{"name":"repositoryId","description":"id of the desired repository","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns the repository corresponding to the given id","content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"$ref":"#/components/schemas/repository"}}}}}},"404":{"description":"Root repository not found."}}}},"/v2/repositories/{repositoryId}":{"get":{"summary":"find a repository","description":"Find a specific repository by providing a repoId.","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the repositories from","in":"query","required":true,"type":"integer","example":7},{"name":"repositoryId","description":"id of the desired repository","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns the repository corresponding to the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/repository"}}}},"404":{"description":"Repository not found."}}},"patch":{"summary":"update a repository","description":"Update a specific repository by providing a repoId and the properties to update.","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to patch a repository from","in":"body","required":true,"type":"integer","example":7},{"name":"isEnabled","description":"used to enable/disable GuardRails for the given repository (true/false)","in":"body","type":"boolean"},{"name":"excludeChildren","description":"used to exclude/include the children repos (true/false)","in":"query","type":"boolean"}],"responses":{"200":{"description":"Successful operation. Returns the updated repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/repository"}}}},"404":{"description":"Repository not found."}}}},"/v2/repositories/{repositoryId}/monorepoConfigs":{"get":{"summary":"get monorepo configuration of a repository","description":"get monorepo configuration of a repository","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the repositories from","in":"query","required":true,"type":"integer","example":7},{"name":"repositoryId","description":"id of the desired repository","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns the monorepo config corresponding to the given id","content":{"application/json":{"schema":{"type":"object","properties":{"monorepoConfig":{"type":"object","properties":{"idMonorepoConfig":{"type":"string","example":"c511bade"},"fkRepository":{"type":"string","example":null},"configuration":{"type":"array","items":{"type":"string","example":"/src"}},"createdAt":{"type":"string","example":"2022-09-29T09:30:37.600Z"}}}}}}}},"404":{"description":"Repository not found."}}}},"/v2/repositories/{repositoryId}/tree":{"get":{"summary":"get repository tree from git providers","description":"get repository tree from git providers","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to get the repositories from","in":"query","required":true,"type":"integer","example":7},{"name":"sha","description":"sha of the current node to get sub folders","in":"query","type":"string","example":"sha"},{"name":"path","description":"path of the current node to get sub folders","in":"query","type":"string"}],"responses":{"200":{"description":"Successful operation. Returns the sub folders of the given sha and path","content":{"application/json":{"schema":{"type":"object","properties":{"tree":{"type":"array","items":{"type":"object","properties":{"sha":{"type":"string","example":"c511bade"},"path":{"type":"string","example":"repository/sub-folder"},"name":{"type":"string","name":"sub-folder"},"gitNodeType":{"type":"string","example":"tree"}}}}}}}}},"404":{"description":"Repository not found."}}}},"/v2/repositories/configuration":{"patch":{"summary":"update the configuration of a repository","description":"Path the configuration of a repository","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to patch the configuration from","in":"query","required":true,"type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"repoId":{"required":true,"type":"integer"},"configuration":{"type":"object","required":true,"properties":{"report":{"type":"object","properties":{"pullRequest":{"type":"object","properties":{"showPublicReposChecks":{"type":"integer","minimum":0,"maximum":1}}}}}}}}}}}},"responses":{"200":{"description":"Successful operation. Returns OK with status 200"},"404":{"description":"Repository not found."}}}},"/v2/repositories/bulk":{"patch":{"summary":"update repositories by a list of ids","description":"Patch the repositories in bulk","tags":["Repositories"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to patch the repositories from","in":"query","required":true,"type":"integer","example":7},{"name":"isEnabled","description":"consider to enable GuardRails for the repositories (true/false)","in":"body","type":"boolean"},{"name":"repositoryIds","description":"comma separated ids of the repositories to bulk update (1,2)","in":"body","type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"repositoryIds":{"type":"string"}}}}}}}},"responses":{"200":{"description":"Successful operation. Returns the array containing the updated repository ids.","content":{"application/json":{"schema":{"type":"array","items":{"type":"number"},"example":[7,10]}}}}}}},"/v2/roles":{"get":{"tags":["Roles"],"summary":"get the list of user roles","description":"Get the list of user roles","produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Response will contain the list of user roles","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/role"}}}}}}}},"/v2/roles/teamRoles":{"get":{"tags":["Roles"],"summary":"get the list of team roles","description":"Get the list of team roles","produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Response will contain the list of team roles","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/teamRole"}}}}}}}},"/v2/rules/listRules":{"get":{"summary":"get the list of GuardRails curated rules","description":"get all GuardRails curated rules","tags":["Rules"],"parameters":[{"name":"accountId","description":"id of the account to get the list of rules","example":9,"in":"query","required":true,"type":"integer"}],"produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List GuardRails curated rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rules"}}}}}}},"/v2/runtime/actions/groupedByRules":{"get":{"tags":["Actions"],"summary":"get all the actions grouped by rules","description":"Get all the actions grouped by rules","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"type":"integer"},{"name":"actionStatus","in":"query","type":"integer","required":true,"example":"APPROVED"},{"name":"actionChangeLogType","in":"query","type":"string","example":"ACTION_CREATED","required":true},{"name":"fromStatus","in":"query","type":"string","example":"MARK_AS_VULNERABILITY"},{"name":"toStatus","in":"query","type":"string","example":"WONT_FIX"},{"name":"engineRuleIds","description":"used to filter by engineRuleIds (1,2)","in":"query","required":false,"type":"string"},{"name":"language","description":"used to filter by language (javascript,go)","in":"query","required":false,"type":"string"},{"name":"severityIds","description":"used to filter by severityIds (high,low)","in":"query","required":false,"type":"string"},{"name":"ruleIds","description":"used to filter by ruleIds (1,2)","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"Response will contain the actions grouped by rules","content":{"application/json":{"schema":{"type":"array","example":[]}}}}}}},"/v2/runtime/actions/{actionId}":{"patch":{"tags":["Actions"],"summary":"update pending action by a given actionId","description":"Patch pending action by a given actionId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to update the action","type":"integer"},{"name":"actionId","in":"path","required":true,"description":"the accountId to update the action","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"],"example":"APPROVED"}}}}}},"responses":{"200":{"description":"Returns the updated action","content":{"application/json":{"schema":{"type":"object","properties":{"idAction":{"type":"number","example":1},"fkAccount":{"type":"number","example":1},"action":{"type":"string","example":"false_positive"},"status":{"type":"string","example":"APPROVED"}}}}}},"400":{"description":"There was no actions to update or Action status must be APPROVED or REJECTED."}}}},"/v2/saml/providers":{"get":{"tags":["Saml Provider"],"summary":"get saml provider for account","description":"Get saml provider","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","required":true,"example":7}],"responses":{"200":{"description":"saml provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/samlProvider"}}}},"404":{"description":"No saml provider found on the account."}}},"post":{"tags":["Saml Provider"],"summary":"create saml provider for account","description":"Create saml provider","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","example":false}}}}}},"responses":{"200":{"description":"created saml provider successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/samlProvider"}}}},"400":{"description":"A saml provider is already registered for the account."}}}},"/v2/saml/providers/{idSamlProvider}":{"patch":{"tags":["Saml Provider"],"summary":"patch saml provider for a given idSamlProvider","description":"Patch saml provider for a given idSamlProvider","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","required":true},{"name":"idSamlProvider","in":"path","description":"id of the saml provider","type":"string","required":true,"example":"60dbb7f7-bb0f-4760-aafb-3cb76efe9bec"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entryPoint":{"type":"string"},"cert":{"type":"string"},"contactEmail":{"type":"string"},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Patched saml provider successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/samlProvider"}}}},"400":{"description":"No saml provider found with this idSamlProvider or The SAML provider with this idSamlProvider doesn't belong to the account with this accountId."}}}},"/v2/saml/user":{"get":{"tags":["Saml User"],"summary":"get saml user","description":"Get saml user associated with the saml jwt token","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"cookie","name":"gr.auth.token","required":true,"type":"string"}],"responses":{"200":{"description":"saml user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/samlUser"}}}}}}},"/v2/saml/user/provider":{"get":{"tags":["Saml User"],"summary":"get saml provider for saml user","description":"Get saml provider associated with saml user","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"cookie","name":"gr.auth.token","required":true,"type":"string"}],"responses":{"200":{"description":"saml provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/samlProvider"}}}}}}},"/v2/saml/user/linked-user":{"put":{"tags":["Saml User"],"summary":"link saml user with a git user","description":"Link saml user with a git user","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"cookie","name":"gr.auth.token","required":true,"type":"string"}],"responses":{"204":{"description":"Returns empty with status 204"}}},"delete":{"tags":["Saml User"],"summary":"unlink saml user from connected git user","description":"Unlink saml user from connected git user","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"cookie","name":"gr.auth.token","required":true,"type":"string"}],"responses":{"204":{"description":"Returns empty with status 204"}}}},"/v2/scans/lastPerRepo":{"get":{"summary":"get the list of properties from last scans","description":"Get details of last scans results of each repositories' default branch","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"accountID to fetch the results for","example":1,"in":"query","required":true,"type":"number"},{"name":"repositoryIds","description":"comma separated list of id of repositories to fetch the results for (1,2)","in":"query","required":false,"type":"string"},{"name":"limit","description":"maximum number of results to be returned for the pagination","in":"query","required":false,"type":"number"}],"responses":{"200":{"description":"Successful operation. Returns an array of scan object with limited properties corresponding to last scan ran on given repos and branches","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/lastScan"}}}}}}}},"/v2/scans/lastPerAsset":{"get":{"summary":"get the list of properties from last asset scans","description":"Get details of last scans results of each assets' default environment","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"accountID to fetch the results for","example":1,"in":"query","required":true,"type":"number"},{"name":"assetIds","description":"comma separated list of id of assets to fetch the results for (1,2)","in":"query","required":false,"type":"string"},{"name":"limit","description":"maximum number of results to be returned for the pagination","in":"query","required":false,"type":"number"}],"responses":{"200":{"description":"Successful operation. Returns an array of scan object with limited properties corresponding to last scan ran on given asset and environments","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/lastAssetScan"}}}}}}}},"/v2/scans":{"get":{"summary":"get the list of scans","description":"Get the list of the scans by account or repositoryIds","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"repositoryIds","description":"array of repository ids for the corresponding scans (1,2)","in":"query","required":false,"type":"string"},{"name":"branch","description":"name of the branch for the corresponding scans (master)","in":"query","required":false,"type":"string"},{"name":"orderBy","description":"sorting parameter with format column,direction (updatedAt, desc)","in":"query","required":false,"type":"string"},{"name":"search","description":"used to search by text","in":"query","required":false,"type":"string"},{"name":"type","description":"scan type (pull, branch)","in":"query","required":false,"type":"string"},{"name":"status","description":"scan status (queued, scanning, success, error, stopped)","in":"query","required":false,"type":"string"},{"name":"sha","description":"sha to filter scans by (b905a6b2576)","in":"query","required":false,"type":"string"},{"name":"hasVulnerabilities","description":"checks vulnerabilities or findings (true/false)","in":"query","required":false,"type":"boolean"},{"name":"excludeChildren","description":"check to exclude/include the children repos (true/false)","in":"query","required":false,"type":"boolean"},{"name":"limit","description":"maximum number of scans to be returned for the pagination","in":"query","required":false,"type":"number"},{"name":"offset","description":"position of the pagination for the first result returned","in":"query","required":false,"type":"number"},{"name":"since","description":"beginning of the chosen timeframe of the query data (2022-01-01)","in":"query","required":false,"type":"date"},{"name":"until","description":"ending of the chosen timeframe of the query data (2022-01-01)","in":"query","required":false,"type":"date"}],"responses":{"200":{"description":"Successful operation. Returns an array of scans filtered by repository and/or branch","content":{"application/json":{"schema":{"type":"object","properties":{"scans":{"type":"array","items":{"$ref":"#/components/schemas/scan"}}}}}}}}}},"/v2/scans/dast":{"get":{"summary":"get the list of dynamic scans","description":"Get the list of the dast scans by asset id","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"assetId","description":"asset id for the corresponding scans","in":"query","required":true,"type":"number"},{"name":"environmentIds","description":"list ids of environment","in":"query","required":false,"type":"string","example":"1,2,3"},{"name":"orderBy","description":"sorting parameter with format column,direction (updatedAt, desc)","in":"query","required":false,"type":"string"},{"name":"search","description":"used to search by asset name or environment url","in":"query","required":false,"type":"string"},{"name":"hasVulnerabilities","description":"checks vulnerabilities or findings (true/false)","in":"query","required":false,"type":"boolean"},{"name":"limit","description":"maximum number of scans to be returned for the pagination","in":"query","required":false,"type":"number"},{"name":"offset","description":"position of the pagination for the first result returned","in":"query","required":false,"type":"number"}],"responses":{"200":{"description":"Successful operation. Returns an array of scans filtered by asset *                  id","content":{"application/json":{"schema":{"type":"object","properties":{"scans":{"type":"array","items":{"$ref":"#/components/schemas/dastScan"}},"totalCount":{"type":"number"}}}}}}}},"post":{"summary":"create a dast scan","description":"create a new scan for a asset's environment","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"environmentId","description":"environment id of the asset","in":"query","required":true,"type":"number"}],"responses":{"200":{"description":"Successful operation. Returns the id of the newly created scan.","content":{"application/json":{"schema":{"type":"object","properties":{"idScan":{"type":"string","example":"newScanId"}}}}}},"400":{"description":"Cannot trigger scan."}}},"put":{"summary":"retrigger a scan for a given scanId","description":"Retrigger a scan for a given scanId","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the applications from","type":"integer"},{"name":"scanId","description":"uuid of the corresponding scan (f63e3c55-dca9)","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"Successful operation. Returns the id of the re-triggered scan.","content":{"application/json":{"schema":{"type":"object","properties":{"idScan":{"type":"string","example":"f63e3c55-dca9"}}}}}},"400":{"description":"Cannot trigger scan."},"404":{"description":"Scan not found."}}}},"/v2/scans/bulk":{"post":{"summary":"create a bulk scan for multiple repositories","description":"Create a bulk scan for multiple repositories","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"excludeChildren","description":"check to exclude/include the children repos (true/false)","in":"query","required":false,"type":"boolean"},{"name":"repositoryIds","description":"for corresponding respositories","in":"body","required":false,"type":"string","example":"300,100"}],"responses":{"200":{"description":"Successful operation. Return the total succeed count.","content":{"application/json":{"schema":{"type":"object","properties":{"succeedCount":{"type":"number","example":3}}}}}}}}},"/v2/scans/stop":{"post":{"summary":"stop a specific in-progress scan","description":"Stop a specific in-progress scan","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"scanId","description":"uuid of the corresponding scan (f63e3c55-dca9)","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"Successful operation. Return the total succeed count."}}}},"/v2/scans/dast/bulk":{"post":{"summary":"create a bulk DAST scan for multiple assets","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":1,"in":"query","required":true,"type":"number"},{"name":"assetIds","in":"body","required":true,"type":"string","example":"1,2"}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","properties":{"succeedCount":{"type":"number","example":1}}}}}},"404":{"description":"Asset name has no default Environment"}}}},"/v2/scans/{repositoryId}":{"post":{"summary":"create a scan","description":"create a new scan for a repository's branch","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"string"},{"name":"branch","description":"name of corresponding branch to scan (master)","in":"query","required":true,"type":"string"},{"name":"excludeChildren","description":"check to exclude/include the children repos (true/false)","in":"query","required":false,"type":"boolean"},{"name":"repositoryId","description":"id of the corresponding repository","example":7,"in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns the id of the newly created scan.","content":{"application/json":{"schema":{"type":"object","properties":{"idScan":{"type":"string","example":"newScanId"},"subRepositoryScanIds":{"type":"array","example":["subRepositoryScanId"]}}}}}},"400":{"description":"Cannot trigger scan. This repository is migrating to a new monorepo structure."},"404":{"description":"Repository not found."}}},"put":{"summary":"retrigger a scan for a given scanId","description":"Retrigger a scan for a given scanId","tags":["Scans"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the applications from","type":"integer"},{"name":"scanId","description":"uuid of the corresponding scan (f63e3c55-dca9)","in":"query","required":true,"type":"string"},{"name":"repositoryId","description":"id of the corresponding repository","example":7,"in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Successful operation. Returns the id of the re-triggered scan.","content":{"application/json":{"schema":{"type":"object","properties":{"idScan":{"type":"string","example":"f63e3c55-dca9"}}}}}},"400":{"description":"Cannot trigger scan. This repository is migrating to a new monorepo structure."},"404":{"description":"Repository not found."}}}},"/v2/severities":{"get":{"summary":"get the list of severities","tags":["Severities"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Successful operation. Returns an array of severities","content":{"application/json":{"schema":{"type":"object","properties":{"severities":{"type":"array","items":{"type":"object","properties":{"idSeverity":"number","name":"string","createdAt":"string","updatedAt":"string"}}}}}}}}}}},"/v2/stats/main":{"get":{"summary":"get the number of issues perRepository, perType, perLanguage and repoStats of an organization","description":"Get the number of issues perRepository, perType, perLanguage and repoStats of an organization","tags":["Stats"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the desired organization","in":"query","required":true,"type":"integer"},{"name":"repositoryId","description":"id of the desired repository","in":"query","required":false,"type":"integer"},{"name":"excludeChildren","example":true,"in":"query","type":"boolean"}],"responses":{"200":{"description":"Successful operation. Returns the number of issues perRepository, perType, perLanguage and repoStats of an organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/statsMain"}}}},"404":{"description":"Resource not found. No organization corresponds to the given accountId"}}}},"/v2/stats/time":{"get":{"summary":"get the number of opened and fixed issues of an organization within certain days","description":"Get the number of opened and fixed issues of an organization or a repository within certain days by providing an accountId, repositoryId and a number of days.","tags":["Stats"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the desired organization","in":"query","required":true,"type":"integer"},{"name":"days","description":"scope of days to get number of opened and fixed issues of an organization and/or a repository","example":30,"in":"query","required":true,"type":"integer"},{"name":"repositoryId","description":"id of the desired repository","in":"query","required":false,"type":"integer"},{"name":"excludeChildren","example":true,"in":"query","type":"boolean"}],"responses":{"200":{"description":"Successful operation. Returns the number of opened and fixed issues of an organization in certain days corresponding to the given account id and days","content":{"application/json":{"schema":{"$ref":"#/components/schemas/statsTime"}}}},"404":{"description":"Resource not found. No organization corresponds to the given accountId"}}}},"/v2/subscription/paymentIntent":{"post":{"summary":"create a payment intent","description":"Create a payment intent for the chargebee subscription flow","tags":["Subscription"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account of the subscription to work with","example":10,"in":"query","required":true,"type":"number"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"number","example":1,"required":true},"interval":{"type":"string","example":"MONTHLY","required":true},"promoCode":{"type":"string","example":"PROMO_CODE"},"checkoutFields":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}}}}}}}},"responses":{"200":{"description":"returns the paymentIntent object","content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","required":true},"created_at":{"type":"number","required":true},"currency_code":{"type":"string","required":true},"customer_id":{"type":"string"},"expires_at":{"type":"number","required":true},"gateway":{"type":"string;","required":false},"gateway_account_id":{"type":"string","required":true},"id":{"type":"string","required":true},"modified_at":{"type":"number","required":true},"object":{"type":"string","required":true},"payment_method_type":{"type":"string","required":false},"status":{"type":"string","required":true},"reference_id":{"type":"string","required":true},"success_url":{"type":"string","required":false},"failure_url":{"type":"string","required":false},"resource_version":{"type":"number","required":false},"updated_at":{"type":"number","required":false}},"example":{"paymentIntent":{"id":"AzZj05TXDkND32Vy...AgqNehQ","status":"inited","amount":53040,"gateway_account_id":"gw_Zn...L","expires_at":1677644160,"payment_method_type":"card","created_at":1677642360,"modified_at":1677642360,"object":"payment_intent","customer_id":"123","currency_code":"USD","gateway":"stripe"}}}}}}}}},"/v2/subscription":{"put":{"summary":"update a subscription","description":"Put the account's subscription","tags":["Subscription"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to update the subscription on","example":10,"in":"query","required":true,"type":"number"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"number","example":1},"interval":{"type":"string","example":"MONTHLY"},"promoCode":{"type":"string","example":"promo-code"},"checkoutFields":{"type":"object","properties":{"paymentMethodId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"}}},"freeTrial":{"type":"string"}}}}}},"responses":{"200":{"description":"returns the updated subscription result","content":{"application/json":{"schema":{"type":"object","properties":{"updated":"boolean","threeDPayment":{"type":"object","properties":{"paymentMethodId":"string","clientSecret":"string"}}},"example":{"updated":true,"threeDPayment":{"paymentMethodId":"","clientSecret":""}}}}}}}},"delete":{"tags":["Subscription"],"summary":"cancel a subscription","description":"Cancel a subscription","content":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to delete","in":"query","type":"integer","required":true,"example":42}],"responses":{"200":{"description":"OK if the subscription is cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":"boolean"},"example":{"cancelled":true}}}}},"400":{"description":"Bad request if you haven't subscribed to a plan yet"}}}},"/v2/subscription/renew":{"post":{"tags":["Subscription"],"summary":"renew a subscription","description":"Renew a subscription","content":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to renew","in":"query","type":"integer","required":true,"example":42}],"responses":{"200":{"description":"OK if the subscription is renewed","content":{"application/json":{"schema":{"type":"object","properties":{"renewed":"boolean"},"example":{"renewed":true}}}}},"400":{"description":"Bad request if you haven't subscribed to a plan yet"}}}},"/v2/subscription/toggle-interval":{"patch":{"tags":["Subscription"],"summary":"toggle interval on the subscription","description":"Toggle interval on the subscription","content":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account to toggle subscription interval","in":"query","type":"integer","required":true,"example":42}],"responses":{"200":{"description":"OK if the subscription interval is toggled","content":{"application/json":{"schema":{"type":"object","properties":{"updated":"boolean"},"example":{"updated":true}}}}},"404":{"description":"Account has no active Subscription associated."}}}},"/v2/subscription/changelogs":{"get":{"summary":"get the changelog for the account's subscription","description":"Returns all saved records of changed made on the account's subscriptions with associated user and plan.","tags":["Subscription"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the account from where to return the changelogs from","example":10,"in":"query","required":true,"type":"number"}],"responses":{"200":{"description":"Successful operation. Returns the list of changelogs objects.","content":{"application/json":{"schema":{"type":"array","items":{"example":{"idSubscriptionChangeLog":1,"subscriptionStatus":"active","scriptionEvent":"created","subscriptionInterval":"monthly","createdAt":"2017-07-21T17:32:28Z","plan":{"idPlan":5,"name":"Free","code":"FREE"},"user":{"login":"test"}},"properties":{"idSubscriptionChangelog":{"type":"int"},"subscriptionStatus":{"type":"string"},"subscriptionEvent":{"type":"string"},"subscriptionInterval":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"plan":{"type":"object","properties":{"idPlan":"integer","name":"string","code":{"type":"string","enum":["FREE","STANDARD","PROFESSIONAL"]}}},"user":{"type":"object","properties":{"login":"string"}}}}}}}}}}},"/v2/teams":{"get":{"tags":["Teams"],"summary":"get the paginated list of teams","description":"Get the paginated list of teams and the total count for an account","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the teams from","type":"integer"},{"name":"search","in":"query","required":false,"description":"used to search teams by their name, username, email","type":"string"},{"name":"department","in":"query","required":false,"description":"used to filter teams by the department","type":"string"},{"name":"limit","in":"query","required":false,"type":"number"},{"name":"offset","in":"query","required":false,"type":"number"}],"responses":{"200":{"description":"Response will contain the list of teams for the current page and the total count","content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"$ref":"#/components/schemas/team"}},"totalCount":{"type":"integer","example":1}}}}}}}},"post":{"tags":["Teams"],"summary":"create a team","description":"Create a team based on the team sent in the request's body","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId that will be the owner of the created team","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/createOrPatchTeam"}}}}}},"responses":{"200":{"description":"Response will contain the created team","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/createdOrUpdatedTeam"}}}}}}}}},"/v2/teams/listFromGitProvider":{"get":{"tags":["Teams"],"summary":"get the list of teams from git providers","description":"Get the list of teams that are not imported to GuardRails","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId that will be the owner of the created team","type":"integer"}],"responses":{"200":{"description":"Response will contain the teams from git provider","content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"$ref":"#/components/schemas/GitProviderTeam"}},"total":{"type":"integer","example":1}}}}}},"400":{"description":"Import teams is currently only available for Github organization accounts."}}}},"/v2/teams/filters":{"get":{"tags":["Teams"],"summary":"get the filters of the teams for an account","description":"Get the filters for the list of teams for an account","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the filters from","type":"integer"},{"name":"search","in":"query","required":false,"description":"used to search by the teams name, username, email","type":"string"},{"name":"departmentId","in":"query","required":false,"description":"used to filter teams by the department","type":"integer"}],"responses":{"200":{"description":"Response will contain the filters for the entire list of teams in the account","content":{"application/json":{"schema":{"type":"object","properties":{"department":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"development"},"value":{"type":"number","example":2}}}}}}}}}}}},"/v2/teams/{teamId}":{"get":{"tags":["Teams"],"summary":"get the team by a given teamId","description":"Get the team for an account by a given teamId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to get the team","type":"integer"}],"responses":{"200":{"description":"Response will contain the team for a given teamId","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/team"}}}},"404":{"description":"Team not found"}}},"patch":{"tags":["Teams"],"summary":"update a team","description":"Update a team based on the team sent in the request's body","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId that will be the owner of the updated team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to update the team","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"patch":{"$ref":"#/components/schemas/createOrPatchTeam"}}}}}},"responses":{"200":{"description":"Response will contain the updated team","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/createdOrUpdatedTeam"}}}}}}}},"delete":{"tags":["Teams"],"summary":"delete team by the teamId","description":"Delete the team for an account by the teamId","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to delete the team","type":"integer"}],"responses":{"200":{"description":"ok if the team was deleted"},"404":{"description":"The team couldn't be found or already deleted"}}}},"/v2/teams/import":{"post":{"tags":["Teams"],"summary":"import git provider teams to GuardRails","description":"Import git provider teams to GuardRails","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId that will be the owner of the created team","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"name":{"type":"string","example":"Frontend"},"memberCount":{"type":"number","example":1},"repositoryCount":{"type":"number","example":1},"children":{"type":"array","example":[]},"slug":{"type":"string","example":"frontend"},"htmlUrl":{"type":"string","example":"html-url"},"description":{"type":"string","example":"frontend team"}}}}}}}}},"responses":{"200":{"description":"Response will contain the import result.","content":{"application/json":{"schema":{"type":"object","properties":{"addedUsers":{"type":"number"},"addedRepositories":{"type":"number"},"addedTeams":{"type":"number"}}}}}},"400":{"description":"Import teams is currently only available for Github organization accounts."}}}},"/v2/teams/{teamId}/applications":{"post":{"tags":["Teams"],"summary":"create the applications of a team by a given teamId and applicationIds","description":"Post the applications of a team by a given teamId and applicationIds","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to create the applications","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationIds":{"type":"array","items":{"type":"number","example":1}}}}}}},"responses":{"200":{"description":"Returns the number of added applications","content":{"application/json":{"schema":{"type":"object","properties":{"addedApplications":{"type":"number","example":3}}}}}},"404":{"description":"The applications couldn't be added. This normally happens when either the Team is not found, the applications do not exist, or the applications were already added."}}},"put":{"tags":["Teams"],"summary":"update the applications of a team by a given teamId and applicationIds","description":"Put the applications of a team by a given teamId and applicationIds","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to update the applications","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationIds":{"type":"array","items":{"type":"number","example":1}}}}}}},"responses":{"200":{"description":"Returns the number of added applications and removed applications","content":{"application/json":{"schema":{"type":"object","properties":{"addedApplications":{"type":"number","example":0},"removedApplications":{"type":"number","example":3}}}}}}}},"delete":{"tags":["Teams"],"summary":"delete the applications of a team by a given teamId and applicationIds","description":"Delete the applications of a team by a given teamId and applicationIds","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to delete the applications","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationIds":{"type":"array","items":{"type":"number","example":1}}}}}}},"responses":{"200":{"description":"Returns the number of removed applications","content":{"application/json":{"schema":{"type":"object","properties":{"removedApplications":{"type":"array"}},"example":{"removedApplications":3}}}}},"404":{"description":"The applications couldn't be removed. This normally happens when either the Team is not found, the applications do not exist, or the applications were already removed."}}}},"/v2/teams/{teamId}/repositories":{"post":{"tags":["Teams"],"summary":"create the repositories of a team by a given teamId and repositoryIds","description":"Post the repositories of a team by a given teamId and repositoryIds","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to create the repositories","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"number","example":1}}}}}}},"responses":{"200":{"description":"Returns the number of added repositories","content":{"application/json":{"schema":{"type":"object","properties":{"addedRepositories":{"type":"number","example":3}}}}}},"404":{"description":"The repositories couldn't be added. This normally happens when either the Team is not found, the repositories do not exist, or the repositories were already added."}}},"put":{"tags":["Teams"],"summary":"update the repositories of a team by a given teamId and repositoryIds","description":"Put the repositories of a team by a given teamId and repositoryIds","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to update the repositories","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"number","example":1}}}}}}},"responses":{"200":{"description":"Returns the number of added repositories and removed repositories","content":{"application/json":{"schema":{"type":"object","properties":{"addedRepositories":{"type":"number","example":0},"removedRepositories":{"type":"number","example":3}}}}}}}},"delete":{"tags":["Teams"],"summary":"delete the repositories of a team by a given teamId and repositoryIds","description":"Delete the repositories of a team by a given teamId and repositoryIds","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to delete the repositories","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"number","example":1}}}}}}},"responses":{"200":{"description":"Returns the number of removed repositories","content":{"application/json":{"schema":{"type":"object","properties":{"removedRepositories":{"type":"number","example":3}}}}}},"404":{"description":"The repositories couldn't be removed. This normally happens when either the Team is not found, the repositories do not exist, or the repositories were already removed."}}}},"/v2/teams/{teamId}/users":{"post":{"tags":["Teams"],"summary":"create the users by a given teamId and users array","description":"Post the users by a given teamId and users array","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to create the users","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/teamUserData"}}}}}}},"responses":{"200":{"description":"Returns the number of added users","content":{"application/json":{"schema":{"type":"object","properties":{"addedUsers":{"type":"number","example":1}}}}}},"404":{"description":"The users couldn't be added. This normally happens when either the Team is not found, the users do not exist, or the users were already added."}}},"put":{"tags":["Teams"],"summary":"update the users by a given teamId and users array","description":"Put the users by a given teamId and users array","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to delete the users","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/teamUserData"}}}}}}},"responses":{"200":{"description":"Returns the number of added users and removed users","content":{"application/json":{"schema":{"type":"object","properties":{"addedUsers":{"type":"array"},"removedUsers":{"type":"array"}},"example":{"addedUsers":1,"removedUsers":0}}}}}}},"patch":{"tags":["Teams"],"summary":"update the users of a team by a given teamId and users array","description":"Patch the users of a team by a given teamId and users array","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to update the users","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/teamUserData"}}}}}}},"responses":{"200":{"description":"Returns the number of updated users","content":{"application/json":{"schema":{"type":"object","properties":{"updatedUsers":{"type":"number","example":1}}}}}},"400":{"description":"You cannot change your own role."},"404":{"description":"The users couldn't be updated. This normally happens when either the Team is not found, the users to be updated aren't part of the team, or the team or role were deleted."}}},"delete":{"tags":["Teams"],"summary":"delete the users by a given teamId and userIds","description":"Delete the users by a given teamId and userIds","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId owner of the team","type":"integer"},{"name":"teamId","in":"path","required":true,"description":"the teamId to delete the users","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"number","example":"e2706cb7-c980"}}}}}}},"responses":{"200":{"description":"Returns the number of removed users","content":{"application/json":{"schema":{"type":"object","properties":{"removedUsers":{"type":"number","example":2}}}}}},"404":{"description":"The users couldn't be removed. This normally happens when either the Team is not found, the users to be removed had been previously deleted, or the users are already removed."}}}},"/v2/template-types":{"get":{"tags":["Scan Template Types"],"summary":"get the list of template types","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the list of template types","type":"integer"}],"responses":{"200":{"description":"Response will contain the list of template types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/templateType"}}}}}}}},"/v2/transactions/latest":{"get":{"tags":["Transactions"],"summary":"get the latest monorepo migrate transaction of a repository","description":"Get the latest monorepo migrate transaction of a repository","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true},{"name":"monorepoConfigId","in":"query","type":"string","required":true,"description":"id of the mono repo configuration"}],"responses":{"200":{"description":"Returns the latest monorepo migrate transaction of a repository","content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"$ref":"#/components/schemas/transaction"}}}}}}}}},"/v2/transactions":{"post":{"tags":["Transactions"],"summary":"create a monorepo migrate transaction","description":"Create a monorepo migrate transaction","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":9,"required":true},{"name":"repositoryId","in":"query","type":"integer","example":42,"required":true,"description":"id of the repository"}],"responses":{"200":{"description":"create a new monorepo migration transaction","content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"$ref":"#/components/schemas/transaction"}}}}}},"400":{"description":"Repository with this repositoryId has no monorepo configs."}}}},"/v2/user/apikey":{"put":{"tags":["User"],"summary":"generate new api key for JWT_TOKEN","description":"Generate a new API key that can then be used for authentication (To generate JWT_TOKEN)","produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Response will contain the new api key that can be used for authenticating","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","example":"7bbc8bf6-9899"}}}}}},"404":{"description":"User not found. Please logout and login to GuardRails to create your user."}}}},"/v2/user/refresh":{"get":{"tags":["User"],"summary":"refresh the user's permissions","description":"Refresh the user's permissions. Used when the installation is created/updated.","content":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Returns an empty response body with status code 204"}}}},"/v2/user/refreshUsers":{"get":{"tags":["User"],"summary":"synchronize the users from the GitProvider","description":"Synchronize the users for an account/organization fetched from the GitProvider to GuardRails in order to be able to fetch them all with GET /v2/users endpoint","content":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Returns an empty response body with status code 204"},"400":{"description":"Refresh users is currently only available for GitHub"}}}},"/v2/user":{"get":{"tags":["User"],"summary":"get the list of users","description":"Get the list of users for the account","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the users from","type":"integer"},{"name":"teamId","in":"query","description":"the teamId of the current accountId","type":"integer"},{"name":"search","in":"query","required":false,"description":"used to search users by their name","type":"string"},{"name":"role","in":"query","required":false,"description":"the role to filter users by","type":"string"},{"name":"limit","in":"query","type":"integer"},{"name":"offset","in":"query","type":"integer"}],"responses":{"200":{"description":"Response will contain the list of users related to the queried account","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/user"}},"totalCount":{"type":"integer","example":1}}}}}}}}},"/v2/user/filters":{"get":{"tags":["User"],"summary":"get the filters for the list of users","description":"Get the filters for the list of users for the account","produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to get the filters of the users from","type":"integer"},{"name":"search","in":"query","required":false,"description":"used to filter down the filters by the user's name","type":"string"},{"name":"role","in":"query","required":false,"description":"used to filter down the filters by the user's role","type":"string"}],"responses":{"200":{"description":"Response will contain the list of filters for the list of users related to the queried account","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"value":"number","text":"string"},"example":{"value":2,"text":"developer"}}}}}}}}}}},"/v2/user/role":{"patch":{"summary":"update users role by a list of userIds","description":"Patch one or more users role in bulk","tags":["User"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","required":true,"description":"the accountId to set the roles on (user's roles are different per account)","type":"integer"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"integer","example":1,"required":true},"userIds":{"type":"array","items":{"type":"string","example":"df1edc20-0ddb","min":1}}}}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"number","example":1}}}}}},"400":{"description":"Invalid role or invalid userIds or insufficient permissions or Only Admins or Owners of an account can change the role of a user to Admin or You cannot change your own role"}}}},"/v2/userEvents/uniqueUsersInPeriod":{"get":{"tags":["UserEvents"],"summary":"get the list of unique users events","description":"Get the list of unique users that had an event that could trigger a scan on GuardRails in the provided period","content":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"query","type":"integer","example":1,"required":true},{"name":"from","in":"query","type":"string","format":"date-time","example":"2022-06-15T10:24:24.084Z","required":false,"description":"Start date of period"},{"name":"to","in":"query","type":"string","format":"date-time","example":"2022-06-15T10:24:24.084Z","required":false,"description":"End date of period"}],"responses":{"200":{"description":"Returns the list of unique users in the provided period","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/UserEvent"}}}}}}}}}},"/v2/userEvents/latestUserActivity":{"get":{"summary":"Get the list of latest user activities","description":"Get the list of latest user activities in provided period of time","tags":["UserEvents"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"},{"name":"search","description":"used to filter by username","in":"query","required":false,"type":"string","example":"chloe"},{"name":"from","description":"beginning of the chosen timeframe of the query data","example":"2022-01-01","in":"query","required":true,"type":"date"},{"name":"to","description":"ending of the chosen timeframe of the query data","in":"query","required":true,"type":"date"},{"name":"limit","in":"query","type":"integer"},{"name":"offset","in":"query","type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns total count and latest user activities","content":{"application/json":{"schema":{"type":"object","properties":{"totalCount":{"type":"number"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserEvent"}}}}}}},"400":{"description":"Bad request for invalid parameters"}}}},"/v2/userEvents/activities":{"get":{"summary":"Get the list of user activities","description":"Get the list of user activities by username in provided period of time","tags":["UserEvents"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"accountId","description":"id of the user's account","example":7,"in":"query","required":true,"type":"integer"},{"name":"username","description":"used to get activities by username","in":"query","required":"ture","type":"string","example":"chloe"},{"name":"from","description":"beginning of the chosen timeframe of the query data","example":"2022-01-01","in":"query","required":true,"type":"date"},{"name":"to","description":"ending of the chosen timeframe of the query data","in":"query","required":true,"type":"date"},{"name":"limit","in":"query","type":"integer"},{"name":"offset","in":"query","type":"integer"}],"responses":{"200":{"description":"Successful operation. Returns list of user activities","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/UserEvent"}}}}}}},"400":{"description":"Bad request for invalid parameters"}}}}},"tags":[]}