{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/AccessLogEntry/v1/schema.json",
  "title": "AccessLogEntry",
  "description": "Objects Grid AccessLogEntry Object.",
  "type": "object",
  "properties": {
    "organizationAccountID": {
      "type": "string"
    },
    "serviceID": {
      "type": "string"
    },
    "serviceVersion": {
      "type": "string"
    },
    "operationID": {
      "type": "string"
    },
    "correlationID": {
      "type": "string"
    },
    "principalID": {
      "type": "string"
    },
    "sessionID": {
      "type": "string"
    },
    "remoteAddr": {
      "type": "string"
    },
    "userAgent": {
      "type": "string"
    },
    "requestDateTime": {
      "type": "string",
      "format": "date-time"
    },
    "accessPoint": {
      "type": "string"
    },
    "environment": {
      "type": "string"
    },
    "requestURL": {
      "type": "string"
    },
    "httpMethod": {
      "type": "string"
    },
    "responseDateTime": {
      "type": "string",
      "format": "date-time"
    },
    "responseCode": {
      "type": "integer"
    },
    "billableRequests": {
      "type": "integer",
      "minimum": 0,
      "description": "How many requests this one counted against the spending cap and the month's usage: 1 for most, one per object created for a batch create, 0 when free (a response of 500 or above, 401, 403 or 429, a token request, or a GraphQL request's further calls)"
    },
    "responseTimeNanoseconds": {
      "type": "integer",
      "minimum": 0
    },
    "objectsAccessGranted": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ObjectInfo"
      }
    },
    "objectsAccessDenied": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ObjectInfo"
      }
    },
    "abacPolicy": {
      "$ref": "#/$defs/ObjectInfo",
      "description": "The ABAC policy the request's access decisions used, with its objectVersion; absent when no policy was evaluated, as for administrators"
    }
  },
  "$defs": {
    "ObjectInfo": {
      "type": "object",
      "properties": {
        "objectID": {
          "type": "string"
        },
        "objectType": {
          "type": "string"
        },
        "namespace": {
          "type": "string"
        },
        "objectVersion": {
          "type": "integer",
          "description": "The version of the object accessed: its meta.objectVersion"
        },
        "deleted": {
          "type": "boolean"
        },
        "tags": {
          "type": "array",
          "items": {
            "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Tag/v1/schema.json"
          }
        },
        "redactedFields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The fields of the object the request did not return because the ABAC policy hides them from the subject"
        }
      }
    }
  }
}
