CG Scanning API V2
latest
  • latest
  • 5.2.0
HomeDocs
HomeDocs
latest
  • latest
  • 5.2.0
  1. Home
  • Getting Started
  • Authentication
  • Common Error Responses
  • Filtering Data
  • Authentication
    • User Confirmation
      • Confirm a User
      • Show confirmation form
    • User Invitation
      • Accept an invitation
      • Pre-Accept invitation check
    • Password Reset
      • Forgot Password
      • Reset Password
    • Impersonation
      • Impersonate user
      • Impersonate user
    • MFA
      • Check 2fa
      • Send SMS OTP
    • Sign in authentication
      POST
    • Sign in with recovery code
      POST
    • Sign out authentication
      DELETE
  • Targets
    • List targets
      GET
    • Create Target
      POST
    • Show a target
      GET
    • Updates a target
      PUT
    • Delete a target
      DELETE
    • Delete targets
      DELETE
  • Scans
    • Scan Histories
      • List of history for a scan
      • History details for a scan
    • Scan Hosts
      • List of hosts for a scan
      • Host details for a scan
    • Scan Vulnerabilities
      • List of vulnerabilities for a scan
      • Show vulnerability details
      • Statistics for a scan
    • List scans
      GET
    • Create Scan
      POST
    • Show a scan
      GET
    • Updates a scan
      PUT
    • Delete a scan
      DELETE
    • Delete scans
      DELETE
    • Start a scan
      POST
    • Stop a scan
      POST
    • List upcoming scans
      GET
    • List recent scans that have been completed
      GET
    • List of the running scans
      GET
    • Create Scan from Wizard
      POST
  • Reports
    • List Reports
    • Show a report
    • Delete a report
    • Delete reports
    • Generates a report file
    • Downloads a report file
    • Check if a report file exists
  • Vulnerabilities
    • List of vulnerabilities
    • Vulnerability details
    • Total Vulnerabilities (widget)
    • Top Vulnerabilities (widget)
    • PCI Compliant (widget)
    • (AI) Send prompt about a given Vulnerability
    • (AI) Chat history about a given Vulnerability
  • Exceptions
    • List Exceptions
    • Create Exception
    • Update Exception
    • Show an exception
    • Delete an exception
    • Show exception details
    • Delete exceptions
    • Activate exceptions
    • Reset exceptions
    • Show the exceptions statistics
  • Schedules
    • List Schedules
    • Create Schedule
    • Updates a schedule
    • Show a schedule
    • Delete a schedule
    • Delete schedules
    • Calculate First Time Schedule Date
    • Calculate Next Schedule Dates
  • Webhooks
    • Deliveries
      • List all deliveries for a webhook
      • Get a delivery for a webhook
    • List all webhooks
    • Create a webhook
    • Show a webhook
    • Update a webhook
    • Delete a webhook
    • Activate a webhook
    • Deactivate a webhook
  • Advanced Reports
    • List Advanced Reports
    • Create an advanced report
    • Show an advanced report
    • Update an advanced report
    • Delete an advanced report
    • Delete advanced reports
    • Generates an advanced report file
    • Downloads an advanced report file
  • Audit
    • Get all events
    • Get event by id
  • Notifications
    • List Notifications
    • Show a notification
    • Delete a notification
    • Mark as read a notification
    • Mark as seen a notification
    • Mark as read all notifications
    • Mark as seen all notifications
  • Hosts
    • List of hosts
    • Host details
    • List of most vulnerable hosts
  • Scanners
    • List scanners
    • Create scanner
    • Show scanner
    • Update scanner
    • Delete scanner
    • List activated scanners
    • Activate scanner
    • Deactivate scanner
    • Update scanner app type
    • Assign a scanner to an organization
    • Verify a scanner
  • Port Lists
    • List port lists
    • Create a port list
    • Show a port list
    • Update a port list
    • Delete a port list
    • List activated port lists
    • Add a port range to a port list
    • Delete a port range to a port list
    • Activate a port list
    • Deactivate a port list
    • Updates the app_type of a port list
    • Sync the a port lists
  • User
    • User 2FA
      • Enable 2FA
      • Verify 2FA installation
      • Disable 2FA
      • Lookup phone number
      • Default 2FA method
      • Generate Recovery Codes
      • Get Recovery Codes
    • User Preferences
      • Get users notification preferences
      • Change users product
      • Enable user's event notification preference
      • Disable user's event notification preference
    • Get current user
    • Update current user
    • Change current user password
    • Get current user active plans (Not implemented yet)
    • Get organization members
    • Get current user products
    • Get current organization
    • Update current organization
    • Get subscriptions history
    • Change users product
    • Checks if authorization token is valid
    • Get current user permissions
    • Check if the user can be deleted
    • Delete my account
    • Generates a new access token
    • Revokes the current access token
    • (Admin) Transfers all the resources from the user to another user
  • Organizations
    • Organization Subscriptions
      • Retrieves all subscriptions of organization
      • Retrieves all active subscriptions of organization
      • Show a subscription of organization
      • 'Update organization's subscription'
      • Assign features to a subscription
      • Revoke features from a subscription
    • Subscribe to a plan
    • List organizations
    • Create Organization
    • List dependent subscriptions
    • Retrieve an organization
    • Update an organization
    • Delete an organization
    • Subscribe an organization to a plan
    • Unsubscribe an organization from a plan
    • Change users Organization
    • Export organizations
  • Users
    • List Users
    • Create User
    • Show User
    • Update User
    • Delete a User
    • Create Customer
    • Invite User
    • Resend Confirmation Instructions
    • Import Users
    • Check if a user can be deleted
    • Inherit all the resources from a user
    • Export all users to a CSV file
    • Set partner
    • Unset partner
  • Whitelabel Settings
    • Show the white label settings
    • Show the white label settings
    • Update white label settings
  1. Home

