File path sensors · GraphQL query

endpointPathEntrySearch query

Checks whether an exact file path exists on an Endpoint, checking the collected paths of every PathSensor on the endpoint (every EndpointPath found on it). The given path must equal a collected path exactly (case-sensitive); one match is returned per sensor that collected it, so sensors with overlapping scopes can each contribute a match for the same file. An empty result (total 0) means no sensor has collected the path. No file data is read — each match names the path, when its record was last stored, and the owning EndpointPath; retrieve the file's stat record and collected bytes with endpointPathEntryStats and endpointPathEntryContents using the match's EndpointPath id.

Response

Returns an EndpointPathEntrySearchPayload!

Arguments

Name Description
endpointId - ID! The Endpoint identifier.
path - String! The absolute file path to check for, exactly as reported by the endpoint. Must be non-empty.
limit - Int Maximum number of matches to return. Default = 100
skip - Int Number of matches to skip. Default = 0
mockOptions - MockDataInput

Options for mock data generation. Options supported: key: "PLATFORM", value: OsPlatform

example: "mockOptions": { "options": [ { "key": "PLATFORM", "value": "WINDOWS" } ] }

Example

Query

query endpointPathEntrySearch(
  $endpointId: ID!,
  $path: String!,
  $limit: Int,
  $skip: Int,
  $mockOptions: MockDataInput
) {
  endpointPathEntrySearch(
    endpointId: $endpointId,
    path: $path,
    limit: $limit,
    skip: $skip,
    mockOptions: $mockOptions
  ) {
    nodes {
      endpointPath {
        ...EndpointPathFragment
      }
      entry {
        ...EndpointPathEntryFragment
      }
      stats {
        ...EndpointPathEntryStatsFragment
      }
      contents {
        ...EndpointPathEntryContentsFragment
      }
    }
    total
  }
}

Variables

{
  "endpointId": 4,
  "path": "xyz789",
  "limit": 100,
  "skip": 0,
  "mockOptions": MockDataInput
}

Response

{
  "data": {
    "endpointPathEntrySearch": {
      "nodes": [EndpointPathEntrySearchMatch],
      "total": 987
    }
  }
}