Python Script Example
An example script to create a project via API by utilizing Project Creation Wizard (PCW)
Usage Requirement
pip3 and python3 CLI installed on the machine.
Installation
Run
pip3 install -r requirements.txt
.
Guide
1. Generate your OAuth credentials
2. Set up a project via Custom Project
We have five steps here. Set up your project until reaching Step 5 (Project Settings). Make sure all the configuration that you want for the project is set properly.
3. In the Step 5, click “View Script” in the top right corner
4. Copy the configuration by clicking the icon on the top right corner of the UI
5. Paste the configuration to project_configuration.json
The file is located on the api-client-example/create-project-async
folder.
6. Insert your dataset for the project in the api-client-example/create-project-async/documents
folder
api-client-example/create-project-async/documents
folderAll files inside the folder will be treated as the project's documents. Make sure you remove any files that doesn't belong to the project.
7. Run the command on your terminal to create the project
Navigate to api-client-example/create-project-async
first before running the command. Note that this API only submit a job, not a synchronous process. Thus, we need to make sure whether the job is successful which will be covered in the next step.
8. Run this command to track your project creation status
With these instructions, you can successfully create a new project by using a Python script via API.
Last updated