POST
/
public
/
getOrganizationReports
Get reports for an organization
curl --request POST \
  --url https://app.chainpatrol.io/api/v2/public/getOrganizationReports \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "slug": "<string>",
  "limit": 10.5,
  "cursor": 123,
  "status": "TODO",
  "searchQuery": "<string>",
  "reporterQuery": "<string>",
  "excludeAutomation": false,
  "onlyRejected": false,
  "startDate": "<string>",
  "endDate": "<string>"
}'
{
  "reports": [
    {
      "id": 123,
      "title": "<string>",
      "description": "<string>",
      "status": "TODO",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "proposals": [
        {
          "reviewStatus": "PENDING",
          "asset": {
            "id": 123,
            "type": "URL",
            "content": "<string>",
            "status": "UNKNOWN",
            "scans": [
              {
                "id": 123,
                "status": "PENDING",
                "output": "<any>"
              }
            ]
          }
        }
      ],
      "reporter": {
        "id": 123,
        "role": "SUPERUSER",
        "fullName": "<string>",
        "avatarUrl": "<string>"
      },
      "externalReporter": {
        "id": 123,
        "displayName": "<string>",
        "avatarUrl": "<string>",
        "platform": "<string>"
      }
    }
  ],
  "nextCursor": 123
}
This API requires an API key with appropriate permissions. See API Key Documentation for more details.

Pagination

Make sure to use the limit and cursor parameters to paginate through the results.

Filtering

Dates

When filtering by dates you need to provide both the startDate and endDate parameters.

Only Rejected

You can filter for only reports with a rejected proposals by setting the onlyRejected parameter to true. The reports returned will have proposals inside, however not all proposals will be rejected, as a report can have multiple proposals inside, and some may be rejected while others are approved. So you need to look through the data if you want only rejected proposals.

Authorizations

X-API-KEY
string
header
required

Your API key. This is required by most endpoints to access our API programatically. Reach out to us at [email protected] to get an API key for your use.

Body

application/json
slug
string
required
limit
number
required
Required range: 1 <= x <= 20
cursor
number | null
status
enum<string>
Available options:
TODO,
IN_PROGRESS,
CLOSED
searchQuery
string
reporterQuery
string
excludeAutomation
boolean
default:false
onlyRejected
boolean
default:false
startDate
string
endDate
string

Response

Successful response

reports
object[]
required
nextCursor
number | null
required