Skip to content

Beta
Flag observations

Request

Flags observations for follow-up using filter criteria. Returns counts of newly-flagged and already-flagged observations.

Bodyapplication/jsonrequired

Identifies observations to flag using either an explicit ORN list or filter expressions.

filtersArray of objects(PublicFilter)required

Filter expressions identifying the observations to flag. Used when observation_orns is empty; ignored when observation_orns is non-empty.

observationOrnsArray of stringsrequired

Explicit ORNs (format: orn:<version>:observation:<view>:<key>:<view-owner-domain>) of the observations to flag. When non-empty, the server flags exactly these observations and ignores filters. When empty, the server falls back to selecting observations via filters.

POST
/public/v1/observations/actions/flag
curl -i -X POST \
  https://docs.titanapi.securityscorecard.io/_mock/openapi.public/public/v1/observations/actions/flag \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": [
      {
        "list": {
          "operator": "OPERATOR_UNSPECIFIED",
          "isNegated": true,
          "filters": [
            {}
          ]
        },
        "rule": {
          "field": {
            "observationsField": "OBSERVATIONS_FIELD_UNSPECIFIED"
          },
          "comparison": "COMPARISON_UNSPECIFIED",
          "value": {
            "stringValue": "string",
            "numberValue": 0.1,
            "boolValue": true,
            "stringListValue": {
              "values": [
                "string"
              ]
            },
            "numberRangeValue": {
              "min": 0.1,
              "max": 0.1
            },
            "dateRangeValue": {
              "startTime": "2019-08-24T14:15:22Z",
              "endTime": "2019-08-24T14:15:22Z",
              "live": true
            },
            "dateValue": "2019-08-24T14:15:22Z"
          }
        }
      }
    ],
    "observationOrns": [
      "string"
    ]
  }'

Responses

A successful response.

Bodyapplication/json
flaggedCountinteger, (int32)required

Number of observations that were newly flagged by this request.

alreadyFlaggedCountinteger, (int32)required

Number of observations that were already flagged before this request.

Response
{ "flaggedCount": 0, "alreadyFlaggedCount": 0 }