openapi: 3.1.0 info: title: PDCP agents configurations API version: '1.0' summary: ProjectDiscovery Cloud Platform description: For more details, checkout https://docs.projectdiscovery.io/api-reference/editor/scan servers: - url: https://api.projectdiscovery.io description: Production - url: https://api.dev.projectdiscovery.io description: Development - url: http://localhost:8085 description: Localhost security: - X-API-Key: [] tags: - name: configurations paths: /v1/scans/config: get: summary: Get Configs List tags: - configurations responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/ConfigResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '403': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: get-v1-scans-config parameters: - schema: enum: - scan - reporting - template - alerting - cloudlist - subfinder - remediation - vuln_score type: string in: query name: type description: filter by the type of config - schema: type: string in: query name: search description: search by config name - schema: type: integer in: query name: limit description: The numbers of items to return - schema: type: integer in: query description: The number of items to skip before starting to collect the result set name: offset - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id security: - X-API-Key: [] description: Get user scan configurations list post: summary: Add Config operationId: post-v1-scans-config tags: - configurations responses: '200': $ref: '#/components/responses/PostScanConfigResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '403': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' requestBody: content: application/json: schema: type: object properties: config: type: string config_type: $ref: '#/components/schemas/ConfigTypeEnum' name: type: string global: type: boolean oauth_config_id: type: string description: ID of existing OAuth config to update with the complete configuration required: - config - name security: - X-API-Key: [] description: Add a new scan configuration parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id /v1/scans/config/{config_id}: parameters: - schema: type: string name: config_id in: path required: true get: summary: Get Config tags: - configurations responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ConfigResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '403': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: get-v1-scans-config-config_id security: - X-API-Key: [] description: Get a scan configuration parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id - schema: type: boolean in: query name: config_json description: config is in json format patch: summary: Update Config operationId: patch-v1-scans-config-config_id tags: - configurations responses: '200': $ref: '#/components/responses/PostScanConfigResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '403': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' requestBody: content: application/json: schema: type: object properties: name: type: string config: type: string global: type: boolean security: - X-API-Key: [] description: Update existing scan configuration parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id - schema: type: boolean in: query description: Specify payload is in json name: config_json delete: summary: Delete Config operationId: delete-v1-scans-config-config_id tags: - configurations responses: '200': $ref: '#/components/responses/MessageResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '403': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' security: - X-API-Key: [] description: Delete scan configuration parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id /v1/scans/config/verify: post: summary: Verify Config tags: - configurations responses: '200': $ref: '#/components/responses/VerifyConfigResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: post-v1-scans-config-verify requestBody: $ref: '#/components/requestBodies/VerifyConfigRequest' security: - X-API-Key: [] description: Verify scan configuration parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id /v1/scans/config/verify/contents: post: summary: Get Verify Config Contents tags: - configurations responses: '200': $ref: '#/components/responses/VerifyConfigContentsResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: post-v1-scans-config-verify-contents requestBody: $ref: '#/components/requestBodies/VerifyConfigContentsRequest' security: - X-API-Key: [] description: Get Verify scan configuration contents parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id - schema: type: string in: query description: Jira Project ID to fetch details for name: project_id - schema: type: string in: query description: Linear Team ID to fetch details for name: team_id - schema: type: string in: query description: Specific Jira cloud ID when multiple clouds are available name: cloud_id /v1/scans/config/exclude: parameters: [] get: summary: Get excluded templates tags: - configurations responses: '200': $ref: '#/components/responses/ExcludedTemplateResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: get-scans-config-exclude parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id security: - X-API-Key: [] description: Get excluded templates post: summary: Add excluded templates and targets operationId: post-scans-config-exclude responses: '200': $ref: '#/components/responses/MessageResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' tags: - configurations parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id requestBody: $ref: '#/components/requestBodies/ExcludeConfigRequest' security: - X-API-Key: [] description: Add excluded templates or targets delete: summary: Delete excluded templates or targets by ids operationId: delete-scans-config-exclude responses: '200': $ref: '#/components/responses/MessageResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' tags: - configurations parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id requestBody: $ref: '#/components/requestBodies/DeleteExcludedConfigRequest' security: - X-API-Key: [] description: Delete excluded templates or targets by ids /v1/scans/config/severity: get: summary: Get custom severity mappings tags: - configurations responses: '200': $ref: '#/components/responses/GetSeverityConfigResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '404': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: get-v1-scans-config-severity parameters: - schema: type: string in: header name: X-Team-Id description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' post: summary: Add custom severity mapping tags: - configurations responses: '200': $ref: '#/components/responses/PostSeverityConfigResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '404': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: post-v1-scans-config-severity parameters: - schema: type: string in: header description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' name: X-Team-Id requestBody: $ref: '#/components/requestBodies/AddCustomSeverityMappingRequest' delete: summary: Delete custom severity mapping tags: - configurations responses: '200': $ref: '#/components/responses/MessageResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '404': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: delete-v1-scans-config-severity parameters: - schema: type: string in: header name: X-Team-Id description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' requestBody: $ref: '#/components/requestBodies/DeleteCustomSeverityMappingRequest' /v1/scans/config/{config_id}/severity: parameters: - schema: type: integer format: int64 name: config_id in: path required: true patch: summary: Modify custom severity mapping tags: - configurations responses: '200': $ref: '#/components/responses/MessageResponse' '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '404': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' operationId: patch-v1-scans-config-config_id-severity parameters: - schema: type: string in: header name: X-Team-Id description: 'Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team' requestBody: $ref: '#/components/requestBodies/AddCustomSeverityMappingRequest' components: schemas: VerifyConfigContentsRequestProvider: title: VerifyConfigContentsRequestProvider type: string enum: - jira - linear ExcludeConfigRequestType: title: ExcludeConfigRequestType type: string enum: - scan_target - template - enumeration_target LinearVerifyContentItem: title: LinearVerifyContentItem type: object properties: team_id: type: string team_name: type: string open_states: type: array items: type: object $ref: '#/components/schemas/LinearVerifyContentItemOpenState' required: - team_id - team_name - open_states JiraField: title: JiraField type: object properties: id: type: string name: type: string field_type: type: string required: - id - name - field_type ConfigTypeEnum: title: ConfigTypeEnum type: string enum: - scan - reporting - template - alerting - cloudlist - subfinder JiraVerifyContentItem: title: JiraVerifyContentItem type: object properties: project_id: type: string cloud_id: type: object properties: id: type: string name: type: string url: type: string required: - id - name - url project_name: type: string issue_types: type: array items: type: object $ref: '#/components/schemas/JiraVerifyContentItemIssueType' fields: type: array items: type: object $ref: '#/components/schemas/JiraField' required: - project_id - project_name - issue_types JiraVerifyContentItemIssueType: title: JiraVerifyContentItemIssueType type: object properties: id: type: string name: type: string statuses: type: array items: type: string required: - id - name LinearVerifyContentItemOpenState: title: LinearVerifyContentItemOpenState type: object properties: id: type: string name: type: string required: - id - name CustomSeverityMapping: title: CustomSeverityMapping type: object required: - id - template_id - original_severity - custom_severity - created_at - updated_at properties: id: type: integer format: int64 template_id: type: string original_severity: type: string custom_severity: type: string vuln_id: type: string created_at: type: string format: date-time updated_at: type: string format: date-time ConfigResponse: title: ConfigResponse type: object properties: id: type: string config: type: string config_type: $ref: '#/components/schemas/ConfigTypeEnum' name: type: string read_only: type: boolean global: type: boolean provider_name: type: string created_at: type: string format: date-time updated_at: type: string format: date-time required: - id - config - config_type - name - created_at - updated_at ExcludedTemplate: title: Excluded Templates and targets type: object properties: id: type: integer format: int64 value: type: string exclude_type: $ref: '#/components/schemas/ExcludeConfigRequestType' scan_id: type: string description: Optional scan ID if this rule is scoped to a specific scan enumeration_id: type: string description: Optional enumeration ID if this rule is scoped to a specific enumeration created_at: type: string format: date-time updated_at: type: string format: date-time required: - id - value - exclude_type - created_at - updated_at requestBodies: VerifyConfigRequest: content: application/json: schema: type: object required: - config properties: config: type: string config_type: type: string oauth_config_id: type: string DeleteExcludedConfigRequest: content: application/json: schema: type: object required: - ids properties: ids: type: array items: type: integer format: int64 ExcludeConfigRequest: content: application/json: schema: type: object required: - values - exclude_type properties: values: type: array items: type: string scan_ids: type: array items: type: string description: Optional scan IDs to scope these rules to specific scans. If not provided, rules apply globally. enumeration_ids: type: array items: type: string description: Optional enumeration IDs to scope these rules to specific enumerations. If not provided, rules apply globally. exclude_type: $ref: '#/components/schemas/ExcludeConfigRequestType' VerifyConfigContentsRequest: content: application/json: schema: type: object properties: config: type: string config_type: type: string provider: $ref: '#/components/schemas/VerifyConfigContentsRequestProvider' oauth_config_id: type: string AddCustomSeverityMappingRequest: content: application/json: schema: type: object required: - template_id - custom_severity properties: template_id: type: string custom_severity: type: string vuln_id: type: string DeleteCustomSeverityMappingRequest: content: application/json: schema: type: object required: - ids properties: ids: type: array items: type: integer format: int64 responses: GetSeverityConfigResponse: description: Example response content: application/json: schema: type: object required: - custom_severity_mappings properties: custom_severity_mappings: type: array items: $ref: '#/components/schemas/CustomSeverityMapping' ErrorResponse: description: Example response content: application/json: schema: type: object required: - message properties: message: type: string kind: type: string code: type: string error: type: string error_id: type: string param: type: string status: type: integer PostScanConfigResponse: description: Example response content: application/json: schema: type: object required: - message properties: id: type: string message: type: string VerifyConfigResponse: description: Example response content: application/json: schema: type: object required: - is_verified - response properties: is_verified: type: boolean response: type: string event: type: object VerifyConfigContentsResponse: description: Example response content: application/json: schema: type: object properties: jira: type: array items: type: object $ref: '#/components/schemas/JiraVerifyContentItem' linear: type: array items: type: object $ref: '#/components/schemas/LinearVerifyContentItem' MessageResponse: description: Example response content: application/json: schema: type: object required: - message properties: message: type: string ExcludedTemplateResponse: description: Example response content: application/json: schema: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/ExcludedTemplate' PostSeverityConfigResponse: description: Example response content: application/json: schema: type: object required: - message - id properties: id: type: integer format: int64 message: type: string securitySchemes: X-API-Key: name: X-API-Key type: apiKey in: header x-internal: false