Get Repositories Configurations

Xray REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

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

repo_name

string

mandatory

The name of the repository to retrieve configurations for.

Query parameters: None

Request Body: None

Response Body:

Name

Type

Description

repo_name

string

The name of the repository for which the configuration is being retrieved

repo_config

RepoConfigObj

Repository configurations.

repo_paths_config

RepoPathsConfigObj

Repository paths configurations.

error

string

Error message text

RepoConfigObj:

Name

Type

Description

vuln_contextual_analysis

boolean

Enables or disables vulnerability contextual analysis.

exposures

ExposuresObj

Exposures scan configuration object.

retention_in_days

integer

Number of days to retain artifacts.

ExposuresObj:

Name

Type

Description

scanners_category

ScannersCategoryObj

Exposures’ scanners categories configurations.

ScannersCategoryObj:

Name

Type

Description

secrets_scan

boolean

Enables or disables secrets scanning. Omitted if not supported for the repository. Returned only for supported repositories.

services_scan

boolean

Enables or disables services scanning. Omitted if not supported for the repository. Returned only for supported repositories.

applications_scan

boolean

Enables or disables applications scanning. Omitted if not supported for the repository. Returned only for supported repositories.

iac_scan

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

patterns

array[PatternObj]

Specific paths patterns configuration object.

all_other_artifacts

OtherArtifactsObj

Configurations for all other artifacts.

PatternObj:

Name

Type

Description

include

string

Paths pattern to include in the set specific configuration.

exclude

string

Paths pattern to exclude from the set specific configuration.

index_new_artifacts

boolean

Whether to scan new artifacts matching this pattern.

retention_in_days

integer

Number of days to retain artifacts matching this pattern.

OtherArtifactsObj:

Name

Type

Description

index_new_artifacts

boolean

Whether to scan new artifacts for all other paths.

retention_in_days

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"
}