archastro.platform.v1.resources.knowledge_ingestions

 1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
 2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
 3# Content hash: 2022ed529fb3
 4
 5from __future__ import annotations
 6
 7from ...runtime.http_client import HttpClient, SyncHttpClient
 8from ...types.common import ContextIngestion
 9
10
11class AsyncKnowledgeIngestionResource:
12    def __init__(self, http: HttpClient):
13        self._http = http
14
15    async def get(self, ingestion: str) -> ContextIngestion:
16        """
17        Retrieve a knowledge ingestion
18        Returns the status, error details, and metadata for a knowledge ingestion.
19        Use the ingestion ID returned by an asynchronous knowledge source or document
20        operation. Inaccessible and unknown ingestions both return 404.
21
22        Args:
23            ingestion: Knowledge ingestion ID (`cig_...`) to retrieve.
24
25        Returns:
26            The requested knowledge ingestion.
27        """
28        return await self._http.request(
29            f"/api/v1/knowledge_ingestions/{ingestion}",
30            response_type=ContextIngestion,
31        )
32
33
34class KnowledgeIngestionResource:
35    def __init__(self, http: SyncHttpClient):
36        self._http = http
37
38    def get(self, ingestion: str) -> ContextIngestion:
39        """
40        Retrieve a knowledge ingestion
41        Returns the status, error details, and metadata for a knowledge ingestion.
42        Use the ingestion ID returned by an asynchronous knowledge source or document
43        operation. Inaccessible and unknown ingestions both return 404.
44
45        Args:
46            ingestion: Knowledge ingestion ID (`cig_...`) to retrieve.
47
48        Returns:
49            The requested knowledge ingestion.
50        """
51        return self._http.request(
52            f"/api/v1/knowledge_ingestions/{ingestion}",
53            response_type=ContextIngestion,
54        )
class AsyncKnowledgeIngestionResource:
12class AsyncKnowledgeIngestionResource:
13    def __init__(self, http: HttpClient):
14        self._http = http
15
16    async def get(self, ingestion: str) -> ContextIngestion:
17        """
18        Retrieve a knowledge ingestion
19        Returns the status, error details, and metadata for a knowledge ingestion.
20        Use the ingestion ID returned by an asynchronous knowledge source or document
21        operation. Inaccessible and unknown ingestions both return 404.
22
23        Args:
24            ingestion: Knowledge ingestion ID (`cig_...`) to retrieve.
25
26        Returns:
27            The requested knowledge ingestion.
28        """
29        return await self._http.request(
30            f"/api/v1/knowledge_ingestions/{ingestion}",
31            response_type=ContextIngestion,
32        )
AsyncKnowledgeIngestionResource(http: archastro.platform.runtime.http_client.HttpClient)
13    def __init__(self, http: HttpClient):
14        self._http = http
async def get(self, ingestion: str) -> archastro.platform.types.common.ContextIngestion:
16    async def get(self, ingestion: str) -> ContextIngestion:
17        """
18        Retrieve a knowledge ingestion
19        Returns the status, error details, and metadata for a knowledge ingestion.
20        Use the ingestion ID returned by an asynchronous knowledge source or document
21        operation. Inaccessible and unknown ingestions both return 404.
22
23        Args:
24            ingestion: Knowledge ingestion ID (`cig_...`) to retrieve.
25
26        Returns:
27            The requested knowledge ingestion.
28        """
29        return await self._http.request(
30            f"/api/v1/knowledge_ingestions/{ingestion}",
31            response_type=ContextIngestion,
32        )

Retrieve a knowledge ingestion Returns the status, error details, and metadata for a knowledge ingestion. Use the ingestion ID returned by an asynchronous knowledge source or document operation. Inaccessible and unknown ingestions both return 404.

Arguments:
  • ingestion: Knowledge ingestion ID (cig_...) to retrieve.
Returns:

The requested knowledge ingestion.

class KnowledgeIngestionResource:
35class KnowledgeIngestionResource:
36    def __init__(self, http: SyncHttpClient):
37        self._http = http
38
39    def get(self, ingestion: str) -> ContextIngestion:
40        """
41        Retrieve a knowledge ingestion
42        Returns the status, error details, and metadata for a knowledge ingestion.
43        Use the ingestion ID returned by an asynchronous knowledge source or document
44        operation. Inaccessible and unknown ingestions both return 404.
45
46        Args:
47            ingestion: Knowledge ingestion ID (`cig_...`) to retrieve.
48
49        Returns:
50            The requested knowledge ingestion.
51        """
52        return self._http.request(
53            f"/api/v1/knowledge_ingestions/{ingestion}",
54            response_type=ContextIngestion,
55        )
KnowledgeIngestionResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
36    def __init__(self, http: SyncHttpClient):
37        self._http = http
def get(self, ingestion: str) -> archastro.platform.types.common.ContextIngestion:
39    def get(self, ingestion: str) -> ContextIngestion:
40        """
41        Retrieve a knowledge ingestion
42        Returns the status, error details, and metadata for a knowledge ingestion.
43        Use the ingestion ID returned by an asynchronous knowledge source or document
44        operation. Inaccessible and unknown ingestions both return 404.
45
46        Args:
47            ingestion: Knowledge ingestion ID (`cig_...`) to retrieve.
48
49        Returns:
50            The requested knowledge ingestion.
51        """
52        return self._http.request(
53            f"/api/v1/knowledge_ingestions/{ingestion}",
54            response_type=ContextIngestion,
55        )

Retrieve a knowledge ingestion Returns the status, error details, and metadata for a knowledge ingestion. Use the ingestion ID returned by an asynchronous knowledge source or document operation. Inaccessible and unknown ingestions both return 404.

Arguments:
  • ingestion: Knowledge ingestion ID (cig_...) to retrieve.
Returns:

The requested knowledge ingestion.