# Jobs

## Job Status

> Check the Job status by using its ID

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/{id}/status":{"get":{"summary":"Job Status","tags":["Jobs"],"description":"Check the Job status by using its ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Job ID"}],"responses":{"200":{"description":"Job status details","content":{"application/json":{"schema":{"description":"Job status details","type":"object","properties":{"workerId":{"type":"string"},"workerName":{"type":"string"},"activity":{"type":"string"},"status":{"type":"string"},"user":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"duration":{"type":"number"},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Test the connection to a data source

> Initiates a test connection job for the specified data source configuration. This job validates connectivity and configuration details for the given resource.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/test-connection":{"post":{"summary":"Test the connection to a data source","tags":["Jobs"],"description":"Initiates a test connection job for the specified data source configuration. This job validates connectivity and configuration details for the given resource.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Delete Datasource Job

> Deletes a datasource and cleans up associated metadata and data.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/remove-datasource":{"post":{"summary":"Trigger Delete Datasource Job","tags":["Jobs"],"description":"Deletes a datasource and cleans up associated metadata and data.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","fqdnId"],"properties":{"id":{"type":"string","description":"The unique identifier of the datasource to delete."},"fqdnId":{"type":"string","description":"The fully qualified domain name ID of the datasource."}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Ingest Schemas or Scan Job

> Starts a ingest schemas or scan job for the specified schemas and resource. This job can either ingest metadata for the given database and resource configuration, or perform a scan job to validate and preview schemas. Both operations fall under the same job type, differentiated by the example payloads provided below.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/metadata/ingest":{"post":{"summary":"Trigger Ingest Schemas or Scan Job","tags":["Jobs"],"description":"Starts a ingest schemas or scan job for the specified schemas and resource. This job can either ingest metadata for the given database and resource configuration, or perform a scan job to validate and preview schemas. Both operations fall under the same job type, differentiated by the example payloads provided below.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Metadata Reingestion Job

> Starts a metadata reingestion job for the specified entities. This job allows external systems or users to refresh and reload metadata for the given scope identifiers.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/metadata/re-ingest":{"post":{"summary":"Trigger Metadata Reingestion Job","tags":["Jobs"],"description":"Starts a metadata reingestion job for the specified entities. This job allows external systems or users to refresh and reload metadata for the given scope identifiers.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["scope"],"properties":{"scope":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"List of entity UUIDs for which metadata should be reingested."},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after reingestion"},"incremental":{"type":"boolean","description":"Enable incremental ingestion to scan only recently modified files"},"scanSinceTimeframe":{"type":"string","pattern":"^[1-9][0-9]*(s|m|h|d|w|mo|y)$","description":"Time period for incremental scan (e.g., 30s, 15m, 12h, 7d, 1w, 1mo, 1y). Only valid when incremental is true."}},"if":{"properties":{"incremental":{"enum":[true]}}},"then":{"properties":{"scanSinceTimeframe":{"type":"string"}}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Data Profiling Job

> Starts a data profiling job with configurable sampling and threading options.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/data-profiling":{"post":{"summary":"Trigger Data Profiling Job","tags":["Jobs"],"description":"Starts a data profiling job with configurable sampling and threading options.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["scope","configs"],"properties":{"scope":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"List of entity UUIDs to run data profiling."},"configs":{"type":"object","properties":{"headerExists":{"type":"boolean","default":true,"description":"Treat first row as header. By default, the first row does contain headers (true)."},"dataProfiledSinceDays":{"type":"number","default":0,"description":"Skip recent (days)"},"buildSamples":{"type":"boolean","default":false,"description":"Extract samples"},"sampleType":{"type":"string","enum":["SAMPLE_CLAUSE","FIRST_N_ROWS","EVERY_NTH_ROW","FILTER",""],"default":"","description":"Sample type"},"sampleMethod":{"type":"string","enum":["PERCENTAGE","ROWS",""],"default":"","description":"Sample method"},"sampleValue":{"type":"number","default":0,"description":"Sample value"},"jdbcRowLimitSize":{"type":"number","default":0,"description":"JDBC row limit size"},"nthValue":{"type":"number","default":0,"description":"Nth value"},"whereClause":{"type":"string","default":"","description":"Where clause"},"splitJobByColumns":{"type":"boolean","default":true,"description":"Split job by columns"},"columnsPerJob":{"type":"number","default":25,"description":"Columns per job"},"numberOfTablesPerJob":{"type":"number","default":10,"description":"Number of tables per job"},"persistThreads":{"type":"number","default":16,"description":"Persist threads"},"persistFilesThreads":{"type":"number","default":16,"description":"Persist file threads"},"profileThreads":{"type":"number","default":1,"description":"Profile threads"}}}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Data Discovery Job

