Referencia de la API

Índice de archivos

Buscar en el índice de archivos con paginación y ordenación, o contar las coincidencias de la misma consulta.

Volume scan scheduling

pause → PAUSED · resume → QUEUED

Definiciones de tipos

graphql
type Subscription {
  fileIndexScanProgressUpdated: FileIndexScanProgress!
}

type Query {
  indexedFileCount(query: String!): Long!
  indexedFiles(query: String!, offset: Int!, limit: Int!, sortBy: FileSortBy!): [File!]!
  fileIndexDefaults: FileIndexDefaults!
  fileIndexScanProgress(volumeId: ID): FileIndexScanProgress!
  fileIndexVolumes: [FileIndexVolume!]!
}

type Mutation {
  pauseFileIndex(volumeId: ID): Boolean!
  rebuildFileIndex(volumeId: ID): Boolean!
  resumeFileIndex(volumeId: ID): Boolean!
  setFileIndexVolume(volumeId: ID!, input: FileIndexVolumeInput!): Boolean!
  stopFileIndex(volumeId: ID): Boolean!
}

type File {
	permission: String!
	
	mediaId: ID
	name: String!
	path: String!
	createdAt: Instant
	updatedAt: Instant!
	size: Long!
	isDir: Boolean!
	childCount: Int!
	url: String!
	isSystem: Boolean!
}

type FileIndexDefaults {
	excludedDirs: [String!]!
	excludedNames: [String!]!
	
	excludedProfileDirs: [FileIndexProfileDir!]!
	
	mediaExcludedDirSuffixes: [String!]!
}

enum FileIndexMode {
	UNCONFIGURED
	DISABLED
	ALLOWLIST
	BLOCKLIST
}

type FileIndexProfileDir {
	
	profilesDir: String!
	
	excludedDir: String!
	
	exceptDirs: [String!]!
}

type FileIndexScanProgress {
	volumeId: ID
	indexed: Int!
	pending: Int
	total: Int
	state: FileIndexScanState!
	error: String
}

enum FileIndexScanState {
	IDLE
	QUEUED
	RUNNING
	PAUSED
	STOPPED
	FAILED
}

enum FileIndexScanStatus {
	COMPLETED
	CANCELED
	FAILED
}

type FileIndexVolume {
	id: ID!
	path: String!
	isAvailable: Boolean!
	indexMode: FileIndexMode!
	includedDirs: [String!]!
	excludedDirs: [String!]!
	lastScanAt: Instant
	lastScanStatus: FileIndexScanStatus
	lastScanCount: Long
	lastScanTotal: Long
}

input FileIndexVolumeInput {
	indexMode: FileIndexMode!
	includedDirs: [String!]!
	excludedDirs: [String!]!
}

enum FileSortBy {
	UPDATED_AT_ASC
	UPDATED_AT_DESC
	SIZE_ASC
	SIZE_DESC
	NAME_ASC
	NAME_DESC
}

scalar Instant

scalar Long

Operaciones

subscription

fileIndexScanProgressUpdated

Recibir actualizaciones del progreso de búsqueda del índice de archivos.

graphql
subscription fileIndexScanProgressUpdated {
  fileIndexScanProgressUpdated { volumeId indexed pending total state error }
}
query

indexedFileCount

Contar los archivos indexados que coincidan con la consulta.

graphql
query indexedFileCount($query: String!) {
  indexedFileCount(query: $query)
}
query

indexedFiles

Buscar en el índice de archivos almacenado con paginación y ordenación.

graphql
query indexedFiles($query: String!, $offset: Int!, $limit: Int!, $sortBy: FileSortBy!) {
  indexedFiles(query: $query, offset: $offset, limit: $limit, sortBy: $sortBy) { permission mediaId name path createdAt updatedAt size isDir }
}
mutation

pauseFileIndex

Pausar la búsqueda activa del índice de archivos.

graphql
mutation pauseFileIndex($volumeId: ID) {
  pauseFileIndex(volumeId: $volumeId)
}
mutation

rebuildFileIndex

Reconstruir el índice de archivos de un volumen; si se omite volumeId o es null, se procesan todos los volúmenes configurados.

graphql
mutation rebuildFileIndex($volumeId: ID) {
  rebuildFileIndex(volumeId: $volumeId)
}
mutation

resumeFileIndex

Reanudar una búsqueda pausada del índice de archivos.

graphql
mutation resumeFileIndex($volumeId: ID) {
  resumeFileIndex(volumeId: $volumeId)
}
mutation

setFileIndexVolume

Guardar el modo de indexación y los directorios del volumen y actualizar su índice.

graphql
mutation setFileIndexVolume($volumeId: ID!, $input: FileIndexVolumeInput!) {
  setFileIndexVolume(volumeId: $volumeId, input: $input)
}
mutation

stopFileIndex

Detener la búsqueda activa del índice de archivos.

graphql
mutation stopFileIndex($volumeId: ID) {
  stopFileIndex(volumeId: $volumeId)
}
query

fileIndexDefaults

Consultar la configuración predeterminada del índice de archivos.

graphql
query fileIndexDefaults {
  fileIndexDefaults { excludedDirs excludedNames mediaExcludedDirSuffixes }
}
query

fileIndexScanProgress

Consultar el progreso actual de la búsqueda del índice de archivos.

graphql
query fileIndexScanProgress($volumeId: ID) {
  fileIndexScanProgress(volumeId: $volumeId) { volumeId indexed pending total state error }
}
query

fileIndexVolumes

Consultar los volúmenes registrados en el índice de archivos y su configuración.

graphql
query fileIndexVolumes {
  fileIndexVolumes { id path isAvailable indexMode includedDirs excludedDirs lastScanAt lastScanStatus }
}