Description: Retrieves Xray’s repository configurations.
Since: 3.41.4
Security: Requires a user with admin permissions.
Usage: GET /xray/api/v1/repos_config/{repo_name}
Consumes: application/json
Produces: application/json
Path Parameters:
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
| string | mandatory | The name of the repository to retrieve configurations for. |
Query parameters: None
Request Body: None
Response Body:
Name | Type | Description |
---|---|---|
| string | The name of the repository for which the configuration is being retrieved |
| Repository configurations. | |
| Repository paths configurations. | |
| string | Error message text |
RepoConfigObj:
Name | Type | Description |
---|---|---|
| boolean | Enables or disables vulnerability contextual analysis. |
| Exposures scan configuration object. | |
| integer | Number of days to retain artifacts. |
ExposuresObj:
Name | Type | Description |
---|---|---|
| Exposures’ scanners categories configurations. |
ScannersCategoryObj:
Name | Type | Description |
---|---|---|
| boolean | Enables or disables secrets scanning. Omitted if not supported for the repository. Returned only for supported repositories. |
| boolean | Enables or disables services scanning. Omitted if not supported for the repository. Returned only for supported repositories. |
| boolean | Enables or disables applications scanning. Omitted if not supported for the repository. Returned only for supported repositories. |
| boolean | Enables or disables Infrastructure as Code (IaC) scanning. Omitted if not supported for the repository. Returned only for supported repositories. |
RepoPathsConfigObj:
Name | Type | Description |
---|---|---|
| array[PatternObj] | Specific paths patterns configuration object. |
| Configurations for all other artifacts. |
PatternObj:
Name | Type | Description |
---|---|---|
| string | Paths pattern to include in the set specific configuration. |
| string | Paths pattern to exclude from the set specific configuration. |
| boolean | Whether to scan new artifacts matching this pattern. |
| integer | Number of days to retain artifacts matching this pattern. |
OtherArtifactsObj:
Name | Type | Description |
---|---|---|
| boolean | Whether to scan new artifacts for all other paths. |
| integer | Number of days to retain artifacts for all other paths. |
Response Codes:
Status code | Description |
---|---|
403 | Forbidden |
401 | Unauthorized |
500 | Internal Server Error |
Example Response:
{ "repo_name": "docker-local", "repo_config": { "vuln_contextual_analysis": true, "retention_in_days": 80, "exposures": { "scanners_category": { "secrets_scan": true, "services_scan": true, "applications_scan": false } } }, "repo_paths_config": { "patterns": [ { "include": "core/**", "exclude": "core/external/**", "index_new_artifacts": true, "retention_in_days": 45 } ], "all_other_artifacts": { "index_new_artifacts": true, "retention_in_days": 60 } } }
Example Error Response:
{ "error": "Request payload is invalid as repo 'non-existing' is either not indexed or does not exist" }