Graphlit Platform
Developer PortalChangelogPlatform StatusMore InformationJoin Discord
  • Graphlit Platform
    • What is Graphlit?
    • Key Concepts
  • Getting Started
    • Sign up for Graphlit
    • Create Graphlit Project
    • For Python Developers
    • For Node.js Developers
    • For .NET Developers
  • 🚀Quickstart
    • Next.js applications
      • GitHub Code
    • Python applications
      • GitHub Code
  • Graphlit Data API
    • API Usage
      • API Endpoints
      • API Authentication
      • API Explorer
      • GraphQL 101
    • API Reference
      • Content
        • Ingest With Workflow
        • Ingest File
        • Ingest Encoded File
        • Ingest Web Page
        • Ingest Text
        • Semantic Search
          • Query All Content
          • Query Facets
          • Query By Name
          • Filter By Contents
        • Metadata Filtering
          • Filter By Observations
          • Filter By Feeds
          • Filter By Collections
          • Filter By Content Type
          • Filter By File Type
          • Filter By File Size Range
          • Filter By Date Range
        • Summarize Contents
        • Extract Contents
        • Publish Contents
      • Knowledge Graph
        • Labels
        • Categories
        • Persons
        • Organizations
        • Places
        • Events
        • Products
        • Repos
        • Software
      • Collections
      • Feeds
        • Create Feed With Workflow
        • Create RSS Feed
        • Create Podcast Feed
        • Create Web Feed
        • Create Web Search Feed
        • Create Reddit Feed
        • Create Notion Feed
        • Create YouTube Feed
        • User Storage Feeds
          • Create OneDrive Feed
          • Create Google Drive Feed
          • Create SharePoint Feed
        • Cloud Storage Feeds
          • Create Amazon S3 Feed
          • Create Azure Blob Feed
          • Create Azure File Feed
          • Create Google Blob Feed
        • Messaging Feeds
          • Create Slack Feed
          • Create Microsoft Teams Feed
          • Create Discord Feed
        • Email Feeds
          • Create Google Mail Feed
          • Create Microsoft Outlook Feed
        • Issue Feeds
          • Create Linear Feed
          • Create Jira Feed
          • Create GitHub Issues Feed
        • Configuration Options
      • Workflows
        • Ingestion
        • Indexing
        • Preparation
        • Extraction
        • Enrichment
        • Actions
      • Conversations
      • Specifications
        • Azure OpenAI
        • OpenAI
        • Anthropic
        • Mistral
        • Groq
        • Deepseek
        • Replicate
        • Configuration Options
      • Alerts
        • Create Slack Audio Alert
        • Create Slack Text Alert
      • Projects
    • API Changelog
    • Multi-tenant Applications
  • JSON Mode
    • Overview
    • Document JSON
    • Transcript JSON
  • Content Types
    • Files
      • Documents
      • Audio
      • Video
      • Images
      • Animations
      • Data
      • Emails
      • Code
      • Packages
      • Other
    • Web Pages
    • Text
    • Posts
    • Messages
    • Emails
    • Issues
  • Data Sources
    • Feeds
  • Platform
    • Developer Portal
      • Projects
    • Cloud Platform
      • Security
      • Subprocessors
  • Resources
    • Community
Powered by GitBook
On this page

Was this helpful?

  1. Graphlit Data API
  2. API Reference

Projects

Update and get project details.

Last updated 1 year ago

Was this helpful?

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"
}
Cover

Queries

Cover

Mutations

Cover

Objects