Data Retrieval Query Examples
4 minute read
You can use the sample queries in this topic as a starting point to create queries for common reporting tasks and retrieving user and case data.
Run the queries on the Connect API Explorer page.
For information about how to import data from the Connect API Explorer into Microsoft Excel, see Integrate Microsoft Excel with the Connect API.
Note
GraphQL syntax is case-sensitive.Generate a report of enabled users with their last login date
To generate a report of all enabled users with their last login date, run the following query.
query {
users(disabled: false, deleted: false) {
fullName
userName
email
lastLogin
}
}
Generate a report of licensed users by organization
To generate a report of licensed users by organization, run the following query.
query {
users(disabled:false, licenses: {comparison: GreaterThanOrEqualTo, value: 1}) {
fullName
userName
email
companyName
licenses
disabled
organizations {
name
}
}
}
Generate a report of portal management data for client invoices
You can request the data available in the Portal Management Reports section of the application. Portal management reports include the following aggregate data:
- Usage summary data for cases
- Hosted file size data for cases
- User reports
You can create custom invoices for your clients using data from the portal management reports, if you import the data into an application like Microsoft Excel. For example, you can create an invoice that includes the hosted data volumes by case, which you retrieve in a query to the Connect API, multiplied by the hosting fee. As another example, you can create an invoice that includes the number of production pages for a range of dates, which you retrieve in a query, multiplied by the production printing fee.
For more information about the Portal Management Reports section of the application, see Portal Management Reports.
To generate a report of portal management data, run the following query. You can add or remove fields in the query as required, depending on the data that you want to retrieve. You can also include arguments. For example, you can limit the data to a specific date range, or filter the results based on case or organization. Refer to the reference documentation for a full list of the available fields and arguments. For information about how to access the reference documentation, see Reference documentation.
query {
cases {
name
statistics {
metricsAvailability
aggregateBaseDocsUsageSummary
aggregateDatabases
aggregateTotalHostedSize
countOfDocsWithNoContent
countOfDocsWithNoPages
countOfDocsWithNoPagesAndNoContent
countOfDocsWithPagesAndContent
countOfImportDocs
countOfImportJobs
countOfIngestionDocs
countOfIngestionJobs
countOfOcrPages
countOfPredictedDocs
countOfProductionDocs
countOfProductionJobs
countOfProductionPages
countOfTiffedPages
countOfTranslatedDocs
countOfTranslationDocRequests
dtIndexSize
sizeOfAllOtherFolderData
sizeOfArchiveFolderData
sizeOfBaseDocumentsHostedDetails
sizeOfElasticSearchIndex
sizeOfFileTransferData_BatchPrint
sizeOfFileTransferData_cases
sizeOfFileTransferData_dtOptions
sizeOfFileTransferData_dtThesaurus
sizeOfFileTransferData_Export
sizeOfFileTransferData_Import
sizeOfFileTransferData_ingest
sizeOfFileTransferData_Ingest_Temp
sizeOfFileTransferData_Other
sizeOfFileTransferData_Predict
sizeOfFileTransferData_Suppressed
sizeOfFileTransferData_Upload
sizeOfFolderData_BatchPrint
sizeOfFolderData_cases
sizeOfFolderData_dtOptions
sizeOfFolderData_dtThesaurus
sizeOfFolderData_Export
sizeOfFolderData_ImageRepositoryOther
sizeOfFolderData_Import
sizeOfFolderData_ingest
sizeOfFolderData_Ingest_Temp
sizeOfFolderData_Predict
sizeOfFolderData_Suppressed
sizeOfFolderData_Upload
sizeOfImportDocs
sizeOfIngestionDocs
sizeOfIngestionExpandedItems
sizeOfMissingFiles
sizeOfNonDocumentData
sizeOfOrphanFiles
sizeOfRenditionsHostedDetails
}
}
}
Note
The sizeOfElasticSearchIndex stores the audit history records for coding changes and is part of the aggregateTotalHostedSize statistic that returns the sum of sizeofBaseDocumentsHostedDetails, sizeofRenditionsHostedDetails, aggregateDatabases, sizeOfElasticsearchIndex, dtIndexSize, sizeOfNonDocumentData, and sizeOfOrphanFiles.Generate a report of productions in a case
You can request case-level data, such as the productions in a case.
Note
When you query case-level data, you must be assigned to the case to retrieve data.To generate a report of the productions in a case, run a query like the following example. You can include arguments on the productions object. For example, you can filter the results based on production status or production name. Refer to the reference documentation for a full list of the available fields and arguments. For information about how to access the reference documentation, see Reference documentation.
query {
cases(name: "Enron") {
databaseName
productions(status: Locked) {
name
status
docCount
pageCount
beginBates
endBates
}
}
}
For more information about productions, see Introduction to productions.
Query users and their groups within cases
The Connect API Explorer allows you to query information on users and their groups within cases to help manage users and groups across review platforms. You can filter and sort the group data by name, id or userCount
for NumericComparison
. You can also separate the query results by page by using the standard_scroll_parameter
(for example, scroll: {start: 1, limit: 100} ).
Note
To return the users of a specific group, add the user’s node under groups.The following lists the available fields for querying user and group data:
- groups: Object to extract the following field data:
id
name
userCount
timelineDate
quickCode
startPage
users
Sample query:
query cases {
cases(id:5){
name
groups (id: 17 name: "group name" sort: [{ field: Name, dir: Asc }]) {
id
name
userCount
users {
id
name
}
}
}
}
Request data about the custom case statistics
You can request data about the custom statistics in a case by querying the cases {statistics {customStatistics}}
field. To return the most up-to-date values in a case, before you perform the query, you must run a case metrics job or an indexing and enrichment job with the “gather case metrics” option selected.
Sample query:
query {
cases(id: 1) {
statistics {
customStatistics {
name
id
value
extension {
id
}
}
}
}
}
Feedback
Was this page helpful?
Thank you for your feedback.
Thank you for your feedback.