> ## Documentation Index
> Fetch the complete documentation index at: https://docs.taqtile.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GraphQL queries

> Query Manifest data using GraphQL

Use GraphQL queries to retrieve data from the Manifest API. All queries require authentication.

## Asset queries

### Get assets

Retrieve assets with filtering and pagination.

```graphql theme={null}
query {
  assets(
    filters: {
      status: ACTIVE
      locationId: 123
    }
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    name
    tag
    status
    assetClass {
      id
      name
    }
    location {
      id
      name
    }
  }
}
```

### Get single asset

```graphql theme={null}
query {
  asset(id: 123) {
    id
    name
    tag
    description
    status
    assetClass {
      id
      name
    }
  }
}
```

### Search assets

```graphql theme={null}
query {
  assetsSearch(
    search: {
      query: "pump"
      fields: [NAME, TAG]
    }
  ) {
    id
    name
    tag
  }
}
```

## Asset class queries

### Get asset classes

```graphql theme={null}
query {
  assetClasses(
    filters: {
      status: ACTIVE
    }
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    name
    description
    models {
      id
      fileId
    }
  }
}
```

### Get single asset class

```graphql theme={null}
query {
  assetClass(id: 123) {
    id
    name
    description
    frontFace
    models {
      id
      fileId
    }
  }
}
```

## Job queries

### Get jobs

```graphql theme={null}
query {
  jobs(
    filters: {
      status: IN_PROGRESS
      priority: HIGH
    }
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    name
    status
    priority
    assignedUsers {
      id
      firstName
      lastName
    }
    template {
      id
      name
    }
  }
}
```

### Get single job

```graphql theme={null}
query {
  job(id: 123) {
    id
    name
    status
    priority
    startedAt
    completedAt
    steps {
      id
      name
      status
      notes {
        id
        content
      }
    }
  }
}
```

## Template queries

### Get templates

```graphql theme={null}
query {
  templates(
    filters: {
      status: PUBLISHED
    }
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    name
    description
    status
    versions {
      id
      versionName
      state
    }
  }
}
```

### Get single template

```graphql theme={null}
query {
  template(id: 123) {
    id
    name
    description
    currentVersion {
      id
      versionName
      steps {
        id
        name
        order
      }
    }
  }
}
```

## Location queries

### Get locations

```graphql theme={null}
query {
  locations(
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    name
    address
    latitude
    longitude
    parentLocation {
      id
      name
    }
  }
}
```

### Get single location

```graphql theme={null}
query {
  location(id: 123) {
    id
    name
    address
    assets {
      id
      name
    }
  }
}
```

## User queries

### Get users

```graphql theme={null}
query {
  users(
    filters: {
      status: ACTIVE
      role: OPERATOR
    }
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    firstName
    lastName
    email
    roles {
      id
      name
    }
  }
}
```

### Get single user

```graphql theme={null}
query {
  user(id: 123) {
    id
    firstName
    lastName
    email
    status
    roles {
      id
      name
    }
  }
}
```

## Meter queries

### Get meters

```graphql theme={null}
query {
  meters(
    filters: {
      assetClassId: 123
    }
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    name
    evaluationType
    unit {
      id
      name
      symbol
    }
    requirements {
      id
      minValue
      maxValue
    }
  }
}
```

### Get single meter

```graphql theme={null}
query {
  meter(id: 123) {
    id
    name
    evaluationType
    position
    rotation
    measurements {
      id
      value
      timestamp
    }
  }
}
```

## Measurement queries

### Get measurements

```graphql theme={null}
query {
  measurements(
    filters: {
      meterId: 123
      dateRange: {
        from: "2025-01-01"
        to: "2025-12-31"
      }
    }
    pagination: {
      limit: 100
      offset: 0
    }
  ) {
    id
    value
    timestamp
    meter {
      id
      name
    }
  }
}
```

## Organization queries

### Get organizations

```graphql theme={null}
query {
  orgs {
    id
    name
    level
    parentOrg {
      id
      name
    }
    childOrgs {
      id
      name
    }
  }
}
```

