{"components":{"schemas":{"entities.ApiByAuthTitleMetrics":{"properties":{"totalCount":{"type":"integer"},"values":{"additionalProperties":{"$ref":"#/components/schemas/entities.NewExistingCounts"},"type":"object"}},"type":"object"},"entities.ApiByRiskLevelsMetrics":{"properties":{"totalCount":{"type":"integer"},"values":{"additionalProperties":{"$ref":"#/components/schemas/entities.NewExistingCounts"},"type":"object"}},"type":"object"},"entities.ApiDefinitionSummary":{"properties":{"id":{"type":"string"},"title":{"type":"string"}},"type":"object"},"entities.ApiEndpoint":{"properties":{"apiId":{"type":"string"},"appTags":{"items":{"type":"string"},"type":"array"},"auth":{"$ref":"#/components/schemas/entities.ApiEndpointAuth"},"createdDate":{"type":"string","description":"Spec createdAt (RFC3339 UTC) for published inventory; firstSeen for discovered."},"discovery":{"$ref":"#/components/schemas/entities.ApiEndpointDiscovery"},"endpointId":{"type":"string"},"firstSeen":{"type":"string"},"hasNonConformances":{"type":"boolean"},"host":{"type":"string"},"labels":{"items":{"type":"string"},"type":"array"},"lastSeen":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"riskData":{"$ref":"#/components/schemas/entities.ApiEndpointRiskData"},"schemes":{"items":{"type":"string"},"type":"array"},"sensitiveData":{"$ref":"#/components/schemas/entities.ApiEndpointSensitiveData"},"sourceInfo":{"$ref":"#/components/schemas/entities.ApiEndpointSourceInfo"},"uriQueryFragment":{"type":"string"}},"type":"object"},"entities.ApiEndpointAuth":{"properties":{"types":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.ApiEndpointCounts":{"properties":{"existing":{"type":"integer"},"new":{"type":"integer"},"updated":{"type":"integer"}},"type":"object"},"entities.ApiEndpointDiscovery":{"properties":{"apiId":{"type":"string"},"hostExposure":{"type":"string"},"ipExposure":{"type":"string"},"isParameterized":{"type":"boolean"},"responseContentTypes":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"}},"type":"object"},"entities.ApiEndpointRisk":{"properties":{"category":{"type":"string"},"firstSeen":{"type":"string"},"id":{"type":"string"},"issueStatus":{"type":"string"},"lastSeen":{"type":"string"},"name":{"type":"string"},"score":{"type":"integer"}},"type":"object"},"entities.ApiEndpointRiskData":{"properties":{"hasRisks":{"type":"boolean"},"risks":{"items":{"$ref":"#/components/schemas/entities.ApiEndpointRisk"},"type":"array"},"score":{"type":"integer"}},"type":"object"},"entities.ApiEndpointSensitiveData":{"description":"Sensitive data summary for endpoints returned by POST /v1/endpoints/search. When the inventory document includes detail, `locations` lists where sensitive data was observed (for example request headers), sensitive entity type identifiers, and first/last seen timestamps. `locations` may be empty when `hasSensitiveData` is false or the document has no location rows.\n","properties":{"hasSensitiveData":{"type":"boolean"},"locations":{"description":"Per-location sensitive data observations from the inventory index when stored on the document.\n","items":{"$ref":"#/components/schemas/entities.ApiEndpointSensitiveLocation"},"type":"array"}},"type":"object"},"entities.ApiEndpointSensitiveLocation":{"description":"One observed sensitive-data location for an endpoint in the inventory index.","properties":{"entities":{"items":{"type":"string"},"type":"array"},"firstSeen":{"type":"string"},"lastSeen":{"type":"string"},"location":{"type":"string"}},"type":"object"},"entities.ApiEndpointSourceInfo":{"properties":{"poolId":{"type":"string"},"type":{"type":"string"}},"type":"object"},"entities.ApiEndpointsRequest":{"properties":{"endTime":{"type":"integer"},"filters":{"items":{"$ref":"#/components/schemas/entities.Filter"},"type":"array"},"nextPageRecordKey":{"type":"string"},"page":{"type":"integer"},"pageSize":{"type":"integer"},"previousPageRecordKey":{"type":"string"},"sort":{"items":{"$ref":"#/components/schemas/entities.SortFilter"},"type":"array"},"startTime":{"type":"integer"},"trafficStatus":{"$ref":"#/components/schemas/entities.TrafficStatus"}},"type":"object"},"entities.ApiEndpointsResponse":{"properties":{"endpoints":{"items":{"$ref":"#/components/schemas/entities.ApiEndpoint"},"type":"array"}},"type":"object"},"entities.ApiScope":{"description":"Defines which APIs a risk rule applies to","properties":{"mode":{"description":"Scope mode: ALL applies to all APIs, INCLUDE applies only to listed APIs, EXCLUDE applies to all except listed APIs","enum":["ALL","INCLUDE","EXCLUDE"],"type":"string"},"api_ids":{"description":"List of API IDs (relevant for INCLUDE/EXCLUDE modes, empty for ALL)","items":{"type":"string"},"type":"array"}},"type":"object"},"entities.ApiSpecContact":{"properties":{"email":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"url":{"type":"string"}},"type":"object"},"entities.ApiSpecs":{"properties":{"components":{},"contact":{"$ref":"#/components/schemas/entities.ApiSpecContact"},"createdAt":{"type":"string"},"endpointIndex":{"items":{"$ref":"#/components/schemas/entities.EndpointIndexItem"},"type":"array"},"group":{"type":"string"},"id":{"type":"string"},"rawSpecCompressed":{"type":"string"},"rawSpecMetadata":{"$ref":"#/components/schemas/entities.RawSpecMetadata"},"schemes":{"items":{"type":"string"},"type":"array"},"servers":{"items":{"type":"string"},"type":"array"},"specId":{"type":"string"},"specMetadata":{"$ref":"#/components/schemas/entities.SpecMetadata"},"specVersion":{"type":"string"},"isGenerated":{"description":"Same as specMetadata.isGenerated; present for clients that read a top-level flag.","type":"boolean"},"updatedAt":{"type":"string"},"validationData":{}},"type":"object"},"entities.ApiSpecsData":{"properties":{"existing":{"$ref":"#/components/schemas/entities.CountWithValues"},"new":{"$ref":"#/components/schemas/entities.CountWithValues"},"updated":{"$ref":"#/components/schemas/entities.CountWithValues"}},"type":"object"},"entities.ApiSpecsTextSearchRequest":{"description":"Request for free-text inventory search over API specs (title, specMetadata.contact.name, specMetadata.baseUrl, servers, normalizedHosts). query must be at least 3 characters after trim (maximum 256). Server applies case-insensitive substring matching and stable sort (updatedAt desc, then document _id asc) with Elasticsearch search_after; forward-only cursor in response pagination.nextPageRecordKey.","properties":{"nextPageRecordKey":{"description":"Opaque cursor from a prior response; forward pagination only.","type":"string"},"pageSize":{"description":"Page size. When omitted, the server uses its default (typically 20). Maximum 100.","maximum":100,"minimum":1,"type":"integer"},"query":{"description":"Search text after trim; minimum 3 characters, maximum 256. Matches substrings in title, specMetadata.contact.name, specMetadata.baseUrl, servers, and normalizedHosts. Wildcard/regex metacharacters are treated literally by the server (escaped in queries).","maxLength":256,"minLength":3,"type":"string"}},"required":["query"],"type":"object"},"entities.AssignToGroupRequest":{"properties":{"apis":{"items":{"type":"string"},"type":"array"},"groupName":{"type":"string"}},"type":"object"},"entities.BodyFieldEntry":{"description":"Metadata for a single body field key in request or response body","properties":{"count":{"type":"integer"},"cqCount":{"type":"integer"},"cqIsNonConformant":{"type":"boolean"},"cqNonConformance":{"items":{"type":"string"},"type":"array"},"cqSensitiveData":{"items":{"type":"string"},"type":"array"},"dominantPercent":{"type":"number"},"dominantType":{"type":"string"},"drift":{"type":"boolean"},"enumValues":{"items":{"type":"string"},"type":"array"},"isEnum":{"type":"boolean"},"isNonConformant":{"type":"boolean"},"nonConformance":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"},"sensitiveData":{"items":{"type":"string"},"type":"array"},"statusCode":{"type":"string"},"typeDistribution":{"additionalProperties":{"type":"integer"},"type":"object"}},"type":"object"},"entities.CookiesDetails":{"properties":{"cookies":{"items":{"type":"string"},"type":"array"},"count":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"entities.CountWithValues":{"properties":{"count":{"type":"integer"},"values":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.Counter":{"properties":{"count":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"entities.CreateApiSpecRequest":{"properties":{"openApiSpec":{},"servers":{"items":{"type":"string"},"type":"array"},"title":{"description":"Optional overrides that, if provided, should take precedence over values in the spec","type":"string"}},"required":["openApiSpec"],"type":"object"},"entities.ListApiSpecsRequest":{"description":"Request body for list_api_specs (POST /v1/specs/list). All fields optional; defaults match the former GET list behavior.","properties":{"order":{"description":"Sort direction for `sortBy`. Required when `sortBy` is set unless using defaults. `asc` or `desc`. When omitted with `sortBy`, defaults to `desc` for `updatedAt` and `asc` for other fields.","enum":["asc","desc"],"type":"string"},"page":{"description":"1-based page index. Defaults to 1.","minimum":1,"type":"integer"},"pageCount":{"description":"Page size (1–100). Defaults to 20.","maximum":100,"minimum":1,"type":"integer"},"sortBy":{"description":"Primary sort field. Omitted or empty means `updatedAt` descending with `_id` ascending (legacy list order). For any field except `updatedAt`, tie-breakers are `updatedAt` descending then `_id` ascending. `specVersion` sorts lexicographically on the top-level keyword field (OpenAPI `info.version` at ingest), not semver-aware.","enum":["definitionName","normalizedHost","updatedAt","group","contact","isGenerated","specVersion"],"type":"string"}},"type":"object"},"entities.CreateLabelRequest":{"properties":{"description":{"example":"A security-related label","type":"string"},"name":{"example":"Security Label","type":"string"},"type":{"example":"security","type":"string"}},"required":["name","type"],"type":"object"},"entities.CreateLabelTypeRequest":{"properties":{"name":{"type":"string"}},"type":"object"},"entities.DashboardApiDefinitionsRequest":{"properties":{"servers":{"items":{"type":"string"},"type":"array"},"startTime":{"type":"integer"}},"required":["startTime"],"type":"object"},"entities.DashboardApiDefinitionsResponse":{"properties":{"apiSpecs":{"$ref":"#/components/schemas/entities.ApiSpecsData"},"domains":{"$ref":"#/components/schemas/entities.DomainsData"},"exposures":{"$ref":"#/components/schemas/entities.ExposuresData"},"filterDomains":{"items":{"type":"string"},"type":"array"},"resourceDefinitionsCount":{"type":"integer"},"valueGraphs":{"$ref":"#/components/schemas/entities.ValueGraphsData"}},"type":"object"},"entities.DashboardApiEndpointsRequest":{"properties":{"servers":{"items":{"type":"string"},"type":"array"},"startTime":{"type":"integer"}},"required":["startTime"],"type":"object"},"entities.DashboardApiEndpointsResponse":{"properties":{"discoveredApiEndpoints":{"$ref":"#/components/schemas/entities.ApiEndpointCounts"},"publishedApiEndpoints":{"$ref":"#/components/schemas/entities.ApiEndpointCounts"},"shadowApiEndpoints":{"$ref":"#/components/schemas/entities.ApiEndpointCounts"},"totalApi":{"type":"integer"},"totalApiActive":{"type":"integer"},"totalApiInactive":{"type":"integer"},"valueGraphs":{"$ref":"#/components/schemas/entities.ValueGraphs"}},"type":"object"},"entities.DashboardSummaryMetricsRequest":{"properties":{"servers":{"items":{"type":"string"},"type":"array"},"startTime":{"type":"integer"}},"required":["startTime"],"type":"object"},"entities.DashboardSummaryMetricsResponse":{"properties":{"apiByAuthTitle":{"$ref":"#/components/schemas/entities.ApiByAuthTitleMetrics"},"apiByRiskCategoryNew":{"description":"Same as risk-posture API response"},"apiByRiskLevels":{"$ref":"#/components/schemas/entities.ApiByRiskLevelsMetrics"},"sensitiveDataExposure":{"$ref":"#/components/schemas/entities.SensitiveDataExposureMetrics"}},"type":"object"},"entities.DeleteEndpointsRequest":{"properties":{"endpointIDs":{"items":{"type":"string"},"minItems":1,"type":"array"}},"required":["endpointIDs"],"type":"object"},"entities.DeleteEndpointsResponse":{"properties":{"deletedCount":{"type":"integer"}},"type":"object"},"entities.ClearEndpointRiskResponse":{"properties":{"updatedCount":{"type":"integer"}},"type":"object"},"entities.DeleteRiskRulesRequest":{"properties":{"id":{"description":"For single delete","type":"string"},"ids":{"description":"For bulk delete","items":{"type":"string"},"type":"array"}},"type":"object"},"entities.CreateRiskRuleFromCatalogRequest":{"properties":{"api_scope":{"$ref":"#/components/schemas/entities.ApiScope"},"catalog_rule_id":{"type":"string"},"config":{"additionalProperties":true,"description":"Configuration values for the catalog rule CEL template","type":"object"},"description":{"type":"string"},"enabled":{"type":"boolean"},"name":{"type":"string"},"priority":{"type":"integer"},"tags":{"items":{"type":"string"},"type":"array"}},"required":["catalog_rule_id"],"type":"object"},"entities.CELFunction":{"properties":{"detail":{"type":"string"},"documentation":{"type":"string"},"insertText":{"type":"string"},"insertTextRules":{"type":"integer"},"kind":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"entities.CELNamespace":{"properties":{"detail":{"type":"string"},"documentation":{"type":"string"},"functions":{"items":{"$ref":"#/components/schemas/entities.CELFunction"},"type":"array"},"label":{"type":"string"},"name":{"type":"string"}},"type":"object"},"entities.CELFunctionCatalog":{"properties":{"keywords":{"items":{"type":"string"},"type":"array"},"namespaces":{"items":{"$ref":"#/components/schemas/entities.CELNamespace"},"type":"array"},"operators":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.ParametrizationRule":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"pattern":{"type":"string"},"methods":{"items":{"type":"string"},"type":"array"},"servers":{"items":{"type":"string"},"type":"array"},"matchLongerUris":{"type":"boolean"},"parameterize":{"description":"When false, the discovery pattern is disabled.","type":"boolean"},"type":{"description":"Rule scope kind (e.g. targeted, global); older documents may use custom.","type":"string"},"config":{"description":"Per-segment parametrization metadata (e.g. parts with regex, placeholders, exceptions).","type":"object","additionalProperties":true},"priority":{"description":"Evaluation order among custom discovery patterns: lower values are applied first. New patterns are assigned max(existing priority)+1 on create. Ties are resolved by createdAt then id when listing.","type":"integer"},"category":{"nullable":true,"type":"string"},"label":{"nullable":true,"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"modifiedBy":{"type":"string"}},"required":["name","pattern"],"type":"object"},"entities.DiscoveryPatternPriorityItem":{"type":"object","required":["id","priority"],"properties":{"id":{"type":"string"},"priority":{"type":"integer"}}},"entities.DiscoveryPatternsReorderRequest":{"type":"object","required":["priorities"],"properties":{"priorities":{"type":"array","items":{"$ref":"#/components/schemas/entities.DiscoveryPatternPriorityItem"}}}},"entities.DiscoveryPatternsReorderResult":{"type":"object","properties":{"updated":{"type":"integer"}}},"entities.DiscoveryRulesOrder":{"properties":{"createdAt":{"format":"int64","type":"integer"},"doc_timestamp":{"type":"string"},"order":{"description":"Ordered list of discovery rule classifier names","items":{"type":"string"},"type":"array"},"updatedAt":{"format":"int64","type":"integer"}},"type":"object"},"entities.DiscoverySystemPatternHosts":{"properties":{"include":{"items":{"type":"string"},"type":"array"},"exclude":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.DiscoverySystemPatternExceptions":{"properties":{"exact":{"items":{"type":"string"},"type":"array"},"regex":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.DiscoverySystemPattern":{"properties":{"config":{"description":"Rule-specific config (e.g. lookahead `lookahead-pairs`)","type":"object"},"description":{"type":"string"},"exceptions":{"$ref":"#/components/schemas/entities.DiscoverySystemPatternExceptions"},"hosts":{"$ref":"#/components/schemas/entities.DiscoverySystemPatternHosts"},"id":{"type":"string"},"name":{"type":"string"},"parameterize":{"description":"When false, the rule does not apply.","type":"boolean"},"regex":{"description":"Regex config; array of strings and/or objects with pattern, fetch, args","items":{},"type":"array"},"type":{"type":"string"}},"type":"object"},"entities.DomainsData":{"properties":{"existing":{"$ref":"#/components/schemas/entities.CountWithValues"},"new":{"$ref":"#/components/schemas/entities.CountWithValues"},"updated":{"$ref":"#/components/schemas/entities.CountWithValues"}},"type":"object"},"entities.EndpointIndexItem":{"properties":{"componentCount":{"type":"integer"},"endpointId":{"type":"string"},"hasRequestBody":{"type":"boolean"},"hasSecurity":{"type":"boolean"},"method":{"type":"string"},"operationId":{"type":"string"},"parameterComponents":{"items":{"type":"string"},"type":"array"},"path":{"type":"string"},"requestBodyComponents":{"items":{"type":"string"},"type":"array"},"requiredComponents":{"items":{"type":"string"},"type":"array"},"responseComponents":{"items":{"type":"string"},"type":"array"},"tags":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.EndpointInput":{"description":"Endpoint input with optional auth types for spec generation","properties":{"id":{"description":"Inventory endpoint identifier","type":"string"},"authTypes":{"description":"Authentication types for this endpoint (e.g., API_KEY_HEADER, OAUTH_HEADER, BASIC_AUTH, API_KEY_QUERY_PARAM, OAUTH_QUERY_PARAM, TOKEN_COOKIE)","items":{"type":"string"},"type":"array"}},"required":["id"],"type":"object"},"entities.EndpointPagination":{"properties":{"nextPageRecordKey":{"type":"string"},"previousPageRecordKey":{"type":"string"},"total":{"type":"integer"}},"type":"object"},"entities.EndpointItem":{"description":"Single row from the endpoints inventory search.","properties":{"id":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"host":{"type":"string"},"firstSeen":{"type":"string"},"lastSeen":{"type":"string"},"appTags":{"items":{"type":"string"},"type":"array"},"labels":{"items":{"type":"string"},"type":"array"},"apiId":{"type":"string"},"responseContentTypes":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.EndpointSearchRequest":{"description":"Request body for POST /v1/endpoints/search (filters and pagination).","properties":{"pageSize":{"type":"integer"},"previousPageRecordKey":{"type":"string"},"nextPageRecordKey":{"type":"string"},"startTime":{"type":"integer","format":"int64"},"endTime":{"type":"integer","format":"int64"},"trafficStatus":{"$ref":"#/components/schemas/entities.TrafficStatus"},"filters":{"items":{"$ref":"#/components/schemas/entities.Filter"},"type":"array"},"sortFilter":{"items":{"$ref":"#/components/schemas/entities.SortFilter"},"type":"array"},"searchFilter":{"items":{"$ref":"#/components/schemas/entities.SearchFilter"},"type":"array"},"searchQuery":{"type":"string"}},"type":"object"},"entities.EndpointsIssueDetails":{"properties":{"id":{"type":"string"},"issueHistory":{"items":{"$ref":"#/components/schemas/entities.IssueHistoryItem"},"type":"array"},"method":{"type":"string"},"metricsRiskFirstSeen":{"type":"string"},"metricsRiskLastSeen":{"type":"string"},"path":{"type":"string"},"server":{"type":"string"}},"type":"object"},"entities.ErrorResponse":{"properties":{"code":{"example":"400","type":"string"},"data":{},"message":{"example":"Error occurred","type":"string"},"ok":{"example":false,"type":"boolean"}},"type":"object"},"entities.EvidenceResponse":{"properties":{"dataSizeInKB":{"type":"integer"},"resourceHit":{}},"type":"object"},"entities.ExposureCategoryData":{"properties":{"existing":{"$ref":"#/components/schemas/entities.CountWithValues"},"new":{"$ref":"#/components/schemas/entities.CountWithValues"},"updated":{"$ref":"#/components/schemas/entities.CountWithValues"}},"type":"object"},"entities.ExposureRequest":{"properties":{"id":{"type":"string"},"internalDomains":{"items":{"type":"string"},"minItems":1,"type":"array"},"thirdPartyOverride":{"items":{"type":"string"},"minItems":1,"type":"array"}},"required":["internalDomains","thirdPartyOverride"],"type":"object"},"entities.ExposuresData":{"properties":{"EXTERNAL":{"$ref":"#/components/schemas/entities.ExposureCategoryData"},"INTERNAL":{"$ref":"#/components/schemas/entities.ExposureCategoryData"},"THIRD_PARTY":{"$ref":"#/components/schemas/entities.ExposureCategoryData"},"UNDETERMINED":{"$ref":"#/components/schemas/entities.ExposureCategoryData"}},"type":"object"},"entities.Filter":{"properties":{"field":{"type":"string"},"operator":{"$ref":"#/components/schemas/entities.Operator"},"values":{"description":"Values can be empty for isEmpty/isNotEmpty operators","items":{"type":"string"},"type":"array"}},"required":["field","operator"],"type":"object"},"entities.GenerateSpecRequest":{"properties":{"description":{"type":"string"},"endTime":{"description":"Optional end of time window (epoch ms) for transaction aggregation","format":"int64","type":"integer"},"endpointIds":{"description":"Deprecated: use endpoints instead. Inventory endpoint identifiers to include in the generated spec","items":{"type":"string"},"minItems":1,"type":"array"},"endpoints":{"description":"Endpoints with optional auth types for the generated spec. Use this instead of endpointIds.","items":{"$ref":"#/components/schemas/entities.EndpointInput"},"minItems":1,"type":"array"},"servers":{"description":"Optional server base URLs (hostnames) for the generated OpenAPI `servers` list","items":{"type":"string"},"type":"array"},"serverSchemes":{"description":"Protocol schemes to apply to servers (http, https). Creates server entries for each combination. Defaults to [https].","items":{"type":"string","enum":["http","https"]},"type":"array"},"startTime":{"description":"Optional start of time window (epoch ms) for transaction aggregation","format":"int64","type":"integer"},"title":{"description":"Value for `info.title` in the generated spec","type":"string"},"typeThreshold":{"description":"Minimum fraction of samples for the dominant type before using a single schema; below this the generator may emit oneOf. Non-positive values are treated as server default (typically 0.95).","type":"number"},"version":{"description":"Value for `info.version` in the generated spec","type":"string"}},"required":["title"],"type":"object"},"entities.GenerateSpecResponse":{"properties":{"confidence":{"description":"Heuristic confidence score for the inferred schema (0–1)","type":"number"},"endpointsMapped":{"description":"Number of inventory endpoints included in generation","type":"integer"},"isGenerated":{"description":"Always true for this operation","type":"boolean"},"spec":{"description":"Generated OpenAPI document (JSON object)"},"specId":{"description":"Identifier assigned to the saved definition when persistence succeeds","type":"string"},"warnings":{"description":"Non-fatal issues (e.g. save failures are appended here)","items":{"type":"string"},"type":"array"}},"type":"object"},"entities.PreviewSpecRequest":{"properties":{"description":{"type":"string"},"endTime":{"description":"Optional end of time window (epoch ms) for transaction aggregation","format":"int64","type":"integer"},"endpointIds":{"description":"Deprecated: use endpoints instead. Inventory endpoint identifiers to include in the generated spec","items":{"type":"string"},"minItems":1,"type":"array"},"endpoints":{"description":"Endpoints with optional auth types for the generated spec. Use this instead of endpointIds.","items":{"$ref":"#/components/schemas/entities.EndpointInput"},"minItems":1,"type":"array"},"servers":{"description":"Optional server base URLs (hostnames) for the generated OpenAPI `servers` list","items":{"type":"string"},"type":"array"},"serverSchemes":{"description":"Protocol schemes to apply to servers (http, https). Creates server entries for each combination. Defaults to [https].","items":{"type":"string","enum":["http","https"]},"type":"array"},"startTime":{"description":"Optional start of time window (epoch ms) for transaction aggregation","format":"int64","type":"integer"},"title":{"description":"Value for `info.title` in the generated spec","type":"string"},"typeThreshold":{"description":"Minimum fraction of samples for the dominant type before using a single schema; below this the generator may emit oneOf. Non-positive values are treated as server default (typically 0.95).","type":"number"},"version":{"description":"Value for `info.version` in the generated spec","type":"string"}},"required":["title"],"type":"object"},"entities.PreviewSpecResponse":{"properties":{"confidence":{"description":"Heuristic confidence score for the inferred schema (0–1)","type":"number"},"endpointsMapped":{"description":"Number of inventory endpoints included in generation","type":"integer"},"spec":{"description":"Generated OpenAPI document (JSON object)"},"warnings":{"description":"Non-fatal issues during generation","items":{"type":"string"},"type":"array"}},"type":"object"},"entities.GetEndpointsByStatusRequest":{"properties":{"filters":{"items":{"$ref":"#/components/schemas/entities.Filter"},"type":"array"},"issueStatus":{"type":"string"},"nextPageRecordKey":{"type":"string"},"pageSize":{"type":"integer"},"previousPageRecordKey":{"type":"string"},"riskContributor":{"type":"string"},"searchFilter":{"items":{"$ref":"#/components/schemas/entities.SearchFilter"},"type":"array"},"sortFilter":{"items":{"$ref":"#/components/schemas/entities.SortFilter"},"type":"array"},"startTime":{"type":"integer"}},"type":"object"},"entities.GetIssueStatusCountsRequest":{"properties":{"filters":{"items":{"$ref":"#/components/schemas/entities.Filter"},"type":"array"},"riskContributor":{"type":"string"},"searchFilter":{"items":{"$ref":"#/components/schemas/entities.SearchFilter"},"type":"array"},"sortFilter":{"items":{"$ref":"#/components/schemas/entities.SortFilter"},"type":"array"},"startTime":{"type":"integer"}},"type":"object"},"entities.GraphData":{"properties":{"totalCount":{"type":"integer"},"trendData":{"description":"Can be int or null"},"values":{"additionalProperties":{"type":"integer"},"type":"object"}},"type":"object"},"entities.InternalIPRangesRequest":{"properties":{"exclusions":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"internalIpRange":{"type":"string"},"resolvedIpRange":{"type":"string"}},"required":["internalIpRange"],"type":"object"},"entities.InventoryEndpointsStatsResp":{"properties":{"message":{"type":"string"},"stats":{"items":{"$ref":"#/components/schemas/entities.StatsCategory"},"type":"array"},"status":{"type":"string"}},"type":"object"},"entities.InventoryStatsFilter":{"properties":{"endTime":{"type":"integer"},"filters":{"items":{"$ref":"#/components/schemas/entities.Filter"},"type":"array"},"startTime":{"type":"integer"},"trafficStatus":{"enum":["ACTIVE","INACTIVE","ALL"],"type":"string"}},"type":"object"},"entities.InventoryStatsRequest":{"properties":{"fields":{"description":"Fields to aggregate statistics for","items":{"type":"string","enum":["hosts","appTags","authTypes","labels","exposure","sourceInfo","sensitiveDataExpressions"]},"minItems":1,"type":"array"},"filters":{"$ref":"#/components/schemas/entities.InventoryStatsFilter"},"limit":{"maximum":10000,"minimum":1,"type":"integer"},"sortBy":{"enum":["filtered","total"],"type":"string"},"timeFilterBasedOn":{"type":"string"}},"type":"object"},"entities.IssueHistoryItem":{"properties":{"comment":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string"},"user":{"type":"string"}},"type":"object"},"entities.IssueStatusCountItem":{"properties":{"count":{"type":"integer"},"status":{"type":"string"}},"type":"object"},"entities.IssuesStatsItem":{"properties":{"filtered":{"type":"integer"},"name":{"type":"string"},"total":{"type":"integer"}},"type":"object"},"entities.IssuesStatsPagination":{"properties":{"nextRecordKey":{"type":"string"},"previousRecordKey":{"type":"string"},"total":{"type":"integer"}},"type":"object"},"entities.IssuesStatsRequest":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/entities.StatFields"},"type":"array"},"filters":{"items":{"$ref":"#/components/schemas/entities.Filter"},"type":"array"},"sort":{"items":{"$ref":"#/components/schemas/entities.Sort"},"type":"array"},"startTime":{"type":"integer"}},"required":["fields"],"type":"object"},"entities.IssuesStatsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.IssuesStatsItem"},"type":"array"},"field":{"type":"string"},"filtered":{"type":"integer"},"pagination":{"$ref":"#/components/schemas/entities.IssuesStatsPagination"}},"type":"object"},"entities.ItemResult":{"properties":{"error":{"type":"string"},"id":{"type":"string"},"index":{"type":"integer"},"riskRule":{"$ref":"#/components/schemas/entities.RiskRule"},"status":{"description":"\"success\" | \"error\"","type":"string"}},"type":"object"},"entities.Label":{"properties":{"description":{"example":"A security-related label for endpoints","type":"string"},"id":{"example":"label-123","type":"string"},"key":{"example":"security:Security Label","type":"string"},"lastUpdated":{"example":1.6409952E12,"type":"number"},"name":{"example":"Security Label","type":"string"},"type":{"example":"security","type":"string"},"version":{"example":1,"type":"integer"}},"type":"object"},"entities.LabelResponse":{"properties":{"code":{"example":"200","type":"string"},"data":{"$ref":"#/components/schemas/entities.Label"},"message":{"example":"Label retrieved successfully","type":"string"},"ok":{"example":true,"type":"boolean"}},"type":"object"},"entities.LabelType":{"properties":{"id":{"type":"string"},"isSystem":{"type":"boolean"},"name":{"type":"string"}},"type":"object"},"entities.LabelsResponse":{"properties":{"code":{"example":"200","type":"string"},"data":{"items":{"$ref":"#/components/schemas/entities.Label"},"type":"array"},"message":{"example":"Labels retrieved successfully","type":"string"},"ok":{"example":true,"type":"boolean"},"pagination":{"$ref":"#/components/schemas/entities.Pagination"}},"type":"object"},"entities.Location":{"properties":{"city":{"type":"string"},"count":{"type":"integer"},"country":{"type":"string"},"countryCode":{"type":"string"}},"type":"object"},"entities.MetricDetail":{"properties":{"count":{"type":"integer"},"isNonConformant":{"type":"boolean"},"name":{"type":"string"}},"type":"object"},"entities.MetricDetailExtended":{"properties":{"count":{"type":"integer"},"dominantPercent":{"type":"number"},"dominantType":{"type":"string"},"drift":{"type":"boolean"},"enumValues":{"items":{"type":"string"},"type":"array"},"isEnum":{"type":"boolean"},"isNonConformant":{"type":"boolean"},"name":{"type":"string"},"nonConformance":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"},"sensitiveData":{"items":{"type":"string"},"type":"array"},"statusCode":{"type":"string"},"typeDistribution":{"additionalProperties":{"type":"integer"},"type":"object"}},"type":"object"},"entities.NewExistingCounts":{"properties":{"existing":{"type":"integer"},"new":{"type":"integer"}},"type":"object"},"entities.NlpEntityConfiguration":{"properties":{"context":{"items":{"type":"string"},"type":"array"},"enabled":{"type":"boolean"},"exclusions":{"items":{"type":"string"},"type":"array"},"maskDetectedValue":{"type":"boolean"},"name":{"type":"string"},"removedByUser":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"userList":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.NlpEntityGroup":{"properties":{"enabled":{"type":"boolean"},"entities":{"items":{"$ref":"#/components/schemas/entities.NlpEntityConfiguration"},"type":"array"}},"type":"object"},"entities.Operator":{"enum":["is","isNot","isAnyOf","contains","equals","startsWith","endsWith","isEmpty","isNotEmpty","containsAll",">",">=","<","<=","isAfter","isOnOrAfter","isBefore","isOnOrBefore"],"type":"string"},"entities.Pagination":{"properties":{"nextPageRecordKey":{"example":"eyJsYXN0VXBkYXRlZCI6MTY0MDk5NTIwMDAwMCwiaWQiOiJsYWJlbC0xMjMifQ==","type":"string"},"previousPageRecordKey":{"example":"eyJsYXN0VXBkYXRlZCI6MTY0MDk5NTEwMDAwMCwiaWQiOiJsYWJlbC0xMjIifQ==","type":"string"},"total":{"example":150,"type":"integer"},"page":{"description":"1-based page index for offset-based list endpoints (e.g. POST /v1/specs/list).","example":1,"type":"integer"},"pageCount":{"description":"Page size used with `page` for offset-based list endpoints.","example":20,"type":"integer"}},"type":"object"},"entities.PatchableString":{"properties":{"apply":{"type":"boolean"},"value":{"type":"string"}},"type":"object"},"entities.PatternCandidateResource":{"properties":{"newResource":{"description":"Format: \"METHOD /new-path\" (e.g., \"GET /a/{param1}/b\") or null if no transformation","type":"string"},"originalResource":{"description":"Format: \"METHOD /path\" (e.g., \"GET /a/order/b\")","type":"string"}},"type":"object"},"entities.AffectedEndpointPreview":{"properties":{"host":{"type":"string"},"method":{"type":"string"},"newPath":{"type":"string"},"originalPath":{"type":"string"}},"type":"object"},"discovery.PreviewPatternImpactResult":{"properties":{"capped":{"type":"boolean"},"consolidatedCount":{"type":"integer"},"endpoints":{"items":{"$ref":"#/components/schemas/entities.AffectedEndpointPreview"},"type":"array"},"totalAffected":{"type":"integer"}},"type":"object"},"entities.RawSpecMetadata":{"properties":{"checksum":{"type":"string"},"compressedSize":{"type":"integer"},"compressionAlgorithm":{"type":"string"},"compressionRatio":{"type":"number"},"originalFormat":{"type":"string"},"originalSize":{"type":"integer"}},"type":"object"},"entities.ResponseContentTypesResponse":{"properties":{"data":{"items":{"type":"string"},"type":"array"},"pagination":{"$ref":"#/components/schemas/entities.EndpointPagination"}},"type":"object"},"entities.RiskCategoriesResponse":{"properties":{"code":{"example":"200","type":"string"},"data":{"items":{"$ref":"#/components/schemas/entities.RiskCategory"},"type":"array"},"message":{"example":"Risk categories retrieved successfully","type":"string"},"ok":{"example":true,"type":"boolean"},"pagination":{"$ref":"#/components/schemas/entities.Pagination"}},"type":"object"},"entities.RiskCategory":{"properties":{"apiDefinitions":{"items":{"type":"string"},"type":"array"},"enabled":{"type":"boolean"},"groupName":{"type":"string"},"id":{"type":"string"},"includedDefinitions":{"type":"boolean"},"name":{"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/entities.Rule"},"type":"array"},"system":{"type":"boolean"},"title":{"type":"string"},"userModifiedDate":{"type":"integer"}},"type":"object"},"entities.RiskCategoryResponse":{"properties":{"code":{"example":"200","type":"string"},"data":{"$ref":"#/components/schemas/entities.RiskCategory"},"message":{"example":"Risk category retrieved successfully","type":"string"},"ok":{"example":true,"type":"boolean"}},"type":"object"},"entities.RiskCounts":{"properties":{"activeRisk":{"type":"integer"},"newRisk":{"type":"integer"},"totalRisk":{"type":"integer"}},"type":"object"},"entities.RiskPostureItem":{"properties":{"counts":{"$ref":"#/components/schemas/entities.RiskCounts"},"description":{"type":"string"},"riskCategory":{"type":"string"},"riskRule":{"type":"string"},"score":{"type":"integer"},"statusCounts":{"items":{"$ref":"#/components/schemas/entities.StatusCount"},"type":"array"}},"type":"object"},"entities.RiskPostureRequest":{"properties":{"endTime":{"type":"integer"},"filters":{"items":{"$ref":"#/components/schemas/entities.Filter"},"type":"array"},"nextPageRecordKey":{"type":"string"},"pageSize":{"type":"integer"},"previousPageRecordKey":{"type":"string"},"startTime":{"type":"integer"},"trafficStatus":{"type":"string"}},"required":["startTime"],"type":"object"},"entities.RiskRule":{"properties":{"api_scope":{"$ref":"#/components/schemas/entities.ApiScope"},"catalog_config":{"additionalProperties":true,"description":"Configuration used when the rule was created from catalog","type":"object"},"catalog_rule_id":{"description":"Reference to OOTB catalog rule when applicable","type":"string"},"category":{"type":"string"},"created_at":{"type":"string"},"created_by":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"expression":{"description":"CEL expression","type":"string"},"id":{"type":"string"},"modified_by":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer"},"risk_score":{"description":"1-10","type":"integer"},"type":{"description":"\"system\" | \"custom\"","type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"updated_at":{"type":"string"},"version":{"type":"string"}},"type":"object"},"entities.RiskRulesResponse":{"properties":{"riskRules":{"items":{"$ref":"#/components/schemas/entities.RiskRule"},"type":"array"},"total":{"type":"integer"}},"type":"object"},"entities.RiskRuleCategoriesRequest":{"description":"Optional filter for POST /v1/rules/categories. When `name` is set, counts only include rules whose\nprimary `category` or a value in `categories[]` matches exactly (keyword term).\n","properties":{"name":{"description":"Exact match on rule category.keyword or categories.keyword (optional).","type":"string"}},"type":"object"},"entities.RiskRuleCategoriesData":{"description":"Histogram of labels appearing in rule `categories[]`. Distinct labels are capped at 1000 buckets;\nwhen `truncated` is true, `warning` explains that additional labels exist.\n","properties":{"categories":{"items":{"$ref":"#/components/schemas/entities.RiskRuleCategoryCount"},"type":"array"},"truncated":{"description":"True when more distinct labels exist than the aggregation size limit (1000).","type":"boolean"},"warning":{"description":"Present when truncated is true.","type":"string"}},"type":"object"},"entities.RiskRuleCategoryCount":{"properties":{"category":{"type":"string"},"count":{"format":"int64","type":"integer"}},"type":"object"},"entities.RiskRulesSearchRequest":{"description":"Filters and pagination for searching risk rules. Send an empty object `{}` to list with defaults.\nThe `tags` field filters on the rule document `tags` field in Elasticsearch (keyword array).\n","properties":{"category":{"description":"Exact match on rule category","type":"string"},"enabled":{"description":"Filter by enabled flag","type":"boolean"},"page":{"description":"Page number (1-based; omit with page_size for default window)","type":"integer"},"page_size":{"description":"Page size (omit or zero to return up to the index result window)","type":"integer"},"tags":{"description":"Filter by rule tags","items":{"type":"string"},"type":"array"},"type":{"description":"Rule type — system or custom","type":"string"}},"type":"object"},"entities.RiskStatusDisplay":{"properties":{"displayName":{"type":"string"},"value":{"type":"string"}},"type":"object"},"entities.Rule":{"properties":{"clonedBy":{"type":"string"},"conditions":{"items":{"$ref":"#/components/schemas/entities.RuleCondition"},"type":"array"},"description":{"type":"string"},"detailedDescription":{"type":"string"},"enabled":{"type":"boolean"},"id":{"type":"string"},"mode":{"type":"string"},"name":{"type":"string"},"recommendations":{"type":"string"},"score":{"type":"number"},"type":{"type":"string"}},"type":"object"},"entities.RuleCondition":{"properties":{"component":{"type":"string"},"conformanceOperator":{"items":{"type":"string"},"type":"array"},"excludeFields":{"type":"string"},"locationFieldNameComponents":{"items":{"type":"string"},"type":"array"},"operator":{"type":"string"},"parameter":{"type":"string"},"transformations":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"value":{"type":"string"}},"type":"object"},"entities.SearchApiSpecRequest":{"properties":{"endpointId":{"type":"string"},"specId":{"type":"string"}},"required":["endpointId","specId"],"type":"object"},"entities.SearchFilter":{"properties":{"field":{"type":"string"},"values":{"items":{"type":"string"},"type":"array"}},"type":"object"},"entities.SensitiveDataExposureMetrics":{"properties":{"totalCount":{"type":"integer"},"values":{"additionalProperties":{"$ref":"#/components/schemas/entities.NewExistingCounts"},"type":"object"}},"type":"object"},"entities.SensitiveDataNlpConfiguration":{"properties":{"global":{"$ref":"#/components/schemas/entities.NlpEntityGroup"},"id":{"type":"string"},"nlpEnabled":{"type":"boolean"},"pci":{"$ref":"#/components/schemas/entities.NlpEntityGroup"},"pii":{"$ref":"#/components/schemas/entities.NlpEntityGroup"},"sg":{"$ref":"#/components/schemas/entities.NlpEntityGroup"},"uk":{"$ref":"#/components/schemas/entities.NlpEntityGroup"},"us":{"$ref":"#/components/schemas/entities.NlpEntityGroup"}},"type":"object"},"entities.Sort":{"properties":{"orderBy":{"enum":["asc","desc"],"type":"string"},"sortBy":{"type":"string"}},"required":["orderBy","sortBy"],"type":"object"},"entities.SortFilter":{"properties":{"field":{"type":"string"},"orderBy":{"type":"string"}},"type":"object"},"entities.SpecMetadata":{"properties":{"baseUrl":{"description":"accepts string or []string from ES","items":{"type":"string"},"type":"array"},"contact":{"$ref":"#/components/schemas/entities.ApiSpecContact"},"group":{"type":"string"},"isGenerated":{"description":"When true, the spec was produced by the platform (e.g. Cequence-generated) rather than imported.","type":"boolean"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"version":{"type":"string"}},"type":"object"},"entities.StandardResponse":{"properties":{"code":{"example":"200","type":"string"},"data":{},"message":{"example":"Operation completed successfully","type":"string"},"ok":{"example":true,"type":"boolean"}},"type":"object"},"entities.StatFields":{"properties":{"field":{"type":"string"},"nextPageRecordKey":{"type":"string"},"pageSize":{"type":"integer"},"previousPageRecordKey":{"type":"string"}},"required":["field","nextPageRecordKey","pageSize"],"type":"object"},"entities.StatsCategory":{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.StatsItemData"},"type":"array"},"field":{"type":"string"},"filtered":{"type":"integer"},"total":{"type":"integer"}},"type":"object"},"entities.StatsItemData":{"properties":{"filtered":{"type":"integer"},"name":{"type":"string"},"total":{"type":"integer"}},"type":"object"},"entities.StatusCount":{"properties":{"count":{"type":"integer"},"status":{"type":"string"}},"type":"object"},"entities.TrafficStatus":{"enum":["ACTIVE","INACTIVE"],"type":"string"},"entities.TransactionMetrics":{"properties":{"averageResponseTime":{"type":"number"},"contentTypes":{"items":{"$ref":"#/components/schemas/entities.Counter"},"type":"array"},"count":{"type":"integer"},"errorRate":{"type":"number"},"ips":{"items":{"$ref":"#/components/schemas/entities.Counter"},"type":"array"},"keyLimited":{"additionalProperties":{"type":"boolean"},"type":"object"},"locations":{"items":{"$ref":"#/components/schemas/entities.Location"},"type":"array"},"methodType":{"type":"string"},"organizations":{"items":{"$ref":"#/components/schemas/entities.Counter"},"type":"array"},"queryParams":{"items":{"$ref":"#/components/schemas/entities.MetricDetailExtended"},"type":"array"},"requestBody":{"description":"Map of field name to body field metadata with cq-prefixed keys","additionalProperties":{"$ref":"#/components/schemas/entities.BodyFieldEntry"},"type":"object"},"requestCookies":{"items":{"$ref":"#/components/schemas/entities.CookiesDetails"},"type":"array"},"requestHeaders":{"items":{"$ref":"#/components/schemas/entities.MetricDetailExtended"},"type":"array"},"resourcePath":{"type":"string"},"responseBody":{"description":"Map of HTTP status code to map of field name to body field metadata","additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/entities.BodyFieldEntry"},"type":"object"},"type":"object"},"responseCodes":{"items":{"$ref":"#/components/schemas/entities.MetricDetail"},"type":"array"},"responseContentTypes":{"items":{"$ref":"#/components/schemas/entities.Counter"},"type":"array"},"responseHeaders":{"additionalProperties":{"items":{"$ref":"#/components/schemas/entities.MetricDetailExtended"},"type":"array"},"type":"object"},"risk":{"items":{"$ref":"#/components/schemas/entities.TransactionRisk"},"type":"array"},"servers":{"items":{"$ref":"#/components/schemas/entities.Counter"},"type":"array"}},"type":"object"},"entities.TransactionRisk":{"properties":{"detailTitle":{"type":"string"},"displayName":{"type":"string"},"maxValue":{"type":"number"},"name":{"type":"string"},"reasons":{"items":{"type":"string"},"type":"array"},"score":{"type":"number"}},"type":"object"},"entities.TransactionSearchRequest":{"properties":{"apiIds":{"items":{"type":"string"},"type":"array"},"endTime":{"type":"integer"},"mergedDefinitionKeys":{"items":{"type":"string"},"type":"array"},"methodType":{"enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"type":"string"},"resourcePath":{"type":"string"},"servers":{"items":{"type":"string"},"minItems":1,"type":"array"},"startTime":{"type":"integer"},"statusCodes":{"items":{"type":"integer"},"type":"array"}},"required":["methodType","resourcePath","servers","startTime"],"type":"object"},"entities.TransactionInventoryScopeRequest":{"properties":{"apiIds":{"items":{"type":"string"},"type":"array"},"endTime":{"format":"int64","type":"integer"},"servers":{"description":"When omitted or empty, all servers are included (no server filter).","items":{"type":"string"},"maxItems":100,"type":"array"},"startTime":{"description":"Epoch ms window start; when omitted with no endTime, no timestamp filter (all time).","format":"int64","type":"integer"}},"type":"object"},"entities.TransactionFieldDetailsRequest":{"properties":{"apiIds":{"items":{"type":"string"},"type":"array"},"endTime":{"format":"int64","type":"integer"},"name":{"type":"string"},"servers":{"description":"When omitted or empty, all servers are included (no server filter).","items":{"type":"string"},"maxItems":100,"type":"array"},"startTime":{"description":"Epoch ms window start; when omitted with no endTime, no timestamp filter (all time).","format":"int64","type":"integer"}},"required":["name"],"type":"object"},"entities.TransactionInventoryField":{"properties":{"location":{"description":"Where this field name appears in traffic metrics","items":{"enum":["QUERY_PARAM","REQUEST_HEADER","RESPONSE_HEADER","REQUEST_BODY","RESPONSE_BODY"],"type":"string"},"type":"array","uniqueItems":true},"name":{"type":"string"}},"required":["location","name"],"type":"object"},"entities.TransactionInventoryFieldEndpoint":{"properties":{"method":{"type":"string"},"path":{"type":"string"}},"required":["method","path"],"type":"object"},"entities.TransactionInventoryFieldDetailsItem":{"properties":{"endpoints":{"items":{"$ref":"#/components/schemas/entities.TransactionInventoryFieldEndpoint"},"type":"array"},"location":{"enum":["QUERY_PARAM","REQUEST_HEADER","RESPONSE_HEADER","REQUEST_BODY","RESPONSE_BODY"],"type":"string"},"name":{"type":"string"},"sensitiveData":{"items":{"type":"string"},"type":"array"}},"required":["endpoints","location","name","sensitiveData"],"type":"object"},"entities.TransactionInventoryFieldDetailsPayload":{"properties":{"details":{"items":{"$ref":"#/components/schemas/entities.TransactionInventoryFieldDetailsItem"},"type":"array"},"keyLimited":{"additionalProperties":{"type":"boolean"},"description":"When true, the named facet hit the aggregation size cap and results may be incomplete","type":"object"}},"required":["details"],"type":"object"},"entities.UpdateApiContact":{"properties":{"email":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"entities.UpdateApiSpecRequest":{"properties":{"contact":{"$ref":"#/components/schemas/entities.UpdateApiContact"},"group":{"allOf":[{"$ref":"#/components/schemas/entities.PatchableString"}],"description":"Apply=false = omit, Apply=true + Value=\"\" = clear, Apply=true + Value!=\"\" = set"},"openApiSpec":{},"openApiSpecRefs":{"additionalProperties":true,"type":"object"},"schemes":{"items":{"type":"string"},"type":"array"},"servers":{"items":{"type":"string"},"type":"array"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"version":{"type":"string"}},"type":"object"},"entities.UpdateIssueStatusRequest":{"properties":{"endpointId":{"items":{"type":"string"},"type":"array"},"riskId":{"type":"string"},"status":{"type":"string"}},"type":"object"},"entities.UpdateLabelRequest":{"properties":{"description":{"example":"A security-related label","type":"string"},"name":{"example":"Security Label","type":"string"},"type":{"example":"security","type":"string"}},"required":["name","type"],"type":"object"},"entities.UpdateLabelTypeRequest":{"properties":{"name":{"type":"string"}},"type":"object"},"entities.ValidateApiSpecRequest":{"properties":{"id":{"description":"When set and spec exists in ES, treat as update and skip title validation","type":"string"},"openApiSpec":{},"servers":{"description":"When provided, overrides the servers from the spec for endpoint uniqueness validation. Use this to validate against the servers you intend to set.","items":{"type":"string"},"type":"array"},"title":{"description":"When provided, overrides the title from the spec for uniqueness validation","type":"string"}},"required":["openApiSpec"],"type":"object"},"entities.EndpointValidationError":{"properties":{"duplicateSpecIds":{"description":"IDs of existing specs that already contain this endpoint","items":{"type":"string"},"type":"array"},"endpointId":{"description":"Fully qualified endpoint identifier (method + host + path)","type":"string"},"host":{"type":"string"},"message":{"description":"Human-readable description of the conflict","type":"string"},"method":{"type":"string"},"path":{"type":"string"}},"type":"object"},"entities.ValidateApiSpecResult":{"properties":{"endpointErrors":{"description":"Per-endpoint duplicate details. Present when isEndpointsValid is false.","items":{"$ref":"#/components/schemas/entities.EndpointValidationError"},"type":"array"},"errorMessages":{"description":"Human-readable summary messages for each category of validation failure","items":{"type":"string"},"type":"array"},"format":{"description":"Detected spec format (e.g. openapi3, swagger2)","type":"string"},"isEndpointsValid":{"description":"False if any endpoints in the spec already exist in another uploaded spec on the same host","type":"boolean"},"isServersValid":{"description":"False if the spec's servers conflict with an existing spec","type":"boolean"},"isSpecTitleValid":{"description":"False if the title is already used by another spec","type":"boolean"},"isSpecValid":{"description":"False if the spec content itself is structurally invalid","type":"boolean"},"valid":{"description":"True only when isSpecValid, isSpecTitleValid, isServersValid, and isEndpointsValid are all true","type":"boolean"}},"type":"object"},"entities.ValueGraphs":{"properties":{"discoveredApiEndpoints":{"$ref":"#/components/schemas/entities.GraphData"},"publishedApiEndpoints":{"$ref":"#/components/schemas/entities.GraphData"},"shadowApiEndpoints":{"$ref":"#/components/schemas/entities.GraphData"},"totalAPIEndPoints":{"$ref":"#/components/schemas/entities.GraphData"},"totalRequestCount":{"$ref":"#/components/schemas/entities.GraphData"}},"type":"object"},"entities.ValueGraphsData":{"properties":{"totalRequestCount":{"$ref":"#/components/schemas/entities.GraphData"}},"type":"object"},"handlers.DependencyInfo":{"properties":{"lastChecked":{"example":"2024-01-15T10:30:00Z","type":"string"},"message":{"example":"Connection successful","type":"string"},"responseTime":{"example":"15ms","type":"string"},"status":{"example":"healthy","type":"string"}},"type":"object"},"handlers.DiscoveryInfo":{"properties":{"apiUrl":{"type":"string"},"revision":{"type":"string"},"specUrl":{"type":"string"},"version":{"type":"string"}},"type":"object"},"handlers.HealthStatus":{"properties":{"dependencies":{"additionalProperties":{"$ref":"#/components/schemas/handlers.DependencyInfo"},"type":"object"},"status":{"example":"healthy","type":"string"},"timestamp":{"example":"2024-01-15T10:30:00Z","type":"string"},"uptime":{"example":"2h30m45s","type":"string"},"version":{"example":"v1.0.0","type":"string"}},"type":"object"},"handlers.KafkaHealthResponse":{"properties":{"message":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string"}},"type":"object"},"handlers.SendMessageRequest":{"properties":{"headers":{"additionalProperties":{"type":"string"},"type":"object"},"key":{"type":"string"},"topic":{"type":"string"},"value":{}},"required":["topic","value"],"type":"object"},"handlers.SendMessageResponse":{"properties":{"message":{"type":"string"},"success":{"type":"boolean"},"timestamp":{"type":"string"}},"type":"object"},"riskRules.CreateRiskRuleResult":{"properties":{"failed":{"type":"integer"},"results":{"items":{"$ref":"#/components/schemas/entities.ItemResult"},"type":"array"},"riskRule":{"allOf":[{"$ref":"#/components/schemas/entities.RiskRule"}],"description":"Single operation"},"successful":{"type":"integer"},"total":{"description":"Bulk operation","type":"integer"}},"type":"object"},"riskRules.DeleteRiskRuleResult":{"properties":{"failed":{"type":"integer"},"results":{"items":{"$ref":"#/components/schemas/entities.ItemResult"},"type":"array"},"successful":{"type":"integer"},"total":{"description":"Bulk operation only (single returns no content)","type":"integer"}},"type":"object"},"riskRules.UpdateRiskRuleResult":{"properties":{"failed":{"type":"integer"},"results":{"items":{"$ref":"#/components/schemas/entities.ItemResult"},"type":"array"},"riskRule":{"allOf":[{"$ref":"#/components/schemas/entities.RiskRule"}],"description":"Single operation"},"successful":{"type":"integer"},"total":{"description":"Bulk operation","type":"integer"}},"type":"object"}},"securitySchemes":{"OAuth2Auth":{"flows":{"authorizationCode":{"authorizationUrl":"https://auth.example.com/oauth/authorize","scopes":{"email":"Email access","openid":"OpenID Connect","ui:configurations:sentinel:read":"Configurations sentinel read","ui:configurations:sentinel:write":"Configurations sentinel write","ui:definitions:sentinel:read":"Definitions sentinel read","ui:definitions:sentinel:write":"Definitions sentinel write","ui:inventory:sentinel:read":"Inventory sentinel read","ui:inventory:sentinel:write":"Inventory sentinel write"},"tokenUrl":"https://auth.example.com/oauth/token"}},"type":"oauth2"}}},"info":{"contact":{"email":"support@cequence.ai","name":"API Support","url":"https://www.cequence.ai/support"},"description":"API Service for API security management. Provides RESTful endpoints for API spec management, endpoint discovery, risk analysis, labels, and health monitoring.","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"termsOfService":"https://www.cequence.ai/terms","title":"API Service","version":"2.0"},"openapi":"3.0.3","paths":{"/.well-known/openapi.yaml":{"get":{"description":"Serves the OpenAPI 3 documentation file","responses":{"200":{"content":{"application/x-yaml":{"schema":{"type":"string"}}},"description":"OpenAPI YAML content"},"404":{"content":{"application/x-yaml":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"openapi.yaml file not found"},"500":{"content":{"application/x-yaml":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Internal server error"}},"summary":"Serve OpenAPI YAML","tags":["documentation"]}},"/health":{"get":{"description":"Check the health status of the API service and all its dependencies","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/handlers.HealthStatus"}},"type":"object"}]}}},"description":"Service is healthy"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Service is unhealthy"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Comprehensive Health Check","tags":["health"]}},"/kafka/health":{"get":{"description":"Check if Kafka service is healthy and reachable","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.KafkaHealthResponse"}}},"description":"OK"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Check Kafka health","tags":["kafka"]}},"/kafka/send":{"post":{"description":"Send a message to a specified Kafka topic","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.SendMessageRequest"}}},"description":"Message to send","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.SendMessageResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Bad Request"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Send message to Kafka","tags":["kafka"]}},"/v1/specs/list":{"post":{"operationId":"list_api_specs","description":"Lists API specifications with metadata, risk scores, and security posture. Uses offset pagination in the JSON body: optional `page` (default 1), `pageCount` (default 20, max 100), optional `sortBy` and `order`. When `sortBy` is omitted, sort is `updatedAt` descending with `_id` ascending. For `definitionName`, `normalizedHost`, `group`, `contact`, `isGenerated`, or `specVersion`, the primary sort uses the requested order, then `updatedAt` descending, then `_id` ascending. `group` sorts by `specMetadata.group`; `contact` sorts by `specMetadata.contact.name.keyword` (multi-field keyword for sort). `isGenerated` sorts by `specMetadata.isGenerated`. `specVersion` sorts by the top-level `specVersion` keyword (lexicographic order). The offset window is limited by Elasticsearch `max_result_window` (10000 rows). For a lightweight ID+title list without pagination, use list_api_definitions instead.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ListApiSpecsRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.ApiSpecs"},"type":"array"},"pagination":{"$ref":"#/components/schemas/entities.Pagination"}},"type":"object"}]}}},"description":"API specifications retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid body, page, pageCount, sortBy, order, or offset beyond max_result_window"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List all API specifications","tags":["v2-specs"]}},"/v1/specs":{"post":{"operationId":"create_api_spec","description":"Uploads and processes a new OpenAPI/Swagger specification. The spec is validated, parsed for endpoints, and stored with risk metadata. Use validate_api_spec first for dry-run validation.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.CreateApiSpecRequest"}}},"description":"API specification creation request with openApiSpec field","required":true,"x-originalParamName":"request"},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.ApiSpecs"}},"type":"object"}]}}},"description":"API specification created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - openApiSpec content required"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Upload new API specification","tags":["v2-specs"]}},"/v1/specs/inventory-search":{"post":{"operationId":"search_api_specs_inventory","description":"Free-text search across the API spec inventory. Matches case-insensitive substrings in spec title (`specMetadata.title`), contact name (`specMetadata.contact.name`), `specMetadata.baseUrl`, `servers` URL strings, and `normalizedHosts`. This endpoint is separate from POST /v1/specs/search, which resolves specs by spec/endpoint identifiers. Response items use the same `entities.ApiSpecs` shape as POST /v1/specs/list where practical (same `_source` exclusions apply on the server). When more results exist, `pagination.nextPageRecordKey` is set (Elasticsearch `search_after`); sort is `updatedAt` descending with document `_id` ascending tie-break.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ApiSpecsTextSearchRequest"}}},"description":"Text search and pagination parameters","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.ApiSpecs"},"type":"array"},"pagination":{"$ref":"#/components/schemas/entities.Pagination"}},"type":"object"}]}}},"description":"Matching API specifications (possibly empty)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body, query string, page size, or cursor"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Search API specs by free text (inventory)","tags":["v2-specs"]}},"/v1/specs/{id}":{"get":{"operationId":"get_api_spec","description":"Returns a single API specification with full metadata, risk data, and security info. Use this when you have a specific spec ID. For the raw spec document content, use download_api_spec instead.","parameters":[{"description":"API specification ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.ApiSpecs"}},"type":"object"}]}}},"description":"API specification retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - ID is required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"API spec not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get API specification by ID","tags":["v2-specs"]},"patch":{"operationId":"update_api_spec","description":"Patches an existing API specification. Provide openApiSpec field to replace the full spec document, or omit it to update only metadata fields. All fields are optional in the request body.","parameters":[{"description":"API specification ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.UpdateApiSpecRequest"}}},"description":"Update payload - all fields optional","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.ApiSpecs"}},"type":"object"}]}}},"description":"API specification updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - nothing to update or validation failed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"API spec not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Patch API specification metadata or content","tags":["v2-specs"]},"delete":{"operationId":"delete_api_spec","description":"Permanently deletes an API specification by ID. This removes the spec and its metadata from the system.","parameters":[{"description":"API specification ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"API spec deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - ID is required"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete API specification by ID","tags":["v2-specs"]}},"/v1/specs/{id}/download":{"get":{"operationId":"download_api_spec","description":"Returns the raw OpenAPI/Swagger document content as JSON or YAML. Use this to retrieve the actual spec file for parsing or export. For spec metadata and risk info, use get_api_spec instead.","parameters":[{"description":"API specification ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}},"application/x-yaml":{"schema":{"type":"string"}}},"description":"Raw spec content (JSON or YAML)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}},"application/x-yaml":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - ID is required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}},"application/x-yaml":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"API spec not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}},"application/x-yaml":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Download raw spec document","tags":["v2-specs"]}},"/v1/specs/validate":{"post":{"operationId":"validate_api_spec","description":"Dry-run validates an OpenAPI spec without storing it. Returns whether the spec is structurally valid, the title is unique, servers are unique, and endpoints don't conflict with existing specs. Optionally pass title and/or servers to validate against intended values rather than those embedded in the spec. When endpoint conflicts are found, errorMessages contains a single summary and endpointErrors contains per-endpoint detail. Use before create_api_spec to catch errors early.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ValidateApiSpecRequest"}}},"description":"Validation request with openApiSpec field","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.ValidateApiSpecResult"}},"type":"object"}]}}},"description":"Validation result. Check data.valid for overall pass/fail. data.errorMessages contains one summary message per failure category. data.endpointErrors contains per-endpoint duplicate details when data.isEndpointsValid is false."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - openApiSpec content required or malformed JSON"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Validate spec without saving","tags":["v2-specs"]}},"/v1/specs/generate":{"post":{"operationId":"generate_spec","description":"Builds an OpenAPI 3 document from discovered inventory endpoints (by endpoint IDs), infers schemas from transaction samples, persists the result as a new API definition when saving succeeds, and returns the generated document with metadata. Requires at least one endpoint ID, a title, and optional time window for transaction aggregation. When `typeThreshold` is omitted or non-positive, the server uses its default (typically 0.95) for dominant-type vs oneOf inference.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.GenerateSpecRequest"}}},"description":"Endpoint IDs and spec metadata for generation","required":true,"x-originalParamName":"request"},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.GenerateSpecResponse"}},"type":"object"}]}}},"description":"Spec generated and returned; persisted when the save path succeeds (see warnings if save failed)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid JSON, missing required fields, or validation failed"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error (e.g. endpoint lookup or generation failure)"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Generate API spec from endpoints and save","tags":["v2-specs"]}},"/v1/specs/generate/preview":{"post":{"operationId":"preview_spec","description":"Same inference as generate_spec but does not persist the spec. Use to review the generated OpenAPI document and confidence before creating a saved definition.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.PreviewSpecRequest"}}},"description":"Endpoint IDs and spec metadata for preview","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.PreviewSpecResponse"}},"type":"object"}]}}},"description":"Generated OpenAPI preview without persisting"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid JSON, missing required fields, or validation failed"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error (e.g. endpoint lookup or generation failure)"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Preview generated API spec without saving","tags":["v2-specs"]}},"/v1/specs/definitions":{"get":{"operationId":"list_api_definitions","description":"Returns a lightweight list of all API definitions with only ID and title fields. Use this for populating dropdowns, building references, or mapping spec IDs to names. For full spec details, use POST /v1/specs/list (list_api_specs).","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.ApiDefinitionSummary"},"type":"array"}},"type":"object"}]}}},"description":"API definitions list"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List API definition IDs and titles","tags":["v2-specs"]}},"/v1/specs/groups":{"get":{"operationId":"list_api_spec_groups","description":"Returns the distinct group names assigned to API specifications. Use to discover available groups before filtering specs by group with get_api_specs_by_group.","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"type":"string"},"type":"array"}},"type":"object"}]}}},"description":"API specification groups retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List unique spec group names","tags":["v2-specs"]},"post":{"operationId":"assign_api_specs_to_group","description":"Assigns one or more API specifications to a named group. Groups organize specs into logical collections for filtering and management.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.AssignToGroupRequest"}}},"description":"Group assignment request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Successfully assigned specifications to group"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Assign specs to a group","tags":["v2-specs"]}},"/v1/specs/groups/{groupName}":{"get":{"operationId":"get_api_specs_by_group","description":"Returns all API specifications belonging to a named group with full metadata. Use list_api_spec_groups first to discover available group names.","parameters":[{"description":"Group name","in":"path","name":"groupName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.ApiSpecs"},"type":"array"}},"type":"object"}]}}},"description":"API specs retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - groupName is required"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List specs in a group","tags":["v2-specs"]}},"/v1/endpoints/search":{"post":{"operationId":"search_endpoints","description":"Searches the API endpoint inventory (2M+ scale) with filtering by host, path, method, risk level, labels, appTags, and more. Supports cursor-based pagination. This is the primary endpoint for querying discovered and published API endpoints. Response rows include `sensitiveData.locations` from the inventory index when stored on the document (full per-location detail, not only flags).\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ApiEndpointsRequest"}}},"description":"API endpoints request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.ApiEndpointsResponse"}},"type":"object"}]}}},"description":"Successfully retrieved data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Search endpoints by filters","tags":["v2-endpoints"]}},"/v1/endpoints":{"delete":{"operationId":"delete_endpoints","description":"Permanently removes one or more API endpoints by their IDs. Provide an array of endpoint IDs in the request body. Returns counts of successfully deleted and failed items.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.DeleteEndpointsRequest"}}},"description":"Delete endpoints request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.DeleteEndpointsResponse"}},"type":"object"}]}}},"description":"Endpoints deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete endpoints by IDs","tags":["v2-endpoints"]}},"/v1/endpoints/actions/clear-risk":{"post":{"operationId":"clear_endpoint_risk","description":"Clears riskData (hasRisks, score, risks) on all matching API inventory documents for the given endpoint IDs in daily api-endpoints-* indices from the past 14 days (UTC). Applies regardless of discovery status (published, discovered, shadow, etc.).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.DeleteEndpointsRequest"}}},"description":"Endpoint IDs to clear risk for","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.ClearEndpointRiskResponse"}},"type":"object"}]}}},"description":"Risk cleared successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Clear risk data for endpoints by IDs","tags":["v2-endpoints"]}},"/v1/endpoints/formats":{"get":{"operationId":"list_endpoint_content_types","description":"Returns distinct response content types (e.g., application/json, text/html) observed across all endpoints. Paginated with cursor tokens. Use for building content-type filter dropdowns.","parameters":[{"description":"Number of records per page","in":"query","name":"pageSize","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Token for pagination continuation","in":"query","name":"nextPageRecordKey","schema":{"type":"string"}},{"description":"Token for previous page navigation","in":"query","name":"previousPageRecordKey","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ResponseContentTypesResponse"}}},"description":"Successfully retrieved response content types"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request parameters"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"summary":"List distinct endpoint content types","tags":["v2-endpoints"]}},"/v1/transactions/search":{"post":{"operationId":"search_transactions","description":"Searches and aggregates API transaction data including request/response metrics, latency, and throughput. Filter by endpoint, time range, and status codes. For response-code breakdown and timeseries, use get_transaction_status instead. The `data.risk` array is populated from the `api-endpoints-*` inventory index (current endpoint riskData), not from api-transaction documents: when `mergedDefinitionKeys` is set, risks are loaded by those endpoint IDs; otherwise by method, resourcePath, and servers.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.TransactionSearchRequest"}}},"description":"Transaction search request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.TransactionMetrics"}},"type":"object"}]}}},"description":"Successfully retrieved transaction metrics"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]}],"summary":"Search transaction metrics","tags":["v2-transactions"]}},"/v1/transactions/status":{"post":{"operationId":"get_transaction_status","description":"Returns HTTP response code breakdown and timeseries data for transactions. Use this for status-code analysis (2xx/4xx/5xx distribution) over time. For aggregate metrics like throughput and latency, use search_transactions instead.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.TransactionSearchRequest"}}},"description":"Transaction status request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"type":"object"}},"type":"object"}]}}},"description":"Successfully retrieved transaction status"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]}],"summary":"Get response code timeseries","tags":["v2-transactions"]}},"/v1/transactions/fields":{"post":{"operationId":"list_transaction_inventory_fields","description":"Lists distinct sensitive metric field names observed in api-transaction documents for the given\noptional time range and servers, and which locations (query param, headers, bodies) each name appears in.\nWhen servers and startTime/endTime are omitted, aggregates across all matching documents (no server or\ntimestamp filter), similar to resource-dictionary inventory. Uses aggregation-only Elasticsearch\nqueries (no document scan). Distinct names per location are capped (very high cardinality may omit names).\nUnscoped queries can be expensive on large clusters.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.TransactionInventoryScopeRequest"}}},"required":false,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.TransactionInventoryField"},"type":"array"}},"type":"object"}]}}},"description":"Successfully retrieved transaction field inventory"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]}],"summary":"List distinct fields from transactions","tags":["v2-transactions"]}},"/v1/transactions/field-details":{"post":{"operationId":"get_transaction_inventory_field_details","description":"Returns per-location sensitive data types and distinct endpoints (method + path) for a single\nfield name. Optional time range and servers match list_transaction_inventory_fields; when omitted,\ndetails are aggregated across all matching transaction documents. Aggregation-only; endpoint or\nsensitive-type lists may be truncated when cardinality exceeds internal limits (see keyLimited in the payload).\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.TransactionFieldDetailsRequest"}}},"required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.TransactionInventoryFieldDetailsPayload"}},"type":"object"}]}}},"description":"Successfully retrieved field details"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]}],"summary":"Get transaction field details by name","tags":["v2-transactions"]}},"/v1/issues/details":{"get":{"operationId":"get_issue_details","description":"Returns detailed risk issue information for a specific endpoint+riskContributor pair, including severity, description, and remediation guidance. Requires both endpointId and riskContributor query params.","parameters":[{"description":"Endpoint ID","in":"query","name":"endpointId","required":true,"schema":{"type":"string"}},{"description":"Risk contributor","in":"query","name":"riskContributor","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.EndpointsIssueDetails"}},"type":"object"}]}}},"description":"Issue details retrieved successfully"},"400":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Missing required query parameters"},"500":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get issue details for endpoint+risk","tags":["v2-issues"]}},"/v1/issues/status":{"get":{"operationId":"get_issue_status","description":"Returns the current status (open, resolved, accepted, etc.) of a specific risk issue on an endpoint. Requires endpointId and riskContributor query params. Use update_issue_status to change it.","parameters":[{"description":"Endpoint ID","in":"query","name":"endpointId","required":true,"schema":{"type":"string"}},{"description":"Risk contributor","in":"query","name":"riskContributor","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Issue status retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Missing required query parameters"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get status of a single issue","tags":["v2-issues"]},"put":{"operationId":"update_issue_status","description":"Changes the status of a risk issue for one or more endpoints (e.g., open to resolved or accepted). For updating many issues at once, prefer batch_update_issue_status for better performance.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.UpdateIssueStatusRequest"}}},"description":"Update issue status request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Issue status updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update issue status","tags":["v2-issues"]}},"/v1/issues/status/batch":{"put":{"operationId":"batch_update_issue_status","description":"Updates issue status for up to 100 risk/endpoint combinations in one call. Returns succeeded/failed counts with per-item error details. Prefer this over update_issue_status when resolving or accepting multiple issues.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["updates"],"properties":{"updates":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/entities.UpdateIssueStatusRequest"}}}}}},"description":"Batch update request with up to 100 individual updates","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"type":"object","properties":{"succeeded":{"type":"integer"},"failed":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"riskId":{"type":"string"},"message":{"type":"string"}}}}}}},"type":"object"}]}}},"description":"Batch update completed (partial success possible)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Batch update issue statuses (up to 100)","tags":["v2-issues"]}},"/v1/issues/evidence":{"get":{"operationId":"get_issue_evidence","description":"Returns supporting evidence (request/response samples, detection context) for a specific risk issue on an endpoint. Requires endpointId and riskContributor query params. Use this to understand why a risk was flagged.","parameters":[{"description":"Endpoint ID (alias: key)","in":"query","name":"endpointId","required":true,"schema":{"type":"string"}},{"description":"Risk contributor (alias: contributor)","in":"query","name":"riskContributor","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.EvidenceResponse"}},"type":"object"}]}}},"description":"Issue evidence retrieved successfully"},"400":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Missing required query parameters"},"500":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get evidence for a risk issue","tags":["v2-issues"]}},"/v1/issues/statuses":{"get":{"operationId":"list_issue_status_options","description":"Returns the list of valid issue status values (e.g., open, resolved, accepted) with display labels. Use this to discover allowed values before calling update_issue_status or batch_update_issue_status.","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.RiskStatusDisplay"},"type":"array"}},"type":"object"}]}}},"description":"Risk status options retrieved successfully"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List valid issue status options","tags":["v2-issues"]}},"/v1/issues/grouped":{"post":{"operationId":"get_issues_by_status","description":"Returns endpoints grouped by their issue status with pagination. Use this to list all endpoints that have open, resolved, or accepted issues for a given risk contributor.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.GetEndpointsByStatusRequest"}}},"description":"Endpoints by status request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.EndpointsIssueDetails"},"type":"array"}},"type":"object"}]}}},"description":"Endpoints by status retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List endpoints grouped by issue status","tags":["v2-issues"]}},"/v1/issues/counts":{"post":{"operationId":"get_issue_status_counts","description":"Returns issue counts broken down by status (open, resolved, accepted, etc.) for a given risk contributor. Use for dashboard widgets or understanding issue resolution progress across endpoints.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.GetIssueStatusCountsRequest"}}},"description":"Issue status counts request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.IssueStatusCountItem"},"type":"array"}},"type":"object"}]}}},"description":"Issue status counts retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Count issues by status","tags":["v2-issues"]}},"/v1/rules":{"get":{"operationId":"list_risk_rules","description":"List risk rules using query parameters (category, enabled, type, tags, page, page_size).\nSame filtering as POST /v1/rules/search; prefer POST for richer clients or future filter growth.\n","parameters":[{"description":"Filter by category","in":"query","name":"category","schema":{"type":"string"}},{"description":"Filter by enabled status","in":"query","name":"enabled","schema":{"type":"boolean"}},{"description":"Filter by rule type (system or custom)","in":"query","name":"type","schema":{"type":"string"}},{"description":"Filter by tags (repeat param or comma-separated per client convention)","in":"query","name":"tags","schema":{"items":{"type":"string"},"type":"array"}},{"description":"Page number (1-based)","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Page size","in":"query","name":"page_size","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.RiskRulesResponse"}},"type":"object"}]}}},"description":"Risk rules retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid query parameters"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List risk rules (query parameters)","tags":["v2-rules"]},"post":{"operationId":"create_risk_rule","description":"Creates one or more risk rules. Accepts a single rule object or an array for bulk creation. Each rule requires a name and a valid CEL expression. Expressions are validated server-side before saving. Returns 201 for single, 200 for bulk with success/failure counts.","requestBody":{"content":{"application/json":{"schema":{}}},"description":"Risk rule creation request. Accepts either a single object or an array of objects. Single example: {\\","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/riskRules.CreateRiskRuleResult"}},"type":"object"}]}}},"description":"Bulk create completed (bulk operation)"},"201":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.RiskRule"}},"type":"object"}]}}},"description":"Risk rule created successfully (single operation)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - missing required fields or invalid CEL expression"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Create risk rule(s), single or bulk","tags":["v2-rules"]},"put":{"operationId":"update_risk_rule","description":"Updates one or more risk rules. Accepts a single object or array, each must include an ID. CEL expressions are re-validated before saving. Returns 200 with the updated rule (single) or success/failure counts (bulk).","requestBody":{"content":{"application/json":{"schema":{}}},"description":"Risk rule update request. Accepts either a single object with id or an array of objects (each item must include id). Single example: {\\","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/riskRules.UpdateRiskRuleResult"}},"type":"object"}]}}},"description":"Bulk update completed (bulk operation)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - missing required fields or invalid CEL expression"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Risk rule not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update risk rule(s), single or bulk","tags":["v2-rules"]},"delete":{"operationId":"delete_risk_rule","description":"Deletes one or more risk rules. Provide 'id' for single deletion (returns 204) or 'ids' array for bulk deletion (returns 200 with success/failure counts). Only custom rules can be deleted; system rules are protected.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.DeleteRiskRulesRequest"}}},"description":"Delete request with 'id' (single) or 'ids' (bulk) field","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/riskRules.DeleteRiskRuleResult"}},"type":"object"}]}}},"description":"Bulk delete completed (bulk operation)"},"204":{"description":"Risk rule deleted successfully (single operation)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - id or ids field is required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Risk rule not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete risk rule(s), single or bulk","tags":["v2-rules"]}},"/v1/rules/search":{"post":{"operationId":"search_risk_rules","description":"Search and list risk rules with filters in the request body (category, enabled, type, tags) and optional page/page_size pagination.\nUse an empty JSON object `{}` to list with defaults. Rules include CEL expressions used for automated risk detection on endpoints.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskRulesSearchRequest"}}},"description":"Search filters and pagination (body may be empty `{}`)","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.RiskRulesResponse"}},"type":"object"}]}}},"description":"Risk rules retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Search risk rules","tags":["v2-rules"]}},"/v1/rules/categories":{"post":{"operationId":"risk_rule_categories","description":"Returns counts per distinct value in rule `categories[]` (Elasticsearch terms aggregation).\nSend `{}` or an empty body for all rules; optional `name` scopes to rules matching that category slug or label.\nResults are limited to 1000 distinct labels; when truncated, `truncated` and `warning` are set.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskRuleCategoriesRequest"}}},"description":"Optional filter (may be `{}`)","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.RiskRuleCategoriesData"}},"type":"object"}]}}},"description":"Category histogram retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid JSON body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Risk rule category label histogram","tags":["v2-rules"]}},"/v1/rules/from-catalog":{"post":{"operationId":"create_risk_rule_from_catalog","description":"Creates a risk rule from an out-of-the-box catalog entry. Requires catalog_rule_id; optional config supplies template parameters. Returns 503 when the validation/catalog service is not configured.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.CreateRiskRuleFromCatalogRequest"}}},"required":true,"x-originalParamName":"request"},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.RiskRule"}},"type":"object"}]}}},"description":"Risk rule created from catalog successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body or missing catalog_rule_id"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Catalog rule not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Catalog functionality not available"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Create risk rule from catalog","tags":["v2-rules"]}},"/v1/rules/{id}":{"get":{"operationId":"get_risk_rule","description":"Returns a single risk rule with its CEL expression, category, enabled status, tags, and metadata. Use when you have a specific rule ID from search_risk_rules or issue details.","parameters":[{"description":"Risk rule ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.RiskRule"}},"type":"object"}]}}},"description":"Risk rule retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - ID is required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Risk rule not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get risk rule by ID","tags":["v2-rules"]}},"/v1/cel/functions":{"get":{"operationId":"get_cel_functions","description":"Returns CEL function namespaces, keywords, and operators for Monaco editor autocomplete. Proxied from the validation service when configured.","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.CELFunctionCatalog"}},"type":"object"}]}}},"description":"CEL function catalog retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"CEL functions service not available"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List CEL functions for rule editor","tags":["v2-rules"]}},"/v1/categories":{"get":{"operationId":"list_risk_categories","description":"Returns all risk categories that group related risk rules. Categories provide organizational structure for risk assessment. Use to discover category names for filtering rules via search_risk_rules.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskCategoriesResponse"}}},"description":"Risk categories retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List all risk categories","tags":["v2-categories"]},"post":{"operationId":"create_risk_category","description":"Creates a new risk category for grouping related risk rules. Categories define a logical grouping (e.g., authentication, authorization, data exposure) used throughout the risk assessment system.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskCategory"}}},"description":"Risk category data","required":true,"x-originalParamName":"riskCategory"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskCategoryResponse"}}},"description":"Risk category created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]},{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]}],"summary":"Create a risk category","tags":["v2-categories"]}},"/v1/categories/{id}":{"put":{"operationId":"update_risk_category","description":"Updates an existing risk category by ID. Use to rename or modify the category that groups risk rules.","parameters":[{"description":"Risk category ID to update","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskCategory"}}},"description":"Risk category update data","required":true,"x-originalParamName":"riskCategory"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskCategoryResponse"}}},"description":"Risk category updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request parameters"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Risk category not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update risk category by ID","tags":["v2-categories"]},"delete":{"operationId":"delete_risk_category","description":"Permanently deletes a risk category by ID. Ensure no risk rules reference this category before deletion.","parameters":[{"description":"Risk category ID to delete","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Risk category deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - risk category ID required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Risk category not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete risk category by ID","tags":["v2-categories"]}},"/v1/labels":{"get":{"operationId":"list_labels","description":"Returns paginated custom labels used to tag and organize API endpoints. Supports cursor-based pagination with pageSize up to 1000. Labels can be filtered by type when searching endpoints.","parameters":[{"description":"Number of labels per page (default: 100, max: 1000)","in":"query","name":"pageSize","schema":{"type":"string"}},{"description":"Token for getting the next page of results","in":"query","name":"nextPageRecordKey","schema":{"type":"string"}},{"description":"Token for getting the previous page of results","in":"query","name":"previousPageRecordKey","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.LabelsResponse"}}},"description":"Labels retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request parameters"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List endpoint labels","tags":["v2-labels"]},"post":{"operationId":"create_label","description":"Creates a new custom label for tagging endpoints. Requires a name, description, and label type. Label names must be unique. Use list_label_types to get valid type values.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.CreateLabelRequest"}}},"description":"Label creation data","required":true,"x-originalParamName":"label"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.LabelResponse"}}},"description":"Label created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - missing required fields or label already exists"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Create a new endpoint label","tags":["v2-labels"]}},"/v1/labels/{id}":{"put":{"operationId":"update_label","description":"Updates an existing label's name, description, or type by ID. Changes propagate to all endpoints currently tagged with this label.","parameters":[{"description":"Label ID to update","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.UpdateLabelRequest"}}},"description":"Label update data","required":true,"x-originalParamName":"label"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.LabelResponse"}}},"description":"Label updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - missing required fields"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Label not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update label by ID","tags":["v2-labels"]},"delete":{"operationId":"delete_label","description":"Deletes a label by ID. Fails if the label is currently assigned to any endpoints -- unassign it from all endpoints first.","parameters":[{"description":"Label ID to delete","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Label deleted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request - label ID required or label is assigned to endpoints"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Label not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete label by ID","tags":["v2-labels"]}},"/v1/labels/types":{"get":{"operationId":"list_label_types","description":"Returns paginated label type definitions that categorize labels (e.g., environment, team, compliance). Use this to discover valid types before creating or updating labels.","parameters":[{"description":"Number of label types per page (default: 100, max: 1000)","in":"query","name":"pageSize","schema":{"type":"string"}},{"description":"Token for next page","in":"query","name":"nextPageRecordKey","schema":{"type":"string"}},{"description":"Token for previous page","in":"query","name":"previousPageRecordKey","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.LabelType"},"type":"array"},"pagination":{"$ref":"#/components/schemas/entities.Pagination"}},"type":"object"}]}}},"description":"Label types retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request parameters"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List label type definitions","tags":["v2-label-types"]},"post":{"operationId":"create_label_type","description":"Creates a new label type definition for categorizing endpoint labels. Define the type before creating labels that reference it.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.CreateLabelTypeRequest"}}},"description":"Create label type request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.LabelType"}},"type":"object"}]}}},"description":"Successfully created endpoint label type"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Create a label type","tags":["v2-label-types"]}},"/v1/labels/types/{id}":{"put":{"operationId":"update_label_type","description":"Updates a label type definition by ID. Changes affect how labels of this type are categorized.","parameters":[{"description":"Label type ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.UpdateLabelTypeRequest"}}},"description":"Update label type request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.LabelType"}},"type":"object"}]}}},"description":"Successfully updated endpoint label type"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request parameters"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Label type not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update label type by ID","tags":["v2-label-types"]},"delete":{"operationId":"delete_label_type","description":"Deletes a label type by ID. Ensure no labels reference this type before deletion.","parameters":[{"description":"Label type ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successfully deleted endpoint label type"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request parameters"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Label type not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete label type by ID","tags":["v2-label-types"]}},"/v1/patterns":{"get":{"operationId":"list_discovery_patterns","description":"Returns all discovery patterns used for endpoint URL parameterization (e.g., replacing UUIDs or numeric IDs with placeholders). Patterns control how discovered URLs are grouped into canonical endpoints.","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.ParametrizationRule"},"type":"array"}},"type":"object"}]}}},"description":"Discovery patterns retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List all discovery patterns","tags":["v2-patterns"]},"post":{"operationId":"create_discovery_pattern","description":"Creates a new discovery pattern for URL parameterization. Use match_discovery_pattern first to preview which endpoints the pattern would match before saving.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ParametrizationRule"}}},"description":"Discovery pattern payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.ParametrizationRule"}},"type":"object"}]}}},"description":"Successfully created discovery pattern"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Create a discovery pattern","tags":["v2-patterns"]}},"/v1/patterns/{id}":{"put":{"operationId":"update_discovery_pattern","description":"Updates an existing discovery pattern by ID. Changes affect how future discovered URLs are parameterized and grouped into endpoints.","parameters":[{"description":"Discovery pattern ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ParametrizationRule"}}},"description":"Discovery pattern payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.ParametrizationRule"}},"type":"object"}]}}},"description":"Successfully updated discovery pattern"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Discovery pattern not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update discovery pattern by ID","tags":["v2-patterns"]},"delete":{"operationId":"delete_discovery_pattern","description":"Deletes a discovery pattern by ID. Removing a pattern stops future URL matching but does not re-process already discovered endpoints.","parameters":[{"description":"Discovery pattern ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successfully deleted discovery pattern"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Discovery pattern not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete discovery pattern by ID","tags":["v2-patterns"]}},"/v1/patterns/match":{"post":{"operationId":"match_discovery_pattern","description":"Dry-run tests a discovery pattern against existing endpoints and returns matching candidates. Use this before create_discovery_pattern or update_discovery_pattern to preview the impact of a pattern change.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ParametrizationRule"}}},"description":"Discovery pattern to match against","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.PatternCandidateResource"},"type":"array"}},"type":"object"}]}}},"description":"Successfully matched discovery pattern with resources"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Preview pattern match results","tags":["v2-patterns"]}},"/v1/patterns/preview-impact":{"post":{"operationId":"preview_discovery_pattern_impact","description":"Runs the same query and path-matching logic as creating a discovery pattern, but returns the inventory impact instead of applying it. Returns the count of endpoints that would be consolidated and a sample list (capped at 1000). Use this in the wizard review step before confirming creation.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ParametrizationRule"}}},"description":"Discovery pattern to preview","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/discovery.PreviewPatternImpactResult"}},"type":"object"}]}}},"description":"Successfully previewed discovery pattern impact"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Preview inventory impact of a discovery pattern","tags":["v2-patterns"]}},"/v1/patterns/reorder":{"post":{"operationId":"reorder_discovery_patterns","description":"Bulk-updates only the priority (and updatedAt) of custom discovery patterns for evaluation order. Does not re-apply patterns to inventory. Sends one discovery-patterns update notification after success.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.DiscoveryPatternsReorderRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.DiscoveryPatternsReorderResult"}},"type":"object"}]}}},"description":"Priorities updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request or bulk update failure (e.g. unknown pattern id)"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Reorder custom discovery patterns by priority","tags":["v2-patterns"]}},"/v1/system-patterns":{"get":{"operationId":"list_system_patterns","description":"Returns all discovery system rules (built-in and user-created regex rules) from config-discovery-rules.","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.DiscoverySystemPattern"},"type":"array"}},"type":"object"}]}}},"description":"System patterns retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List all system patterns","tags":["v1-system-patterns"]},"post":{"operationId":"create_system_pattern","description":"Creates a user-defined regex-type discovery system rule. Rule `id` / `name` must match `^[a-z][a-z0-9_]{0,127}$` — no spaces or special characters. The id must be unique. The new rule id is prepended to the top of the discovery rules order list in `config-discovery-rules-order` (document `ORDER`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["parameterize","regex"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,127}$","description":"Document id and rule name (preferred). Lowercase letters, digits, and underscores only; must start with a letter. No spaces or other special characters."},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,127}$","description":"Same as id when id is omitted. Same character rules as `id`."},"type":{"type":"string","description":"Defaults to `regex`."},"description":{"type":"string"},"parameterize":{"type":"boolean"},"regex":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Non-empty regex pattern strings stored in Elasticsearch."},"hosts":{"$ref":"#/components/schemas/entities.DiscoverySystemPatternHosts"},"exceptions":{"$ref":"#/components/schemas/entities.DiscoverySystemPatternExceptions"}}}}}},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.DiscoverySystemPattern"}},"type":"object"}]}}},"description":"System pattern created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Validation failed (e.g. invalid rule id — spaces or special characters)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Rule id already exists"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:configurations:sentinel:write"]}],"summary":"Create a regex-type system pattern","tags":["v1-system-patterns"]}},"/v1/system-patterns/rules-order":{"get":{"operationId":"get_rules_order","description":"Returns all documents from the config-discovery-rules-order index. Each document contains an ordered list of discovery rule classifier names used to prioritize parameterization decisions.","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.DiscoveryRulesOrder"},"type":"array"}},"type":"object"}]}}},"description":"Rules order retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get discovery rules order","tags":["v1-system-patterns"]}},"/v1/system-patterns/{id}":{"put":{"operationId":"update_system_pattern","description":"Updates the parameterize flag and optionally replaces exceptions, hosts, config (e.g. lookahead), regex pattern list, or description when those keys are present in the request body.","parameters":[{"description":"System pattern ID (rule name, e.g. \"uuid\" or \"numeric\")","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"parameterize":{"type":"boolean"},"exceptions":{"$ref":"#/components/schemas/entities.DiscoverySystemPatternExceptions"},"hosts":{"description":"When omitted, existing hosts on the document are unchanged. Set to null to clear (all hosts). include/exclude are regex strings for host matching.","allOf":[{"$ref":"#/components/schemas/entities.DiscoverySystemPatternHosts"}],"nullable":true},"config":{"description":"When omitted, existing config is unchanged. Set to null to remove. Used for e.g. lookahead `lookahead-pairs`.","nullable":true,"type":"object"},"regex":{"type":"array","items":{"type":"string"},"description":"When this key is present, replaces the stored regex pattern list (non-empty entries required)."},"description":{"type":"string","description":"When this key is present, replaces the stored description (may be empty)."}},"type":"object"}}},"description":"Body must include `parameterize` (boolean) for the rule toggle, plus any optional field updates","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.DiscoverySystemPattern"}},"type":"object"}]}}},"description":"System pattern updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"System pattern not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:configurations:sentinel:write"]}],"summary":"Update system pattern parameterize state","tags":["v1-system-patterns"]}},"/v1/system-patterns/preview-impact":{"post":{"summary":"Preview the inventory impact of applying a system pattern","operationId":"previewSystemPatternImpact","tags":["SystemPatterns"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","description":"Lookahead-pairs config (for lookahead rules)"},"regex":{"type":"array","items":{"type":"string"},"description":"Regex patterns (for regex-type system rules)"},"hosts":{"type":"object","properties":{"include":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}}}},"exceptions":{"type":"object","properties":{"exact":{"type":"array","items":{"type":"string"}},"regex":{"type":"array","items":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Impact preview calculated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalAffected":{"type":"integer"},"consolidatedCount":{"type":"integer"},"capped":{"type":"boolean"},"endpoints":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"host":{"type":"string"},"originalPath":{"type":"string"},"newPath":{"type":"string"}}}}}}}}}}}}}},"/v1/exposures":{"get":{"operationId":"list_exposures","description":"Returns all hosted URL exposure configurations that define which external-facing URLs are monitored. Use to review or audit the exposure surface of your API infrastructure.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/entities.ExposureRequest"},"type":"array"}}},"description":"Exposure retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List all exposure configurations","tags":["v2-exposures"]},"post":{"operationId":"create_exposure","description":"Creates a new hosted URL exposure configuration. Defines an external-facing URL pattern to monitor for API exposure.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ExposureRequest"}}},"description":"Exposure creation request","required":true,"x-originalParamName":"request"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Exposure created successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Create exposure configuration","tags":["v2-exposures"]}},"/v1/exposures/{id}":{"put":{"operationId":"update_exposure","description":"Updates an existing exposure configuration by ID. Modify the URL pattern or metadata for a monitored exposure entry.","parameters":[{"description":"Exposure ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ExposureRequest"}}},"description":"Exposure update request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Exposure updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Exposure not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update exposure configuration by ID","tags":["v2-exposures"]},"delete":{"operationId":"delete_exposure","description":"Deletes an exposure configuration by ID. Stops monitoring the associated hosted URL pattern.","parameters":[{"description":"Exposure ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Exposure deleted successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete exposure configuration by ID","tags":["v2-exposures"]}},"/v1/ranges":{"get":{"operationId":"list_ip_ranges","description":"Returns all configured internal IP ranges used to classify endpoints as internal vs external. Endpoints matching these ranges are marked as internal in the inventory.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/entities.InternalIPRangesRequest"},"type":"array"}}},"description":"Internal IP ranges retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"List internal IP range configs","tags":["v2-ranges"]},"post":{"operationId":"create_ip_range","description":"Creates a new internal IP range configuration. The ID is auto-generated. Endpoints whose hosts fall within this range will be classified as internal.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.InternalIPRangesRequest"}}},"description":"Internal IP ranges creation request (ID not required)","required":true,"x-originalParamName":"request"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Internal IP ranges created successfully with auto-generated ID"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Validation error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Create internal IP range","tags":["v2-ranges"]}},"/v1/ranges/{id}":{"put":{"operationId":"update_ip_range","description":"Updates an existing internal IP range configuration by ID. Changes affect how endpoints are classified as internal vs external.","parameters":[{"description":"Internal IP Ranges ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.InternalIPRangesRequest"}}},"description":"Internal IP ranges update request","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Internal IP ranges updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal IP ranges not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update internal IP range by ID","tags":["v2-ranges"]},"delete":{"operationId":"delete_ip_range","description":"Deletes an internal IP range configuration by ID. Endpoints previously classified by this range are not retroactively reclassified.","parameters":[{"description":"Internal IP Ranges ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Internal IP ranges deleted successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Delete internal IP range by ID","tags":["v2-ranges"]}},"/v1/sdp":{"get":{"operationId":"get_nlp_config","description":"Returns the Sensitive Data Protection (SDP) NLP configuration that controls how sensitive data (PII, secrets, credentials) is detected in API traffic. This is a singleton config -- there is one per tenant.","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.SensitiveDataNlpConfiguration"}},"type":"object"}]}}},"description":"Successfully retrieved NLP configuration"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get sensitive data NLP config","tags":["v2-sdp"]},"put":{"operationId":"update_nlp_config","description":"Updates the Sensitive Data Protection NLP configuration. Controls which data patterns (PII, secrets, credentials) are detected in API traffic. Replaces the entire config -- provide the full desired state.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.SensitiveDataNlpConfiguration"}}},"description":"NLP configuration","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.SensitiveDataNlpConfiguration"}},"type":"object"}]}}},"description":"Successfully updated NLP configuration"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request body"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:definitions:sentinel:write"]},{"OAuth2Auth":["ui:configurations:sentinel:write"]},{"OAuth2Auth":["ui:inventory:sentinel:write"]}],"summary":"Update sensitive data NLP config","tags":["v2-sdp"]}},"/v1/analytics/posture":{"post":{"operationId":"get_risk_posture","description":"Returns risk posture aggregated by category and rule, showing how many endpoints are affected by each risk. Supports pagination and time-range filtering. Use for risk overview dashboards and posture assessment.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskPostureRequest"}}},"description":"Risk posture request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.RiskPostureItem"},"type":"array"},"pagination":{"$ref":"#/components/schemas/entities.Pagination"}},"type":"object"}]}}},"description":"Successfully retrieved data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get risk posture by category and rule","tags":["v2-analytics"]}},"/v1/analytics/issues":{"post":{"operationId":"get_issue_stats","description":"Returns aggregated issue statistics broken down by requested fields (e.g., severity, category, status). Supports per-field pagination. Use for dashboard charts showing issue distribution.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.IssuesStatsRequest"}}},"description":"Issues stats request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/entities.IssuesStatsResponse"},"type":"array"}},"type":"object"}]}}},"description":"Successfully retrieved data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get issue statistics by field","tags":["v2-analytics"]}},"/v1/analytics/trends":{"post":{"operationId":"get_issue_trends","description":"Returns issue counts bucketed by time intervals for trend analysis. Use to visualize how issue volume changes over days, weeks, or months. Supports the same filters as get_risk_posture.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.RiskPostureRequest"}}},"description":"Time range and filter request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.StandardResponse"}}},"description":"Successfully retrieved data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get issue trends over time","tags":["v2-analytics"]}},"/v1/analytics/endpoints":{"post":{"operationId":"get_endpoint_stats","description":"Returns endpoint counts grouped by host, appTag, authType, label, exposure, sourceInfo, or sensitiveDataExpressions. Provides both filtered counts (by time range and traffic status) and total counts. Use for inventory breakdown dashboards showing endpoint distribution across dimensions.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.InventoryStatsRequest"}}},"description":"Statistics request","x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.InventoryEndpointsStatsResp"}},"type":"object"}]}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]}],"summary":"Get endpoint stats by dimension","tags":["v2-analytics"]}},"/v1/analytics/summary":{"post":{"operationId":"get_analytics_summary","description":"Returns high-level dashboard summary metrics: API counts by auth type, risk level distribution, and sensitive data exposure stats. Use as the primary overview widget data source.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.DashboardSummaryMetricsRequest"}}},"description":"Dashboard summary metrics request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.DashboardSummaryMetricsResponse"}},"type":"object"}]}}},"description":"Successfully retrieved data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get dashboard summary metrics","tags":["v2-analytics"]}},"/v1/analytics/inventory":{"post":{"operationId":"get_endpoints_summary","description":"Returns endpoint inventory summary with published, shadow, and discovered counts plus time-series data. Use for the inventory overview dashboard showing endpoint growth and classification over time.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.DashboardApiEndpointsRequest"}}},"description":"Dashboard API endpoints request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.DashboardApiEndpointsResponse"}},"type":"object"}]}}},"description":"Successfully retrieved data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get endpoint inventory summary","tags":["v2-analytics"]}},"/v1/analytics/coverage":{"post":{"operationId":"get_definitions_summary","description":"Returns API definitions coverage summary: total definitions, endpoint counts, schema counts, and usage statistics with time-series data. Use for the definitions/coverage dashboard showing spec-to-endpoint coverage.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.DashboardApiDefinitionsRequest"}}},"description":"Dashboard API definitions request payload","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/entities.StandardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/entities.DashboardApiDefinitionsResponse"}},"type":"object"}]}}},"description":"Successfully retrieved data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Invalid request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Internal server error"}},"security":[{"OAuth2Auth":["ui:inventory:sentinel:read"]},{"OAuth2Auth":["ui:definitions:sentinel:read"]},{"OAuth2Auth":["ui:configurations:sentinel:read"]}],"summary":"Get API definitions coverage summary","tags":["v2-analytics"]}},"/v1/kafka/health":{"get":{"operationId":"check_kafka_health","description":"Returns Kafka broker connectivity status. Use to verify the messaging infrastructure is operational before sending messages or diagnosing event processing issues.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.KafkaHealthResponse"}}},"description":"OK"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Check Kafka broker health","tags":["v2-kafka"]}},"/v1/kafka/send":{"post":{"operationId":"send_kafka_message","description":"Publishes a message to a specified Kafka topic. Use for triggering async processing workflows or testing event pipelines. Requires topic name and message payload in the request body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.SendMessageRequest"}}},"description":"Message to send","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.SendMessageResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Bad Request"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entities.ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Send message to Kafka topic","tags":["v2-kafka"]}}},"servers":[{"url":"http://localhost:8080/"},{"url":"https://localhost:8080/"}],"tags":[{"description":"Health check operations","name":"health"},{"description":"Label management operations","name":"labels"}]}