Links

Filter By File Size Range

Filter all content by file size in your Graphlit project.
By specifying the fileSizeRange field in the GraphQL filter object, you can filter your content by a range of file sizes (in bytes). This will only find content marked as the file content type.
For example, here we are filtering on files larger than 3MB in size.
"fileSizeRange": { "from": 3000000 }
You can also filter on a range of file sizes, such as between 1MB and 5MB in size.
"fileSizeRange": { "from": 1000000, "to": 5000000 }

Query:

query QueryContents($filter: ContentFilter!) {
contents(filter: $filter) {
results {
id
name
creationDate
state
owner {
id
}
originalDate
finishedDate
workflowDuration
uri
text
type
fileType
mimeType
fileName
fileSize
masterUri
mezzanineUri
transcriptUri
}
}
}

Variables:

{
"filter": {
"fileSizeRange": {
"from": 3000000
},
"offset": 0,
"limit": 100
}
}

Response:

{
"results": [
{
"type": "FILE",
"originalDate": "2023-06-21T00:44:15Z",
"mimeType": "application/pdf",
"fileType": "DOCUMENT",
"fileName": "Unifying Large Language Models and Knowledge Graphs A Roadmap-2306.08302.pdf",
"fileSize": 3312767,
"masterUri": "https://graphlit20230701d31d9453.blob.core.windows.net/files/7ecc766e-b793-4abc-8b6a-13a9a50ebbac/Unifying%20Large%20Language%20Models%20and%20Knowledge%20Graphs%20A%20Roadmap-2306.08302.pdf",
"mezzanineUri": "https://graphlit20230701d31d9453.blob.core.windows.net/files/7ecc766e-b793-4abc-8b6a-13a9a50ebbac/Mezzanine/Unifying%20Large%20Language%20Models%20and%20Knowledge%20Graphs%20A%20Roadmap-2306.08302.json",
"uri": "https://graphlitplatform.blob.core.windows.net/samples/Unifying%20Large%20Language%20Models%20and%20Knowledge%20Graphs%20A%20Roadmap-2306.08302.pdf",
"id": "7ecc766e-b793-4abc-8b6a-13a9a50ebbac",
"name": "Unifying Large Language Models and Knowledge Graphs A Roadmap-2306.08302.pdf",
"state": "FINISHED",
"creationDate": "2023-07-03T22:07:19Z",
"finishedDate": "2023-07-03T22:34:24Z",
"owner": {
"id": "9422b73d-f8d6-4faf-b7a9-152250c862a4"
}
},
{
"type": "FILE",
"mimeType": "audio/mpeg",
"fileType": "AUDIO",
"fileName": "Unstructured Data is Dark Data Podcast.mp3",
"fileSize": 33008244,
"masterUri": "https://graphlit20230701d31d9453.blob.core.windows.net/files/c0cc103d-467b-43c1-8256-8b99f346d4f3/Unstructured%20Data%20is%20Dark%20Data%20Podcast.mp3",
"mezzanineUri": "https://graphlit20230701d31d9453.blob.core.windows.net/files/c0cc103d-467b-43c1-8256-8b99f346d4f3/Mezzanine/Unstructured%20Data%20is%20Dark%20Data%20Podcast.mp3",
"transcriptUri": "https://graphlit20230701d31d9453.blob.core.windows.net/files/c0cc103d-467b-43c1-8256-8b99f346d4f3/Transcript/Unstructured%20Data%20is%20Dark%20Data%20Podcast.json",
"uri": "https://graphlitplatform.blob.core.windows.net/samples/Unstructured%20Data%20is%20Dark%20Data%20Podcast.mp3",
"id": "c0cc103d-467b-43c1-8256-8b99f346d4f3",
"name": "Unstructured Data is Dark Data Podcast.mp3",
"state": "FINISHED",
"creationDate": "2023-07-03T22:24:50Z",
"finishedDate": "2023-07-03T22:25:46Z",
"workflowDuration": "PT56.2314332S",
"owner": {
"id": "9422b73d-f8d6-4faf-b7a9-152250c862a4"
}
}
]
}
Last modified 6mo ago