Universes Management

Universe Entities Metrics

Get entity metrics for a universe

GET
https://api.textreveal.com/v3/universes/{universe_id}/entities/metrics

Request

Parameters

  • universe_id*uuid

    Unique identifier of the universe.

    Example: "75ebc096-749e-4b8f-b690-df13daf49c62"
  • sector(string (operator))[]

    ISIC4 section code, a single letter from A to U, as returned by the /isic route.

    You can input a section code or use the following operators: eq (=), neq (≠), in, nin (not in)

    Example: eq:C for Manufacturing, in:C;J to filter on several sections

    Example: "eq:hello"

Response

Response - 200

Entity count and UNGC classification distribution

  • count*integer

    Total number of entities

    Minimum: 0
  • ungc_classification*object

    UNGC classification metrics for cases associated with the entities

Response
{
  "count": 123,
  "ungc_classification": {
    "max": "violator",
    "distribution": {
      "low risk": 100,
      "watchlist": 17,
      "violator": 6
    }
  }
}

Error

Error - 400

Bad request

  • message*string

    Error message.

    Example: "Check the errors field for more details"
  • code*number (enum)

    Error code.

    Values: 400
  • reason*string (enum)

    Error reason.

    Values: "invalid"
  • errorsobject[]

    Possible error causes.

Response
{
  "message": "Check the errors field for more details",
  "code": 400,
  "reason": "invalid",
  "errors": [
    {
      "message": "string",
      "field": "sector",
      "reason": "invalid_type"
    }
  ]
}

Error - 404

Not found

  • message*string

    Error message.

    Example: "The requested universe does not exist or is not visible to your company."
  • code*number (enum)

    Error code.

    Values: 404
  • reason*string (enum)

    Error reason.

    Values: "not_found"
Response
{
  "message": "The requested universe does not exist or is not visible to your company.",
  "code": 404,
  "reason": "not_found"
}

Generic errors are not shown, see Errors for more details.