# Search

## Search Assets

> This searches for assets across the PDC that are available based on the provided search term and optional facets.\
> &#x20;               \
> \
> 🚨 \*\*Note:\*\* Results are limited to 10,000 items.Please refrain your search using facets.

```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/search":{"post":{"summary":"Search Assets","tags":["Search"],"description":"This searches for assets across the PDC that are available based on the provided search term and optional facets.\n                \n\n🚨 **Note:** Results are limited to 10,000 items.Please refrain your search using facets.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["searchTerm"],"properties":{"searchTerm":{"type":"string"},"searchFacets":{"type":"object","additionalProperties":false,"properties":{"index":{"type":"array","items":{"type":"string"},"description":"Filter by specific index (e.g., pdc_entities)"},"type":{"type":"array","items":{"type":"string"},"description":"Filter by asset type (e.g., FILE, COLUMN)"},"rootIds":{"type":"array","items":{"type":"string"},"description":"Filter by rootId"},"businessTerms":{"type":"array","items":{"type":"string"},"description":"Filter by business term (attributes.businessTerms.name)"},"fileFormats":{"type":"array","items":{"type":"string"},"description":"Filter by file format (metadata.file.type)"},"sensitivity":{"type":"array","items":{"type":"string"},"description":"Filter by sensitivity (attributes.features.sensitivity)"},"domain":{"type":"array","items":{"type":"string"},"description":"Filter by domain (attributes.info.domain)"},"qualityScore":{"type":"array","items":{"type":"number"},"description":"Filter by quality score (attributes.features.qualityScore)"},"trustScore":{"type":"array","items":{"type":"number"},"description":"Filter by trust score (attributes.features.trustScore.value)"},"columnKeys":{"type":"array","items":{"type":"string"},"description":"Filter by column key (metadata.column.isPrimaryKey,metadata.column.isForeignKey)"},"profiledAt":{"type":"array","items":{"type":"string","format":"date-time"},"description":"Filter by profiling date (system.profiledAt)"},"modifiedAt":{"type":"array","items":{"type":"string","format":"date-time"},"description":"Filter by modification date (metadata.file.modifiedAt)"},"accessedAt":{"type":"array","items":{"type":"string","format":"date-time"},"description":"Filter by access date (metadata.file.accessedAt)"},"tags":{"type":"array","items":{"type":"string"},"description":"Filter by tag (attributes.tags.name)"},"buckets":{"type":"array","items":{"type":"string"},"description":"Filter by bucket (metadata.file.bucket)"},"parentIds":{"type":"array","items":{"type":"string"},"description":"Filter by parent ID (parentId)"}}},"page":{"type":"number","default":1},"perPage":{"type":"number","default":30}}}}},"required":true},"responses":{"200":{"description":"Search results retrieved successfully","content":{"application/json":{"schema":{"description":"Search results retrieved successfully","type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"pageInfo":{"type":"object","description":"Pagination information for the search results","properties":{"currentPage":{"type":"number","description":"Current page number of the search results"},"perPage":{"type":"number","description":"Number of results per page"},"totalMatchCount":{"type":"number","description":"Total number of matching assets found"},"retrievableCount":{"type":"number","description":"Number of assets that can be retrieved."},"pageCount":{"type":"number","description":"Total number of pages available for the search results"}}},"data":{"type":"array","description":"List of search results","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the asset"},"name":{"type":"string","description":"Name of the asset"},"description":{"oneOf":[{"type":"string","nullable":true},{"type":"object","additionalProperties":true}]},"index":{"type":"string","description":"The index where the asset is stored"},"type":{"type":"string","description":"Type of the asset"},"fqdn":{"type":"string","nullable":true,"description":"Fully qualified domain name"},"style":{"type":"object","nullable":true,"properties":{"color":{"type":"string"},"icon":{"type":"string"}}},"businessTerms":{"type":"array","nullable":true,"items":{"type":"object","properties":{"termId":{"type":"string","format":"uuid"},"name":{"type":"string"},"fqdn":{"type":"string"},"glossaryId":{"type":"string","format":"uuid"}}}},"permissions":{"type":"array","nullable":true,"items":{"type":"string"}},"properties":{"type":"object","nullable":true,"additionalProperties":true}}}}}}}}},"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"}}}}}}}}}}}
```

## Search Facets

> Retrieves available facets for search

```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/search/facets":{"post":{"summary":"Search Facets","tags":["Search"],"description":"Retrieves available facets for search","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["searchTerm"],"properties":{"searchTerm":{"type":"string"},"searchFacets":{"type":"object","additionalProperties":false,"properties":{"index":{"type":"array","items":{"type":"string"},"description":"Filter by specific index (e.g., pdc_entities)"},"type":{"type":"array","items":{"type":"string"},"description":"Filter by asset type (e.g., FILE, COLUMN)"},"rootIds":{"type":"array","items":{"type":"string"},"description":"Filter by rootId"},"businessTerms":{"type":"array","items":{"type":"string"},"description":"Filter by business term (attributes.businessTerms.name)"},"fileFormats":{"type":"array","items":{"type":"string"},"description":"Filter by file format (metadata.file.type)"},"sensitivity":{"type":"array","items":{"type":"string"},"description":"Filter by sensitivity (attributes.features.sensitivity)"},"domain":{"type":"array","items":{"type":"string"},"description":"Filter by domain (attributes.info.domain)"},"qualityScore":{"type":"array","items":{"type":"number"},"description":"Filter by quality score (attributes.features.qualityScore)"},"trustScore":{"type":"array","items":{"type":"number"},"description":"Filter by trust score (attributes.features.trustScore.value)"},"columnKeys":{"type":"array","items":{"type":"string"},"description":"Filter by column key (metadata.column.isPrimaryKey,metadata.column.isForeignKey)"},"profiledAt":{"type":"array","items":{"type":"string","format":"date-time"},"description":"Filter by profiling date (system.profiledAt)"},"modifiedAt":{"type":"array","items":{"type":"string","format":"date-time"},"description":"Filter by modification date (metadata.file.modifiedAt)"},"accessedAt":{"type":"array","items":{"type":"string","format":"date-time"},"description":"Filter by access date (metadata.file.accessedAt)"},"tags":{"type":"array","items":{"type":"string"},"description":"Filter by tag (attributes.tags.name)"},"buckets":{"type":"array","items":{"type":"string"},"description":"Filter by bucket (metadata.file.bucket)"},"parentIds":{"type":"array","items":{"type":"string"},"description":"Filter by parent ID (parentId)"}}}}}}},"required":true},"responses":{"200":{"description":"Search results retrieved successfully","content":{"application/json":{"schema":{"description":"Search results retrieved successfully","type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"data":{"type":"array","description":"List of search facets","items":{"type":"object","properties":{"key":{"type":"string","description":"Facet key (e.g., index, type)"},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Facet option name"},"count":{"type":"number","description":"Count of assets for this facet option"},"value":{"type":"string","description":"Optional value for the facet option, if applicable"}}}}}}}}}}}},"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"}}}}}}}}}}}
```
