ESG
Universes

Universes ESG Events UNGC Statistics

For each universe, this endpoint aggregates all events belonging to its entities and returns the distribution of events by UNGC classification.

GET
https://api.textreveal.com/v3/universes/{universe_id}/esg/events/stats/ungc

Request

Parameters

  • universe_id*uuid

    Unique identifier of the universe.

  • sizeinteger

    Number of records per page

    Default: 10Range: [1, 10000]
  • search_afterstring

    search_after field value from the previous page

  • datedate (operator)

    Filters cases whose last_activity is after the minimum bound and whose start_date is before the maximum bound.

    Example: "between:2022-01-01;2022-01-02"
  • category(string (enum))[]

    Filter by category.

    Values: "E", "S", "G"
  • sub_category(string (enum))[]

    Filter by a sub category.

    Values: "Animal Welfare", "Atmospheric Pollution", "Biodiversity And Ecosystems", "Climate Change", "Energy & Natural Resources Management", "Environmental Misreporting", "Food Waste", "Industrial Accidents & Physical Risk", "Land And Soil ... 
  • contentstring[]

    Search for keywords inside the title and summary.

    Note: symbols are ignored in the query, if you use hello@world, the query will be hello world, accentuated letters are preserved.

    Example: word will match WORD, words and any conjugated forms such as wording.

    However, it will not match keyword. To match both terms, you must add each one separately.

    Example: hard drive will return result mentioning hard drives but also hard disk drives, but will not mention document that match drive only. To match those you'll have to search them separately.

Response

Response - 200

  • data*object[]

    Properties of the events.

  • size*integer

    Number of records per page requested.

    Example: 1
  • has_next*boolean

    True if there are more records available.

    Example: true
  • count*integer

    Number of records returned in the current page.

    Example: 1
  • search_after*string | null

    Cursor for next page.

Response
{
  "data": [
    {
      "entity_id": "f337e172-528e-4808-b46e-be1ad6db7fbb",
      "count": 21,
      "max_ungc_classification": "low risk",
      "ungc_classification": {
        "low risk": 10,
        "watchlist": 4,
        "violator": 7
      }
    }
  ],
  "size": 1,
  "has_next": true,
  "count": 1,
  "search_after": "string"
}

Error

Error - 400

Bad request

  • message*string

    Error message.

    Example: "The server returned an unexpected response"
  • code*integer

    Error code.

    Example: 400
  • reason*string (enum)

    Error reason.

    Values: "invalid", "timeout", "offline", "unknown", "not_found", "unauthorized", "forbidden", "internal", "too_many_requests"
  • errorsobject[]

    Possible error causes, like query params, headers or body.

Response
{
  "message": "The server returned an unexpected response",
  "code": 400,
  "reason": "invalid",
  "errors": [
    {
      "message": "Expected number, received string",
      "field": "size",
      "reason": "invalid_type"
    }
  ]
}

Error - 403

Not authorized

  • message*string
    Example: "Not authorized to access this resource"
  • code*number

    Error code.

  • reason*string
Response
{
  "message": "Not authorized to access this resource",
  "code": 0,
  "reason": "string"
}

Error - 404

No universe found

  • message*string
    Example: "[record] not found."
  • code*number

    Error code.

  • reason*string
Response
{
  "message": "[record] not found.",
  "code": 0,
  "reason": "string"
}