### Get organization hierarchy

```graphql theme={null}
query {
  allHierarchy {
    id
    name
    level
    childOrgs {
      id
      name
      level
    }
  }
}
```

### Get active invites for the current user

```graphql theme={null}
query {
  activeInvitesForUser {
    id
    email
    role
    org {
      id
      name
    }
    createdAt
    expiresAt
  }
}
```

### Get active invites for an organization

```graphql theme={null}
query {
  activeInvitesForOrg(orgId: 123) {
    id
    email
    role
    createdAt
    expiresAt
  }
}
```

### Get invite by token

Look up an invite using the token from the invitation email. Useful when rendering an invitation acceptance page.

```graphql theme={null}
query {
  getInviteByToken(token: "INVITE_TOKEN") {
    id
    email
    role
    org {
      id
      name
    }
    expiresAt
  }
}
```

## Folder queries

### Get folder

```graphql theme={null}
query {
  folder(id: 45, orgId: 123) {
    id
    name
    parentId
    ChildFolders {
      id
      name
    }
    Templates {
      id
      name
    }
  }
}
```

### Get folders

Lists folders for an organization. Pass `parentId` to list children of a specific folder; omit it to list all folders.

```graphql theme={null}
query {
  folders(parentId: 12, orgId: 123) {
    id
    name
    parentId
  }
}
```

## Manifest Connect (LiveKit) queries

### Check if a LiveKit room is active

Returns `true` when a LiveKit room exists for the chat with at least one participant. You must be a participant of the chat.

```graphql theme={null}
query {
  checkLiveKitRoom(chatId: 123)
}
```

## Fault queries

### Get faults

```graphql theme={null}
query {
  faults(
    filters: {
      status: OPEN
      assetId: 123
    }
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    description
    status
    createdAt
    resolvedAt
    lastModified
    asset {
      id
      name
    }
  }
}
```

The `lastModified` field returns an ISO 8601 timestamp representing the most recent activity on a fault. It is calculated from the latest of:

* `createdAt`
* `resolvedAt` (if the fault has been resolved)
* The creation date of any associated job

Use `lastModified` to sort or filter faults by recent activity rather than relying on `createdAt` alone.

## Message and chat queries

### Get messages

```graphql theme={null}
query {
  messages(chatId: 123) {
    id
    content
    createdAt
    sender {
      id
      firstName
      lastName
    }
  }
}
```

### Get chats

```graphql theme={null}
query {
  chats {
    id
    name
    type
    participants {
      id
      firstName
      lastName
    }
  }
}
```

## File queries

### Get file IDs

```graphql theme={null}
query {
  fileIds(ids: [123, 456]) {
    id
    fileName
    contentType
    url
    size
  }
}
```

### Get converted files

```graphql theme={null}
query {
  convertedFilesByFilesIds(fileIds: [123, 456]) {
    id
    originalFileId
    convertedFileId
    status
  }
}
```

## Report queries

### Get meter evidence reports

```graphql theme={null}
query {
  metersEvidenceReports(
    filters: {
      status: ACTIVE
    }
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    jobStep {
      id
      name
    }
    meter {
      id
      name
    }
    status
  }
}
```

## Global search

### Search across entities

```graphql theme={null}
query {
  globalSearch(
    input: {
      query: "search term"
      entityTypes: [ASSET, JOB, TEMPLATE]
    }
  ) {
    ... on Asset {
      id
      name
      tag
    }
    ... on Job {
      id
      name
      status
    }
    ... on Template {
      id
      name
      description
    }
  }
}
```

## Personal profile queries

### Get favorite entities

```graphql theme={null}
query {
  favoriteEntities {
    assets {
      id
      name
    }
    templates {
      id
      name
    }
    locations {
      id
      name
    }
  }
}
```

### Get recent activity

```graphql theme={null}
query {
  recentActivity(
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    entityType
    entityId
    action
    timestamp
  }
}
```

## Next steps

* [Mutations](/api-reference/graphql/mutations) - Modify data with mutations
* [Overview](/api-reference/graphql/overview) - GraphQL API overview
