Files
OpenArchiver/api/ingestion.html
2025-07-27 18:34:28 +00:00

56 lines
34 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Ingestion Sources API Documentation | OpenArchiver Documentation</title>
<meta name="description" content="Official documentation for the OpenArchiver project.">
<meta name="generator" content="VitePress v1.6.3">
<link rel="preload stylesheet" href="/assets/style.L7-rAhYi.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.DguYn8Bw.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/theme.D5-fWCd8.js">
<link rel="modulepreload" href="/assets/chunks/framework.Cd-3tpCq.js">
<link rel="modulepreload" href="/assets/api_ingestion.md.Cw9WcUAp.lean.js">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-b4de4928><!--[--><!--]--><!--[--><span tabindex="-1" data-v-f1a6591b></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-f1a6591b>Skip to content</a><!--]--><!----><header class="VPNav" data-v-b4de4928 data-v-196296ba><div class="VPNavBar" data-v-196296ba data-v-632f34fa><div class="wrapper" data-v-632f34fa><div class="container" data-v-632f34fa><div class="title" data-v-632f34fa><div class="VPNavBarTitle has-sidebar" data-v-632f34fa data-v-dcc486d8><a class="title" href="/" data-v-dcc486d8><!--[--><!--]--><!----><span data-v-dcc486d8>OpenArchiver Documentation</span><!--[--><!--]--></a></div></div><div class="content" data-v-632f34fa><div class="content-body" data-v-632f34fa><!--[--><!--]--><div class="VPNavBarSearch search" data-v-632f34fa><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-632f34fa data-v-e1b4cdce><span id="main-nav-aria-label" class="visually-hidden" data-v-e1b4cdce> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/README.html" tabindex="0" data-v-e1b4cdce data-v-a32d3490><!--[--><span data-v-a32d3490>Home</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/user-guides/email-providers/README.html" tabindex="0" data-v-e1b4cdce data-v-a32d3490><!--[--><span data-v-a32d3490>User Guides</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-632f34fa data-v-5cc3ce0d><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-5cc3ce0d data-v-299b7b5e data-v-a6d5da05><span class="check" data-v-a6d5da05><span class="icon" data-v-a6d5da05><!--[--><span class="vpi-sun sun" data-v-299b7b5e></span><span class="vpi-moon moon" data-v-299b7b5e></span><!--]--></span></span></button></div><!----><div class="VPFlyout VPNavBarExtra extra" data-v-632f34fa data-v-cf3d1140 data-v-f22c51c1><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-f22c51c1><span class="vpi-more-horizontal icon" data-v-f22c51c1></span></button><div class="menu" data-v-f22c51c1><div class="VPMenu" data-v-f22c51c1 data-v-21da92f6><!----><!--[--><!--[--><!----><div class="group" data-v-cf3d1140><div class="item appearance" data-v-cf3d1140><p class="label" data-v-cf3d1140>Appearance</p><div class="appearance-action" data-v-cf3d1140><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-cf3d1140 data-v-299b7b5e data-v-a6d5da05><span class="check" data-v-a6d5da05><span class="icon" data-v-a6d5da05><!--[--><span class="vpi-sun sun" data-v-299b7b5e></span><span class="vpi-moon moon" data-v-299b7b5e></span><!--]--></span></span></button></div></div></div><!----><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-632f34fa data-v-bc4091a7><span class="container" data-v-bc4091a7><span class="top" data-v-bc4091a7></span><span class="middle" data-v-bc4091a7></span><span class="bottom" data-v-bc4091a7></span></span></button></div></div></div></div><div class="divider" data-v-632f34fa><div class="divider-line" data-v-632f34fa></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-b4de4928 data-v-25ab87d9><div class="container" data-v-25ab87d9><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-25ab87d9><span class="vpi-align-left menu-icon" data-v-25ab87d9></span><span class="menu-text" data-v-25ab87d9>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-25ab87d9 data-v-3b0d77ac><button data-v-3b0d77ac>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-b4de4928 data-v-f58b6c37><div class="curtain" data-v-f58b6c37></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-f58b6c37><span class="visually-hidden" id="sidebar-aria-label" data-v-f58b6c37> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-3272fbfa><section class="VPSidebarItem level-0" data-v-3272fbfa data-v-b566cf41><div class="item" role="button" tabindex="0" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><h2 class="text" data-v-b566cf41>User Guides</h2><!----></div><div class="items" data-v-b566cf41><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/README.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Get Started</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/user-guides/installation.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Installation</p><!--]--></a><!----></div><!----></div><section class="VPSidebarItem level-1 collapsible collapsed is-link" data-v-b566cf41 data-v-b566cf41><div class="item" tabindex="0" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/user-guides/email-providers/README.html" data-v-b566cf41><!--[--><h3 class="text" data-v-b566cf41>Email Providers</h3><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-b566cf41><span class="vpi-chevron-right caret-icon" data-v-b566cf41></span></div></div><div class="items" data-v-b566cf41><!--[--><div class="VPSidebarItem level-2 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/user-guides/email-providers/google-workspace.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Google Workspace</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/user-guides/email-providers/imap.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Generic IMAP Server</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/user-guides/email-providers/microsoft-365.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Microsoft 365</p><!--]--></a><!----></div><!----></div><!--]--></div></section><!--]--></div></section></div><div class="no-transition group" data-v-3272fbfa><section class="VPSidebarItem level-0 has-active" data-v-3272fbfa data-v-b566cf41><div class="item" role="button" tabindex="0" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><h2 class="text" data-v-b566cf41>API Reference</h2><!----></div><div class="items" data-v-b566cf41><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/api/README.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Overview</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/api/ingestion.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Ingestion API</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-3272fbfa><section class="VPSidebarItem level-0" data-v-3272fbfa data-v-b566cf41><div class="item" role="button" tabindex="0" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><h2 class="text" data-v-b566cf41>Services</h2><!----></div><div class="items" data-v-b566cf41><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/services/README.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Overview</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b566cf41 data-v-b566cf41><div class="item" data-v-b566cf41><div class="indicator" data-v-b566cf41></div><a class="VPLink link link" href="/services/storage-service.html" data-v-b566cf41><!--[--><p class="text" data-v-b566cf41>Storage Service</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-b4de4928 data-v-da66bf6a><div class="VPDoc has-sidebar has-aside" data-v-da66bf6a data-v-ef58e7af><!--[--><!--]--><div class="container" data-v-ef58e7af><div class="aside" data-v-ef58e7af><div class="aside-curtain" data-v-ef58e7af></div><div class="aside-container" data-v-ef58e7af><div class="aside-content" data-v-ef58e7af><div class="VPDocAside" data-v-ef58e7af data-v-271fded2><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-271fded2 data-v-fa352379><div class="content" data-v-fa352379><div class="outline-marker" data-v-fa352379></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-fa352379>On this page</div><ul class="VPDocOutlineItem root" data-v-fa352379 data-v-0bb3c463><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-271fded2></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-ef58e7af><div class="content-container" data-v-ef58e7af><!--[--><!--]--><main class="main" data-v-ef58e7af><div style="position:relative;" class="vp-doc _api_ingestion" data-v-ef58e7af><div><h1 id="ingestion-sources-api-documentation" tabindex="-1">Ingestion Sources API Documentation <a class="header-anchor" href="#ingestion-sources-api-documentation" aria-label="Permalink to &quot;Ingestion Sources API Documentation&quot;"></a></h1><p>A guide to using the Ingestion Sources API.</p><p><strong>Base Path:</strong> <code>/v1/ingestion-sources</code></p><hr><h2 id="authentication" tabindex="-1">Authentication <a class="header-anchor" href="#authentication" aria-label="Permalink to &quot;Authentication&quot;"></a></h2><p>All endpoints in this API are protected and require authentication. Requests must include an <code>Authorization</code> header containing a valid Bearer token. This can be a JWT obtained from the login endpoint or a <code>SUPER_API_KEY</code> for administrative tasks.</p><p><strong>Header Example:</strong><code>Authorization: Bearer &lt;YOUR_JWT_OR_SUPER_API_KEY&gt;</code></p><hr><h2 id="core-concepts" tabindex="-1">Core Concepts <a class="header-anchor" href="#core-concepts" aria-label="Permalink to &quot;Core Concepts&quot;"></a></h2><h3 id="ingestion-providers" tabindex="-1">Ingestion Providers <a class="header-anchor" href="#ingestion-providers" aria-label="Permalink to &quot;Ingestion Providers&quot;"></a></h3><p>The <code>provider</code> field determines the type of email source. Each provider requires a different configuration object, for example:</p><ul><li><code>google_workspace</code>: For connecting to Google Workspace accounts via OAuth 2.0.</li><li><code>microsoft_365</code>: For connecting to Microsoft 365 accounts via OAuth 2.0.</li><li><code>generic_imap</code>: For connecting to any email server that supports IMAP.</li></ul><h3 id="ingestion-status" tabindex="-1">Ingestion Status <a class="header-anchor" href="#ingestion-status" aria-label="Permalink to &quot;Ingestion Status&quot;"></a></h3><p>The <code>status</code> field tracks the state of the ingestion source.</p><ul><li><code>pending_auth</code>: The source has been created but requires user authorization (OAuth flow).</li><li><code>active</code>: The source is authenticated and ready to sync.</li><li><code>syncing</code>: An import job is currently in progress.</li><li><code>importing</code>: initial syncing in progress</li><li><code>paused</code>: The source is temporarily disabled.</li><li><code>error</code>: An error occurred during the last sync.</li></ul><hr><h2 id="_1-create-ingestion-source" tabindex="-1">1. Create Ingestion Source <a class="header-anchor" href="#_1-create-ingestion-source" aria-label="Permalink to &quot;1. Create Ingestion Source&quot;"></a></h2><ul><li><strong>Method:</strong> <code>POST</code></li><li><strong>Path:</strong> <code>/</code></li><li><strong>Description:</strong> Registers a new source for email ingestion. The <code>providerConfig</code> will vary based on the selected <code>provider</code>.</li></ul><h4 id="request-body-createingestionsourcedto" tabindex="-1">Request Body (<code>CreateIngestionSourceDto</code>) <a class="header-anchor" href="#request-body-createingestionsourcedto" aria-label="Permalink to &quot;Request Body (`CreateIngestionSourceDto`)&quot;"></a></h4><ul><li><code>name</code> (string, required): A user-friendly name for the source (e.g., &quot;Marketing Department G-Suite&quot;).</li><li><code>provider</code> (string, required): One of <code>google_workspace</code>, <code>microsoft_365</code>, or <code>generic_imap</code>.</li><li><code>providerConfig</code> (object, required): Configuration specific to the provider.</li></ul><h5 id="providerconfig-for-google-workspace-microsoft-365" tabindex="-1"><code>providerConfig</code> for <code>google_workspace</code> / <code>microsoft_365</code> <a class="header-anchor" href="#providerconfig-for-google-workspace-microsoft-365" aria-label="Permalink to &quot;`providerConfig` for `google_workspace` / `microsoft_365`&quot;"></a></h5><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Corporate Google Workspace&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;provider&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;google_workspace&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;providerConfig&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;clientId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;your-oauth-client-id.apps.googleusercontent.com&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;clientSecret&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;your-super-secret-client-secret&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;redirectUri&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://yourapp.com/oauth/google/callback&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h5 id="providerconfig-for-generic-imap" tabindex="-1"><code>providerConfig</code> for <code>generic_imap</code> <a class="header-anchor" href="#providerconfig-for-generic-imap" aria-label="Permalink to &quot;`providerConfig` for `generic_imap`&quot;"></a></h5><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Legacy IMAP Server&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;provider&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;generic_imap&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;providerConfig&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;host&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;imap.example.com&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;port&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">993</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;secure&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;username&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;archive-user&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;password&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;imap-password&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="responses" tabindex="-1">Responses <a class="header-anchor" href="#responses" aria-label="Permalink to &quot;Responses&quot;"></a></h4><ul><li><p><strong>Success (<code>201 Created</code>):</strong> Returns the full <code>IngestionSource</code> object, which now includes a system-generated <code>id</code> and default status.</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;a1b2c3d4-e5f6-7890-1234-567890abcdef&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Corporate Google Workspace&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;provider&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;google_workspace&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;status&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;pending_auth&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;createdAt&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;2025-07-11T12:00:00.000Z&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;updatedAt&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;2025-07-11T12:00:00.000Z&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;providerConfig&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: { </span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li><li><p><strong>Error (<code>500 Internal Server Error</code>):</strong> Indicates a server-side problem during creation.</p></li></ul><hr><h2 id="_2-get-all-ingestion-sources" tabindex="-1">2. Get All Ingestion Sources <a class="header-anchor" href="#_2-get-all-ingestion-sources" aria-label="Permalink to &quot;2. Get All Ingestion Sources&quot;"></a></h2><ul><li><strong>Method:</strong> <code>GET</code></li><li><strong>Path:</strong> <code>/</code></li><li><strong>Description:</strong> Retrieves a list of all configured ingestion sources for the organization.</li></ul><h4 id="responses-1" tabindex="-1">Responses <a class="header-anchor" href="#responses-1" aria-label="Permalink to &quot;Responses&quot;"></a></h4><ul><li><p><strong>Success (<code>200 OK</code>):</strong> Returns an array of <code>IngestionSource</code> objects.</p></li><li><p><strong>Error (<code>500 Internal Server Error</code>):</strong> Indicates a server-side problem.</p></li></ul><hr><h2 id="_3-get-ingestion-source-by-id" tabindex="-1">3. Get Ingestion Source by ID <a class="header-anchor" href="#_3-get-ingestion-source-by-id" aria-label="Permalink to &quot;3. Get Ingestion Source by ID&quot;"></a></h2><ul><li><strong>Method:</strong> <code>GET</code></li><li><strong>Path:</strong> <code>/:id</code></li><li><strong>Description:</strong> Fetches the details of a specific ingestion source.</li></ul><h4 id="url-parameters" tabindex="-1">URL Parameters <a class="header-anchor" href="#url-parameters" aria-label="Permalink to &quot;URL Parameters&quot;"></a></h4><ul><li><code>id</code> (string, required): The UUID of the ingestion source.</li></ul><h4 id="responses-2" tabindex="-1">Responses <a class="header-anchor" href="#responses-2" aria-label="Permalink to &quot;Responses&quot;"></a></h4><ul><li><p><strong>Success (<code>200 OK</code>):</strong> Returns the corresponding <code>IngestionSource</code> object.</p></li><li><p><strong>Error (<code>404 Not Found</code>):</strong> Returned if no source with the given ID exists.</p></li><li><p><strong>Error (<code>500 Internal Server Error</code>):</strong> Indicates a server-side problem.</p></li></ul><hr><h2 id="_4-update-ingestion-source" tabindex="-1">4. Update Ingestion Source <a class="header-anchor" href="#_4-update-ingestion-source" aria-label="Permalink to &quot;4. Update Ingestion Source&quot;"></a></h2><ul><li><strong>Method:</strong> <code>PUT</code></li><li><strong>Path:</strong> <code>/:id</code></li><li><strong>Description:</strong> Modifies an existing ingestion source. This is useful for changing the name, pausing a source, or updating its configuration.</li></ul><h4 id="url-parameters-1" tabindex="-1">URL Parameters <a class="header-anchor" href="#url-parameters-1" aria-label="Permalink to &quot;URL Parameters&quot;"></a></h4><ul><li><code>id</code> (string, required): The UUID of the ingestion source to update.</li></ul><h4 id="request-body-updateingestionsourcedto" tabindex="-1">Request Body (<code>UpdateIngestionSourceDto</code>) <a class="header-anchor" href="#request-body-updateingestionsourcedto" aria-label="Permalink to &quot;Request Body (`UpdateIngestionSourceDto`)&quot;"></a></h4><p>All fields are optional. Only include the fields you want to change.</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Marketing Dept G-Suite (Paused)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;status&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;paused&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="responses-3" tabindex="-1">Responses <a class="header-anchor" href="#responses-3" aria-label="Permalink to &quot;Responses&quot;"></a></h4><ul><li><p><strong>Success (<code>200 OK</code>):</strong> Returns the complete, updated <code>IngestionSource</code> object.</p></li><li><p><strong>Error (<code>404 Not Found</code>):</strong> Returned if no source with the given ID exists.</p></li><li><p><strong>Error (<code>500 Internal Server Error</code>):</strong> Indicates a server-side problem.</p></li></ul><hr><h2 id="_5-delete-ingestion-source" tabindex="-1">5. Delete Ingestion Source <a class="header-anchor" href="#_5-delete-ingestion-source" aria-label="Permalink to &quot;5. Delete Ingestion Source&quot;"></a></h2><ul><li><strong>Method:</strong> <code>DELETE</code></li><li><strong>Path:</strong> <code>/:id</code></li><li><strong>Description:</strong> Permanently removes an ingestion source. This action cannot be undone.</li></ul><h4 id="url-parameters-2" tabindex="-1">URL Parameters <a class="header-anchor" href="#url-parameters-2" aria-label="Permalink to &quot;URL Parameters&quot;"></a></h4><ul><li><code>id</code> (string, required): The UUID of the ingestion source to delete.</li></ul><h4 id="responses-4" tabindex="-1">Responses <a class="header-anchor" href="#responses-4" aria-label="Permalink to &quot;Responses&quot;"></a></h4><ul><li><p><strong>Success (<code>204 No Content</code>):</strong> Indicates successful deletion with no body content.</p></li><li><p><strong>Error (<code>404 Not Found</code>):</strong> Returned if no source with the given ID exists.</p></li><li><p><strong>Error (<code>500 Internal Server Error</code>):</strong> Indicates a server-side problem.</p></li></ul><hr><h2 id="_6-trigger-initial-import" tabindex="-1">6. Trigger Initial Import <a class="header-anchor" href="#_6-trigger-initial-import" aria-label="Permalink to &quot;6. Trigger Initial Import&quot;"></a></h2><ul><li><strong>Method:</strong> <code>POST</code></li><li><strong>Path:</strong> <code>/:id/sync</code></li><li><strong>Description:</strong> Initiates the email import process for a given source. This is an asynchronous operation that enqueues a background job and immediately returns a response. The status of the source will be updated to <code>importing</code>.</li></ul><h4 id="url-parameters-3" tabindex="-1">URL Parameters <a class="header-anchor" href="#url-parameters-3" aria-label="Permalink to &quot;URL Parameters&quot;"></a></h4><ul><li><code>id</code> (string, required): The UUID of the ingestion source to sync.</li></ul><h4 id="responses-5" tabindex="-1">Responses <a class="header-anchor" href="#responses-5" aria-label="Permalink to &quot;Responses&quot;"></a></h4><ul><li><p><strong>Success (<code>202 Accepted</code>):</strong> Confirms that the sync request has been accepted for processing.</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Initial import triggered successfully.&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li><li><p><strong>Error (<code>404 Not Found</code>):</strong> Returned if no source with the given ID exists.</p></li><li><p><strong>Error (<code>500 Internal Server Error</code>):</strong> Indicates a server-side problem.</p></li></ul></div></div></main><footer class="VPDocFooter" data-v-ef58e7af data-v-28097769><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-28097769><span class="visually-hidden" id="doc-footer-aria-label" data-v-28097769>Pager</span><div class="pager" data-v-28097769><a class="VPLink link pager-link prev" href="/api/README.html" data-v-28097769><!--[--><span class="desc" data-v-28097769>Previous page</span><span class="title" data-v-28097769>Overview</span><!--]--></a></div><div class="pager" data-v-28097769><a class="VPLink link pager-link next" href="/services/README.html" data-v-28097769><!--[--><span class="desc" data-v-28097769>Next page</span><span class="title" data-v-28097769>Overview</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_ingestion.md\":\"Cw9WcUAp\",\"api_readme.md\":\"_7P6rt6y\",\"readme.md\":\"CQnN0r3v\",\"services_readme.md\":\"DmYG8_uu\",\"services_storage-service.md\":\"xOqM9CWx\",\"summary.md\":\"DhPY8nsG\",\"user-guides_email-providers_google-workspace.md\":\"CWhO43nR\",\"user-guides_email-providers_imap.md\":\"BcXBEq43\",\"user-guides_email-providers_microsoft-365.md\":\"C4O8w9wT\",\"user-guides_email-providers_readme.md\":\"yQn5kDaG\",\"user-guides_installation.md\":\"Gno3X95r\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"OpenArchiver Documentation\",\"description\":\"Official documentation for the OpenArchiver project.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/README\"},{\"text\":\"User Guides\",\"link\":\"/user-guides/email-providers/README\"}],\"sidebar\":[{\"text\":\"User Guides\",\"items\":[{\"text\":\"Get Started\",\"link\":\"/README\"},{\"text\":\"Installation\",\"link\":\"/user-guides/installation\"},{\"text\":\"Email Providers\",\"link\":\"/user-guides/email-providers/README\",\"collapsed\":true,\"items\":[{\"text\":\"Google Workspace\",\"link\":\"/user-guides/email-providers/google-workspace\"},{\"text\":\"Generic IMAP Server\",\"link\":\"/user-guides/email-providers/imap\"},{\"text\":\"Microsoft 365\",\"link\":\"/user-guides/email-providers/microsoft-365\"}]}]},{\"text\":\"API Reference\",\"items\":[{\"text\":\"Overview\",\"link\":\"/api/README\"},{\"text\":\"Ingestion API\",\"link\":\"/api/ingestion\"}]},{\"text\":\"Services\",\"items\":[{\"text\":\"Overview\",\"link\":\"/services/README\"},{\"text\":\"Storage Service\",\"link\":\"/services/storage-service\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>