Overview
The LOR-API is a Python-based API that uses OpenSearch.
Authentication
All endpoints require Bearer Authentication.
API Endpoints
1. Health Status
Endpoint: /cl/api/v1/health/
Method: GET
Description: Returns the health status of the API.
Response: 200 - Successful response with status message
2. Directory Management
2.1 Root Directory
Endpoint: /cl/api/v1/directory/root
GET
- Description: Fetches root directory information for a specific tenant
- Parameters:
ext_user_id_ref
(optional): External User ID
- Responses:
- 200: Root directory found
- 404: Not found
- 400: Connection error
- 500: Internal server error
- 422: Validation error
POST
- Description: Creates a root directory for a tenant
- Request Body: Payload to create root directory
- Responses:
- 201: Successfully created
- 409: Conflict, directory already exists
- 422: Validation error
/cl/api/v1/directory/root
Request Payload of root (Get Method):
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
/cl/api/v1/directory/root
Request Payload of root (Post Method):
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
Parameter | tenant_code | Tenant code associated with the request | Yes |
/cl/api/v1/directory/{folder_id}
Request Payload of folder_id (Get Method):
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | folder_id | Unique folder ID (UUID format) | Yes |
Query Parameter | sorting_by | Sort result by title or modified_date | No |
Query Parameter | order | Sort result in ascending or descending order | No |
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
Sorting Options:
sorting_by
: Available values: title
, updated_at
(Default: updated_at
)
order
: Available values: asc
, desc
(Default: asc
)
/cl/api/v1/directory/{folder_id}
Request Payload of folder_id (Put Method):
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | folder_id | Folder ID of the directory to be updated | Yes |
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
Parameter | name | Name of the folder | Yes |
Parameter | is_private | Whether the folder is private (true/false) | Yes |
Parameter | type | Type of the item (e.g., "Folder") | Yes |
Parameter | custom_metadata | Custom metadata for the folder | No |
kvp
: Key-value pairs
tags
: List of tags
taxonomy
: List of taxonomy with UUID and title
/cl/api/v1/directory/{folder_id}
Request Payload of folder_id (Post Method):
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | folder_id | Folder ID of the directory to be updated | Yes |
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
Parameter | directory_structure | Directory structure with folders and metadata | Yes |
/cl/api/v1/directory/{folder_id}
Request Payload of folder_id (Delete Method):
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | folder_id | Folder ID of the directory to be updated | Yes |
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
/cl/api/v1/directory/details/bulk
Request Payload of bulk:
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
Parameter | folder_ids | List of folder IDs | Yes |
/cl/api/v1/directory/aggregate/details
Request Payload of aggregate:
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | query_string | Query string to search for folders | Yes |
Query Parameter | sort_by | Sort results by title or updated_at | No |
Query Parameter | order | Sort result in ascending or descending order | No |
Query Parameter | page_no | Page number for the results (Minimum: 1) | No |
Query Parameter | page_size | Number of results per page (Default: 20) | No |
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
Parameter | object_ids | List of object IDs to filter by | No |
Parameter | folder_ids | List of folder IDs to filter by | No |
Parameter | with_exact_search | Whether to search for exact matches | No |
Parameter | is_private | Whether the folder is private (true/false) | No |
Parameter | created_by | User who created the folder | No |
Parameter | updated_by | User who last updated the folder | No |
Parameter | created_at | Date the folder was created (ISO format) | No |
Parameter | updated_at | Date the folder was last updated (ISO format) | No |
Parameter | custom_metadata | Custom metadata for filtering folders | No |
Parameter | is_anywhere | Whether to search anywhere within the folder | No |
Sorting Options:
sort_by
: Available values: title
, updated_at
(Default: updated_at
)
order
: Available values: asc
, desc
(Default: asc
)
page_no
: Default value: 1
page_size
: Default value: 20
Directory Structure:
name
: Name of the folder
is_private
: Whether the folder is private (true/false)
type
: Type of the item (e.g., "Folder")
children
: List of child items (if any)
custom_metadata
: Custom metadata associated with the folder
kvp
: Key-value pairs
tags
: List of tags
taxonomy
: List of taxonomy with UUID and title
2.2 Folder Operations
Endpoint: /cl/api/v1/directory/{folder_id}
GET
- Parameters:
folder_id
(required): UUID format
sorting_by
(optional): Sort by title or modified date
order
(optional): Ascending or descending
- Responses:
- 200: Directory found
- 404: Directory not found
- 500: Internal server error
- 422: Validation error
PUT
- Description: Updates metadata of a directory
- Parameters:
folder_id
(required)
ext_user_id_ref
(optional)
- Responses:
- 200: Successfully updated
- 403: Forbidden (attempt to update root directory)
- 404: Not found
- 409: Conflict
- 422: Validation error
POST
- Description: Adds directories to existing directory
- Parameters:
folder_id
(required): Parent folder ID
ext_user_id_ref
(optional)
- Responses:
- 201: Successfully added
- 206: Partially added
- 400: Connection error
- 404: Parent directory not found
- 409: Conflict
- 422: Validation error
DELETE
- Description: Deletes directory and child directories
- Parameters:
folder_id
(required)
ext_user_id_ref
(optional)
- Responses:
- 200: Successfully deleted
- 403: Forbidden (root directory)
- 404: Directory not found
- 422: Validation error
3. Object Management
3.1 Create Object
Endpoint: /cl/api/v2/objects
Method: POST
- Parameters:
ext_user_id_ref
(optional)
- Request Body: ObjectCreatePayloadV2
- Responses:
- 200: Object created successfully
- 400: Invalid argument
- 404: Object not found
- 500: Internal server error
- 422: Validation error
3.2 Get Object Details
Endpoint: /cl/api/v2/objects/{object_id}
Method: GET
- Parameters:
object_id
(required): UUID
ext_user_id_ref
(optional)
- Responses:
- 200: Object details retrieved
- 404: Object not found
- 400: Invalid argument
- 500: Internal server error
- 422: Validation error
3.3 Update Object
Endpoint: /cl/api/v2/objects/{object_id}
Method: PUT
- Parameters:
object_id
(required): UUID
ext_user_id_ref
(optional)
- Request Body: ObjectUpdatePayloadV2
- Responses:
- 200: Object updated successfully
- 404: Object not found
- 400: Invalid argument
- 500: Internal server error
- 422: Validation error
/cl/api/v2/objects
Request Payload of objects:
Request Payload:
Type | Parameter | Description | Required |
---|
Query Parameter | ext_user_id_ref | External user ID reference for the query | Yes |
Parameter | object_id | Unique identifier of the object | Yes |
Parameter | code | Code associated with the object | Yes |
Parameter | version_label | Version label of the object | Yes |
Parameter | object_type | Type of the object (e.g., "Document") | Yes |
Parameter | title | Title of the object | No |
Parameter | description | Description of the object | No |
Parameter | repos | List of repositories associated with the object | No |
Parameter | folders | List of folders associated with the object | No |
Parameter | system_metadata | System metadata details | No |
Parameter | custom_metadata | Custom metadata associated with the object | No |
Parameter | media_metadata | Media-specific metadata details | No |
Parameter | source_system_metadata | Metadata about the source system | No |
source
: Source of the object
is_private
: Whether the object is private (true/false)
is_deleted
: Whether the object is deleted (true/false)
is_lga
: Legal age group (e.g., "G")
license_expiration_date
: License expiration date (ISO format)
license_validity
: Whether the license is valid (true/false)
created_by_name
: Name of the user who created the object
is_latest_version
: Whether the object is the latest version (true/false)
source_category
: Source category of the object
extracted_text_file_url
: URL to the extracted text file
tags
: List of tags
kvp
: Key-value pairs with metadata IDs
taxonomy
: Taxonomy-related metadata
settings
: Additional settings
transcription_details
: Details about transcription (ID, language, URL, label)
streaming_details
: Streaming metadata (resolution, URL, label)
image_details
: Image metadata (height, width, thumbnail, credit line, additional metadata)
source_system_id
: Unique identifier for the source system
connector_info
: Connector-related information
source_url
: Source URL of the object
/cl/api/v2/objects/{object_id}