Skip to content

Latest commit

 

History

History
280 lines (193 loc) · 8.86 KB

File metadata and controls

280 lines (193 loc) · 8.86 KB

ksapi.ChunkLineagesApi

All URIs are relative to http://localhost:8000

Method HTTP request Description
create_chunk_lineage POST /v1/chunk-lineages Create Chunk Lineage Handler
delete_chunk_lineage DELETE /v1/chunk-lineages Delete Chunk Lineage Handler
get_chunk_lineage GET /v1/chunk-lineages/{chunk_id} Get Chunk Lineage Handler

create_chunk_lineage

List[ChunkLineageResponse] create_chunk_lineage(create_chunk_lineage_request)

Create Chunk Lineage Handler

Batch-create lineage edges for a child chunk.

Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.

Example

  • Api Key Authentication (cookieAuth):
  • Bearer Authentication (bearerAuth):
import ksapi
from ksapi.models.chunk_lineage_response import ChunkLineageResponse
from ksapi.models.create_chunk_lineage_request import CreateChunkLineageRequest
from ksapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
    host = "http://localhost:8000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'

# Configure Bearer authorization: bearerAuth
configuration = ksapi.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ksapi.ChunkLineagesApi(api_client)
    create_chunk_lineage_request = ksapi.CreateChunkLineageRequest() # CreateChunkLineageRequest | 

    try:
        # Create Chunk Lineage Handler
        api_response = api_instance.create_chunk_lineage(create_chunk_lineage_request)
        print("The response of ChunkLineagesApi->create_chunk_lineage:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ChunkLineagesApi->create_chunk_lineage: %s\n" % e)

Parameters

Name Type Description Notes
create_chunk_lineage_request CreateChunkLineageRequest

Return type

List[ChunkLineageResponse]

Authorization

cookieAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Successful Response -
422 Validation Error -
0 Error response. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_chunk_lineage

delete_chunk_lineage(parent_chunk_id, chunk_id)

Delete Chunk Lineage Handler

Delete a single lineage edge between parent and child chunks.

Example

  • Api Key Authentication (cookieAuth):
  • Bearer Authentication (bearerAuth):
import ksapi
from ksapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
    host = "http://localhost:8000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'

# Configure Bearer authorization: bearerAuth
configuration = ksapi.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ksapi.ChunkLineagesApi(api_client)
    parent_chunk_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Parent chunk ID
    chunk_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Child chunk ID

    try:
        # Delete Chunk Lineage Handler
        api_instance.delete_chunk_lineage(parent_chunk_id, chunk_id)
    except Exception as e:
        print("Exception when calling ChunkLineagesApi->delete_chunk_lineage: %s\n" % e)

Parameters

Name Type Description Notes
parent_chunk_id UUID Parent chunk ID
chunk_id UUID Child chunk ID

Return type

void (empty response body)

Authorization

cookieAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Successful Response -
422 Validation Error -
0 Error response. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_chunk_lineage

LineageGraphResponse get_chunk_lineage(chunk_id, max_depth=max_depth)

Get Chunk Lineage Handler

Get lineage graph for a chunk.

Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.

Example

  • Api Key Authentication (cookieAuth):
  • Bearer Authentication (bearerAuth):
import ksapi
from ksapi.models.lineage_graph_response import LineageGraphResponse
from ksapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
    host = "http://localhost:8000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'

# Configure Bearer authorization: bearerAuth
configuration = ksapi.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ksapi.ChunkLineagesApi(api_client)
    chunk_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    max_depth = 3 # int |  (optional) (default to 3)

    try:
        # Get Chunk Lineage Handler
        api_response = api_instance.get_chunk_lineage(chunk_id, max_depth=max_depth)
        print("The response of ChunkLineagesApi->get_chunk_lineage:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ChunkLineagesApi->get_chunk_lineage: %s\n" % e)

Parameters

Name Type Description Notes
chunk_id UUID
max_depth int [optional] [default to 3]

Return type

LineageGraphResponse

Authorization

cookieAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
0 Error response. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]