TABLE OF CONTENTS
- delete
- deploy
- document
- export-project
- get
- import-project
- login
- logs
- metadata
- package
- platform
- project
- query
- reindex
- send-event
- upload
- version
delete
Delete the given resource based on the provided reference id.
Usage
kodexa delete [OPTIONS] OBJECT_TYPE REF # OBJECT_TYPE # extensionPack, pipeline, assistant, action, modelRuntime, credential, taxonomy, store, project, executions, dataForm
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
Examples
kodexa delete projects 8a8a85f781a94dff0181a95f8e7e0002 # Deleting project 8a8a85f781a94dff0181a95f8e7e0002 # Deleted project 8a8a85f781a94dff0181a95f8e7e0002 ?
kodexa delete dataForm utilities-invoicing/demo-card:1.0.0 # Deleting dataForm utilities-invoicing/demo-card:1.0.0 # Deleted dataForm utilities-invoicing/demo-card:1.0.0 ?
deploy
Deploy a component to a Kodexa platform instance from a file or stdin
Usage
kodexa deploy [OPTIONS] [--org] [--slug] [--version] [--file] [--update/--no-update] [--url] [--token] [--format] [--overlay]
Options
--org (string) The slug for the organization to deploy to
--slug (string) Override the slug for component (only works for a single component)
--version (string) Override the version for component (only works for a single component)
--file (string) The path to the file containing the object to apply
--update / --no-update (bool) The flag to determine if the deployment is an update
--url (string) The URL to the Kodexa server
--token (string) The access token to the Kodexa server
--format (string) The format to input if from stdin (JSON or YAML)
--overlay (string) A JSON or YAML file that will overlay the metadata
Examples
kodexa deploy --org 'My Org' --slug 'My Component Slug' --file './component/spatial.yaml' --overlay './component/overlay.yaml'
# Reading from file model.yml
# Deploying component gcp-vision-model:1.0.0
# Uploading model file infer\__init__.py
# 1 files uploaded for infer/*
# Deployed ?
document
Build markdown documentation for this extension
Usage
kodexa document [OPTIONS] [--path]
Options
--path (string) Path to folder container kodexa.yml
Examples
kodexa document --path './kodexa.yaml'
export-project
Use to export projects
Usage
kodexa export-project [OPTIONS] PROJECT_ID [--url] [--token] [--output]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
--output
(string) The path where to export the project
Examples
kodexa export-project 8a8a841d818027df0181802d6c740002 --output './exports/my-project'
get
List the instance of the object type
Usage
kodexa get [OPTIONS] OBJECT_TYPE [REF] [--url] [--token] [--query] [--path] [--format] [--page] [--pageSize] [--sort]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
--query
(string) Limit the results using a query
--path
(string) JQ path to content you want
--format
(string) The format to output (json, yaml)
--page
(int) Page number
--pageSize
(int) Page size
--sort
(string) Sort by (ie. startDate:desc)
Examples
kodexa get projects --query web Listing projects ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ id ┃ organization.name ┃ name ┃ description ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ 8a8a83f380d207d00180d2bf00000b3b │ Testing │ WEB 3 │ Test WEB and S3 together │ │ 8a8a835b805feb9e01805ff5571900e8 │ Demo 5.0 │ Web Scripting Example │ Using full scripting to interact with websites │ │ 8a8a833c805ca6df01805fd521ce0561 │ Demo 5.0 │ Web Crawl to Storage Publishing │ A project for extracting data from automated PDF downloads through S3 publishing │ └──────────────────────────────────┴───────────────────┴─────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────┘ 3 projects found, page 1 of 1
import-project
Use to import projects
Usage
kodexa import-project [OPTIONS] ORG_SLUG PATH [--url] [--token]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
Examples
kodexa import-project new-org-slug "./exports/my-project"
# Importing project from /tmp/export/My Project
# Organization: My New Org
# Project imported
login
Logs into the specified platform environment
Usage
kodexa login
Examples
kodexa login
# Enter the Kodexa URL (https://platform.kodexa.com):
# Enter your email: admin@kodexa.com
# Enter your password: ************
# Logged in
logs
Get logs for an execution
Make sure logging is enabled in the assistant/s to be able to fetch/view logs
Usage
kodexa logs [OPTIONS] EXECUTION_ID [--url] [--token]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
Examples
# Get list of executions kodexa get execution # Listing executions # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓ # ┃ id ┃ startDate ┃ endDate ┃ status ┃ assistant.name ┃ documentFamily.path ┃ # ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩ # │ 8a8a831081ad9b580181adace9b5005d │ 2022-06-27T14:00:30.450Z │ 2022-06-27T14:00:42.837Z │ RUNNING │ │ │ # │ 8a8a84ff81a568150181a576b9f0004d │ 2022-06-27T14:00:30.415Z │ 2022-06-27T14:00:42.873Z │ SUCCEEDED │ │ │ # │ 8a8a84ff81a568150181a576b980004b │ 2022-06-27T14:00:30.306Z │ 2022-06-27T14:00:43.784Z │ SUCCEEDED │ │ │ # │ 8a8a84ff81a568150181a576b3e00049 │ 2022-06-27T14:00:28.864Z │ 2022-06-27T14:00:42.768Z │ SUCCEEDED │ │ │ # │ 8a8a84ff81a568150181a576a42e0046 │ 2022-06-27T14:00:24.852Z │ 2022-06-27T14:00:32.501Z │ SUCCEEDED │ │ │ # │ 8a8a84ff81a568150181a576a41c0045 │ 2022-06-27T14:00:24.832Z │ 2022-06-27T14:00:35.089Z │ SUCCEEDED │ │ │ # │ 8a8a84ff81a568150181a57697710043 │ 2022-06-27T14:00:21.586Z │ 2022-06-27T14:00:31.560Z │ SUCCEEDED │ │ │ # │ 8a8a84ff81a568150181a576931f0042 │ 2022-06-27T14:00:20.478Z │ 2022-06-27T14:00:24.823Z │ SUCCEEDED │ │ │ # │ 8a8a84ff81a568150181a57690d6003e │ 2022-06-27T14:00:19.897Z │ 2022-06-27T14:00:21.565Z │ SUCCEEDED │ │ │ # │ 8a8a84ff81a568150181a5768f16003a │ 2022-06-27T14:00:19.450Z │ 2022-06-27T14:00:30.282Z │ SUCCEEDED │ │ │ # └──────────────────────────────────┴──────────────────────────┴──────────────────────────┴───────────┴────────────────┴─────────────────────┘ # 796 executions found, page 1 of 80 # Select one from the list and get logs kodexa logs 8a8a831081ad9b580181adace9b5005d # Received event: {'id': '8a8a831081ad9b580181adacea34005e', 'uuid': 'd4873328f0ac47b1804d2c54d62dc89c', 'createdOn': '2022-06-29T04:16:39.501Z', 'updatedOn': '2022-06-29T04:16:39.922Z', # 'type': 'STEP_UPDATE', 'status': 'RUNNING', 'execution': {'id': '8a8a831081ad9b580181adace9b5005d', 'loggingEnabled': True, 'contentObjects': [{'id': '8a8a831081ad9b580181adace33b001a', # 'uuid': '9ed7d26008014a0aa15e9de75c900dfa', 'createdOn': '2022-06-29T04:16:37.763Z', 'updatedOn': '2022-06-29T04:16:37.814Z', 'contentType': 'DOCUMENT', 'documentVersion': '', 'index': 0, # 'labels': [], 'metadata': {'path': 'santander_drive_auto_receivables_trust_2020-4_servicer_report_cik1830976_2022-01-31.pdf'}, 'source': {'connector': 'document-store', 'headers': {'id': # '8a8a831081ad9b580181adace1da0018', 'ref': 'romar-migrated-env/8a8a831081ad9b580181adab6e6e0000-training:1.0.0', 'family': '8a8a831081ad9b580181adace1d90017'}, 'original_filename': # 'santander_drive_auto_receivables_trust_2020-4_servicer_report_cik1830976_2022-01-31.pdf', 'original_path': # 'santander_drive_auto_receivables_trust_2020-4_servicer_report_cik1830976_2022-01-31.pdf'}, 'mixins': [], 'contentMetadata': {}, 'created': '2022-06-29T04:16:37.584Z', 'modified': # '2022-06-29T04:16:37.584Z', 'size': 65536, 'storeRef': 'romar-migrated-env/8a8a831081ad9b580181adab6e6e0000-training:1.0.0', 'documentFamilyId': '8a8a831081ad9b580181adace1d90017'}]}, # 'storeRef': 'romar-migrated-env/8a8a831081ad9b580181adab6e6e0000-training:1.0.0', 'documentFamilyId': '8a8a831081ad9b580181adace1d90017', 'sessionId': '8a8a831081ad9b580181adace407001b', # 'token': '73a7a90492064757a3fb230ec0a99ad0', 'pipeline': {'valid': True, 'exceptions': [], 'steps': [{'id': 'de6db62a254a4993844dbd161db1f0cc', 'status': 'PENDING', 'name': 'Step 1', # 'options': {'ocr': False, 'jobs': 2, 'force_ocr': False, 'page_numbers': {}, 'detect_layout': False, 'detect_tables': False, 'ignore_images': True, 'analyze_layout': True, # 'ignore_content': False, 'page_images_dpi': 200, 'generate_page_images': False, 'table_detection_flavor': 'stream', 'layout_analysis_options': {'space_multiplier': 1, # 'find_multiple_text_columns': False}}, 'optionTypes': {'ocr': 'boolean', 'jobs': 'number', 'force_ocr': 'boolean', 'page_numbers': 'list:number', 'detect_layout': 'boolean', # 'detect_tables': 'boolean', 'ignore_images': 'boolean', 'analyze_layout': 'boolean', 'ignore_content': 'boolean', 'page_images_dpi': 'number', 'generate_page_images': 'boolean', # 'table_detection_flavor': 'string'}, 'context': {}, 'contentObjects': [{'id': '8a8a831081ad9b580181adace33b001a', 'uuid': '9ed7d26008014a0aa15e9de75c900dfa', 'createdOn': # '2022-06-29T04:16:37.763Z', 'updatedOn': '2022-06-29T04:16:37.814Z', 'contentType': 'DOCUMENT', 'documentVersion': '', 'index': 0, 'labels': [], 'metadata': {'path': # 'santander_drive_auto_receivables_trust_2020-4_servicer_report_cik1830976_2022-01-31.pdf'}, 'source': {'connector': 'document-store', 'headers': {'id': '8a8a831081ad9b580181adace1da0018', # 'ref': 'romar-migrated-env/8a8a831081ad9b580181adab6e6e0000-training:1.0.0', 'family': '8a8a831081ad9b580181adace1d90017'}, 'original_filename': # 'santander_drive_auto_receivables_trust_2020-4_servicer_report_cik1830976_2022-01-31.pdf', 'original_path': # 'santander_drive_auto_receivables_trust_2020-4_servicer_report_cik1830976_2022-01-31.pdf'}, 'mixins': [], 'contentMetadata': {}, 'created': '2022-06-29T04:16:37.584Z', 'modified': # '2022-06-29T04:16:37.584Z', 'size': 65536}], 'inputId': '8a8a831081ad9b580181adace33b001a', 'ref': 'kodexa/pdf-parser:5.0.123', 'extensionPackRef': 'kodexa/spatial:5.0.123', 'stepType': # 'ACTION'}]}, 'source': {}, 'payload': {}, 'inputId': '8a8a831081ad9b580181adace33b001a', 'platformUrl': 'https://dev1.kodexa.com', 'sessionCallBackUrl': # 'https://dev1.kodexa.com/api/sessions/8a8a831081ad9b580181adace407001b/events', 'created': '2022-06-29T04:16:39.346Z', 'startDate': '2022-06-29T04:16:44.566Z'}Using Kodexa Platform at https://dev1.kodexa.comProcessing event type STEP_UPDATEGetting document family id 8a8a831081ad9b580181adace1d90017We have storeRef and document familyWe have an input document, fetching 8a8a831081ad9b580181adace33b001aGetting document family id 8a8a831081ad9b580181adace1d90017Loading KDDB documentGetting content object 8a8a831081ad9b580181adace33b001a in event 8a8a831081ad9b580181adacea34005e in execution 8a8a831081ad9b580181adace9b5005dLoaded KDDB documentDetermine is we have any options that need replacementReplacing options <kodexa.model.model.Ref object at 0x7ff7ed7b60d0>Type is booleanCheck option type for key ocrReplacing optionReturning option valueCheck option type for key jobsType is numberReplacing optionReturning option valueCheck option type for key force_ocrType is booleanReplacing optionCheck option type for key page_numbersReturning option valueIs a list typeType is list:numberType is booleanCheck option type for key detect_layoutReplacing optionCheck option type for key detect_tablesReturning option valueReplacing optionType is booleanReturning option valueCheck option type for key ignore_imagesType is booleanReplacing optionCheck option type for key analyze_layoutReturning option valueType is booleanReplacing optionReturning option valueCheck option type for key ignore_contentReplacing optionType is booleanReturning option valueType is numberCheck option type for key page_images_dpiReplacing optionReturning option valueCheck option type for key generate_page_imagesType is booleanReplacing optionReturning option valueCheck option type for key table_detection_flavorType is stringReplacing optionReturning option valueLooking up action pdf-parser<kodexa_spatial.parsers.pdf_miner.PdfMinerParser object at 0x7ff7ed7b6c10>Executing step <kodexa.model.model.Ref object at 0x7ff7ed7b60d0>Passing input document and context
metadata
[WIP] Load metadata
Usage
kodexa metadata [OPTIONS]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
Examples
kodexa metadata
package
Package an extension pack based on the kodexa.yml file
Usage
kodexa package [OPTIONS] [--path] [--output] [--version] [--site / --no-site] [--sitedir] [--url]
Options
--path
(string) Path to folder container kodexa.yml (defaults to current)
--output
(string) Path to the output folder (defaults to dist under current)
--version
(string) Version number (defaults to 1.0.0)
--site / --no-site
Generate website to serve extension
--sitedir
(string) Path to folder for site contents
--url
(string) The URL of the Kodexa server
Examples
[WIP]
platform
Get the details for the Kodexa instance we are logged into
Usage
kodexa platform [--python / --no-python]
Options
--python Print out the header for a Python file
Examples
odexa platform
# Kodexa URL: https://dev1.kodexa.com
# Access Token: **************************
# Version: 0.0.141-develop
# Release: Hanalei
project
Get all the details for a specific project
This has an error when using the deprecated KodexaClient.
Usage
kodexa project [OPTIONS] ID [--url] [--token]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
Examples
# Get list of projects kodexa get projects # Select the project id and use in the command below kodexa project <project-id>
query
Query the documents in a given document store
Usage
kodexa query [OPTIONS] REF [QUERY] [--url] [--token] [--download / --no-download] [--download-native / --no-download-native] [--page] [--pageSize] [--sort]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
--download / --no-download
Download the KDDB for the latest in the family
--download-native / --no-download-native
Download the native file for the family
--page
(int) Page number
--pageSize
(int) Page size
--sort
(string) Sort by (i.e. name:asc
)
Examples
[WIP]
reindex
Reindex the given resource (based on ref)
Usage
kodexa reindex [OPTIONS] OBJECT_TYPE [--url] [--token] # OBJECT_TYPE # extensionPack, pipeline, assistant, action, modelRuntime, credential, taxonomy, store, project, executions
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
Examples
kodexa reindex projects # Starting global reindexing # Reindexing project # ? Global reindexing complete kodexa reindex stores # Starting global reindexing # Reindexing store # ? Global reindexing complete
send-event
Send an event to an assistant
Usage
kodexa send-event [OPTIONS] PROJECT_ID ASSISTANT_ID [--url] [--token] [--file] [--file-format]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
--file
(string) The path to the file containing the event to send
--format
(string) The format to use if from stdin (JSON
or YAML
)
Examples
[WIP]
upload
Upload the contents of a file or directory to a Kodexa platform instance
Usage
kodexa upload [OPTIONS] REF PATH [--url] [--token]
Options
--url
(string) The URL of the Kodexa server
--token
(string) The access token
Examples
[WIP]
version
Get cli version
Usage
kodexa version
Examples
kodexa version
# Kodexa Version: 5.0.173
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article