> Starts a data discovery job with configuration options for sampling, ingestion, string scanning, and file handling.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/data-discovery":{"post":{"summary":"Trigger Data Discovery Job","tags":["Jobs"],"description":"Starts a data discovery job with configuration options for sampling, ingestion, string scanning, and file handling.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["scope","configs"],"properties":{"scope":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"List of entity UUIDs to run data discovery."},"configs":{"type":"object","properties":{"computeChecksum":{"type":"boolean","default":false,"description":"Compute checksum of document content used for duplicate detection"},"summarizeDocuments":{"type":"boolean","default":false,"description":"Summarize documents - Machine Learning Option"},"addressDetection":{"type":"boolean","default":false,"description":"Address Detection - Machine Learning Option"},"businessTerms":{"type":"array","items":{"type":"string","format":"uuid"},"default":[],"description":"Business term to be used for address detection."},"ingestProperties":{"type":"boolean","default":true,"description":"Extract document properties - Limited to documents with document properties (e.g., Office365 or PDF)"},"contentScanType":{"type":"string","enum":["SCAN_ONLY","SCAN_WITH_FREQUENCIES"],"default":"SCAN_ONLY","description":"Content scan for string detection - Scan documents to detect presence of strings. Determing only presence is efficient; finding count of all occurrences is expensive."},"dictionaryIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[],"description":"Dictionary (each value is a string) - Used for string detection"},"dataPatternIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[],"description":"Data patterns (each value is a string) - Used for string detection"},"buildSamples":{"type":"boolean","default":false,"description":"Extract samples - Data Profiling"},"headerExists":{"type":"boolean","default":false,"description":"Treat first row as header - Data Profiling"},"dataProfiledSinceDays":{"type":"number","default":0,"description":"Skip recent day(s)"},"filesModifiedLaterThanDays":{"type":"number","default":0,"description":"Files modified more than day(s) ago"},"filesAccessedLaterThanDays":{"type":"number","default":0,"description":"Files accessed more than day(s) ago"},"extensions":{"type":"array","items":{"type":"string"},"default":[],"description":"Include file extensions - Specify the file extensions you want to include in this processing"},"supportedMaxFileSize":{"type":"string","default":"100MB","description":"Restrict file size (e.g., 100MB)"},"additionalFileProcessingThreads":{"type":"string","default":"8","description":"File processing threads - Opt for fewer threads when processing large files"},"persistenceThreads":{"type":"string","default":"32","description":"Persistence threads"},"includePatterns":{"type":"array","items":{"type":"string"},"default":[],"description":"Include patterns - Include Files matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"default":[],"description":"Exclude patterns - Exclude Files matching these patterns"}}}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Data Identification Job

> \
> Runs a Data Identification job that applies dictionary-based and pattern-based techniques to identify data content across data entities.\
> \
> 🚨 \*\*Prerequisite\*\*  - Data Profiling and Data Discovery must be completed on the provided scope entity IDs before running this job.\
> \
> This job performs:\
> \
> • \*\*Dictionary Matching\*\* - Word/term lists are transformed into bitsets, HLLs, and patterns. Matching is based on bitset comparison. Dictionary terms are lowercased during bitset creation to ensure consistent matching regardless of case.\
> \
> • \*\*Pattern Analysis\*\* - Regular expressions and profiling-derived patterns are used to identify structural patterns in column data. Substring containment is a commonly applied method in this stage.<br>

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/data-identification":{"post":{"summary":"Trigger Data Identification Job","tags":["Jobs"],"description":"\nRuns a Data Identification job that applies dictionary-based and pattern-based techniques to identify data content across data entities.\n\n🚨 **Prerequisite**  - Data Profiling and Data Discovery must be completed on the provided scope entity IDs before running this job.\n\nThis job performs:\n\n• **Dictionary Matching** - Word/term lists are transformed into bitsets, HLLs, and patterns. Matching is based on bitset comparison. Dictionary terms are lowercased during bitset creation to ensure consistent matching regardless of case.\n\n• **Pattern Analysis** - Regular expressions and profiling-derived patterns are used to identify structural patterns in column data. Substring containment is a commonly applied method in this stage.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["scope"],"properties":{"scope":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"List of entity UUIDs for which metadata should be reingested."},"dictionaryIds":{"type":"array","items":{"type":"string"},"default":[],"description":"Dictionary IDs - Used for dictionary matching"},"dataPatternIds":{"type":"array","items":{"type":"string"},"default":[],"description":"Data patterns IDs - Used for pattern analysis"}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Collection Data Profile Job

> Generate statistical and intermediate data with default options.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/collections/data-profiling":{"post":{"summary":"Trigger Collection Data Profile Job","tags":["Jobs"],"description":"Generate statistical and intermediate data with default options.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["collectionId"],"properties":{"collectionId":{"type":"string","format":"uuid","description":"The unique identifier of the collection to profile."},"configs":{"type":"object","properties":{"headerExists":{"type":"boolean","default":false,"description":"Treat first row as header. By default, the first row does not contain headers (false)."}}}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Collection Data Aggregation Job

> Summarization of stats at Collection level.\
> &#x20; \
> \
> 🚨 \*\*Note:\*\* The \*\*collectionId\*\* passed should be of type \*\*'dataset'\*\*.&#x20;

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/collections/data-aggregation":{"post":{"summary":"Trigger Collection Data Aggregation Job","tags":["Jobs"],"description":"Summarization of stats at Collection level.\n  \n\n🚨 **Note:** The **collectionId** passed should be of type **'dataset'**. ","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["collectionId"],"properties":{"collectionId":{"type":"string","format":"uuid","description":"The unique identifier of the collection of type dataset to aggregate."}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Business Rule Job

> Executes business rules to validate data quality across entities.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/business-rule":{"post":{"summary":"Trigger Business Rule Job","tags":["Jobs"],"description":"Executes business rules to validate data quality across entities.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ruleId"],"properties":{"ruleId":{"type":"array","items":{"type":"string"},"minItems":1,"description":"List of business rule IDs to execute."}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Business Rule with Counter Job

> Executes business rules and counts the number of rows that match the rule criteria across specified entities.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/business-rule/with-row-counter":{"post":{"summary":"Trigger Business Rule with Counter Job","tags":["Jobs"],"description":"Executes business rules and counts the number of rows that match the rule criteria across specified entities.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ruleId","scope"],"properties":{"ruleId":{"type":"array","items":{"type":"string"},"minItems":1,"description":"List of business rule IDs to execute."},"scope":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"List of entity UUIDs to run business rule counting on."}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger Usage Statistics Job

> Generates usage statistics for specified entities within a date range.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/usage-statistics":{"post":{"summary":"Trigger Usage Statistics Job","tags":["Jobs"],"description":"Generates usage statistics for specified entities within a date range.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["scope","configs"],"properties":{"scope":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"List of entity UUIDs to generate usage statistics for."},"configs":{"type":"object","required":["startDate","endDate"],"properties":{"startDate":{"type":"string","format":"date","description":"Start date for usage statistics (YYYY-MM-DD format)."},"endDate":{"type":"string","format":"date","description":"End date for usage statistics (YYYY-MM-DD format)."}}}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Trigger PII Detection Job

> Starts a PII detection job to analyze and identify appropriate column names for ML use

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/pii-detection":{"post":{"summary":"Trigger PII Detection Job","tags":["Jobs"],"description":"Starts a PII detection job to analyze and identify appropriate column names for ML use","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["scope","configs"],"properties":{"scope":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"List of entity UUIDs to run PII detection."},"configs":{"type":"object","properties":{"language":{"type":"string","enum":["JAPANESE","KOREAN"],"default":"JAPANESE","description":"Language"}}}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Calculate trust score

> Calculate trust score job for the specified data source configuration. This job calculates trust scores based on various factors to assess data reliability and quality.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/jobs/execute/calculate-trust-score":{"post":{"summary":"Calculate trust score","tags":["Jobs"],"description":"Calculate trust score job for the specified data source configuration. This job calculates trust scores based on various factors to assess data reliability and quality.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["scope"],"properties":{"scope":{"type":"array","items":{"type":"string"},"description":"scope of entity to calculate trust score"}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"resourceIds":{"type":"array","items":{"type":"string"}},"scope":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"}}}},"scope":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}}}},"_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"workerName":{"type":"string"},"activity":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"pId":{"type":"number"},"__v":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```
