Links
Comment on page

Projects

Update and get project details.

Overview

In Graphlit, projects are your repository for content, and their knowledge extracted via AI.
When you create a project in the Developer Portal, we create a Preview and Production environment. Each environment is accessible via this Graphlit Data API, using separate JWT credentials. No data is shared between the Preview and Production environments.
Through the Data API, you can access all the content in a project's environment.
Graphlit doesn't use the term environment in the Data API, so your applications or services will only reference the project object in the data model.
Update Project
The updateProject mutation allows you to specify the default content workflow and/or the default specification to be utilized by the project. The default workflow is used by feeds and content mutations, when no other workflow has been assigned. The default specification is used by conversations, when no other specification has been assigned.
Mutation:
mutation UpdateProject($project: ProjectUpdateInput!) {
updateProject(project: $project) {
id
name
}
}
Variables:
{
"project": {
"workflow": {
"id": "3b1eefd1-4f3f-4f1c-8a58-ed2ae972da4d"
},
"specification": {
"id": "1bf26859-c9c8-4361-8c60-0fac0dee6985"
}
}
}
Response:
{
"id": "530a3721-3273-44b4-bff4-e87218143164",
"name": "Graphlit: Demo Project [Preview]"
}
Get Project
The project query allows you to retrieve specific details of a project, including the ID, name, creation date, modified date, state and cloud platform and region associated with the project.
This query requires no parameters, because it uses the environment-id specified in the JWT to reference the project.
Query:
query Project {
project {
id
name
creationDate
modifiedDate
state
environmentType
platform
region
}
}
Response:
{
"environmentType": "DEVELOPMENT",
"platform": "AZURE",
"region": "southcentralus",
"id": "9422b73d-f8d6-4faf-b7a9-152250c862a4",
"name": "Preview",
"state": "ENABLED",
"creationDate": "2023-07-01T01:36:40Z",
"modifiedDate": "2023-07-01T01:37:33Z"
}
Get Project Storage Usage
The project storage usage query allows you to retrieve specific details of a project, including the ID, name, and current storage usage associated with the project.
This query requires no parameters, because it uses the environment-id specified in the JWT to reference the project.
This provides the count of content in the project, the totalSize and originalTotalSize, as well as a faceted breakdown by content and file types.
Original total size is the sum of the original file sizes, i.e. the size of the ingested files or HTML web pages. Total size is the sum of the original file sizes, plus any renditions generated during workflow processing.
Renditions are derived versions of source files, like a transcript generated from an audio recording, or the paragraph-segmented text extracted from a web page.
Query:
query Project {
project {
id
name
storage {
video {
count
originalTotalSize
totalSize
}
audio {
count
originalTotalSize
totalSize
}
image {
count
originalTotalSize
totalSize
}
animation {
count
originalTotalSize
totalSize
}
document {
count
originalTotalSize
totalSize
}
drawing {
count
originalTotalSize
totalSize
}
shape {
count
originalTotalSize
totalSize
}
data {
count
originalTotalSize
totalSize
}
geometry {
count
originalTotalSize
totalSize
}
pointCloud {
count
originalTotalSize
totalSize
}
package {
count
originalTotalSize
totalSize
}
unknown {
count
originalTotalSize
totalSize
}
file {
count
originalTotalSize
totalSize
}
page {
count
originalTotalSize
totalSize
}
message {
count
originalTotalSize
totalSize
}
post {
count
originalTotalSize
totalSize
}
email {
count
originalTotalSize
totalSize
}
event {
count
originalTotalSize
totalSize
}
count
originalTotalSize
totalSize
}
}
}
Response:
{
"storage": {
"count": 1,
"originalTotalSize": 30109,
"totalSize": 42041,
"video": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"audio": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"image": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"animation": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"document": {
"count": 1,
"originalTotalSize": 30109,
"totalSize": 30109
},
"drawing": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"shape": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"data": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 11932
},
"geometry": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"pointCloud": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"package": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"unknown": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"file": {
"count": 1,
"originalTotalSize": 30109,
"totalSize": 42041
},
"page": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"message": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"post": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"email": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
},
"event": {
"count": 0,
"originalTotalSize": 0,
"totalSize": 0
}
},
"id": "9422b73d-f8d6-4faf-b7a9-152250c862a4",
"name": "Preview"
}