Filtering Data

This API provides a flexible and powerful way to filter and retrieve data from your resources. Whether you need to search for specific records, narrow down results by date, sort the data, or paginate through the results, we have you covered with a variety of filtering options.

Search By#

Parameter: q[column]
Description: Use the q parameter to perform searches based on specific columns within your dataset. Simply specify the column you want to search and provide a search value.
Example: To search for records with a name containing 'test', use q[name]='test*'. To search for records with hosts in the range '192.168.', use q[hosts]='192.168.*'.

Date Ranges#

Simple Date Range#

Parameters: date_range_start, date_range_end
Description: Filter records by specifying a specific date range. Use date_range_start to set the start date and date_range_end to set the end date, both in the format YYYY-MM-DD hh:mm:ss.

Relative Date Range#

Parameter: relative_date_range
Description: Filter records based on a relative date range. Choose from a variety of time units, including seconds (s), minutes (m), hours (h), days (d), months (M), years (y), and quarters (q).
Example: To get results for the last 10 days, use 10d. To retrieve records from the first quarter of 2020, use 1q2020.

Sorted By#

Parameters: sort_by
Description: Sort your results based on specific columns and in either ascending (asc) or descending (desc) order.
Example: To sort by the column_name in ascending order, use sort_by=column_name_asc. To sort in descending order, use sort_by=column_name_desc.

Pagination#

Parameters: page, per_page
Description: Manage the presentation of your results through pagination. Use page to specify the current page number and per_page to set the number of results per page. Max per_page is 100. Default per_page is 10 and page 1.
Example: To retrieve the second page of results with 20 records per page, use page=2 and per_page=20.
With these filtering options, you can tailor your API requests to suit your specific data retrieval needs, making it easy to find and retrieve the information you require efficiently and accurately.
Modified at 2025-04-24 11:02:29
Previous
Common Error Responses
Next
Confirm a User
Built with