Skip to content

Update repository policy

PATCH
/api/v1/system/repository-policy
curl --request PATCH \
--url http://localhost:3000/api/v1/system/repository-policy \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "allowTenantOverride": true, "allowTenantOnlyRepos": true, "requireGlobalRepos": false, "credentialRotationDays": 90, "syncIntervalMinMinutes": 15, "syncIntervalMaxMinutes": 1440 }'

Updates the repository policy configuration. Requires Super Admin privileges.

Media type application/json
object
allowTenantOverride

Allow tenants to override non-mandatory global repositories

boolean
Example
true
allowTenantOnlyRepos

Allow tenants to create their own repositories

boolean
Example
true
requireGlobalRepos

Global repositories are required and visible to all tenants

boolean
Example
false
credentialRotationDays

Recommended credential rotation period in days

number
>= 1 <= 365
Example
90
syncIntervalMinMinutes

Minimum sync interval allowed in minutes

number
>= 1 <= 1440
Example
15
syncIntervalMaxMinutes

Maximum sync interval allowed in minutes

number
>= 1 <= 10080
Example
1440

Repository policy updated successfully

Media type application/json
object
id
required

Unique identifier of the policy

string format: uuid
allowTenantOverride
required

Allow tenants to override non-mandatory global repositories

boolean
allowTenantOnlyRepos
required

Allow tenants to create their own repositories

boolean
requireGlobalRepos
required

Global repositories are required and visible to all tenants

boolean
credentialRotationDays
required

Recommended credential rotation period in days

number
>= 1
syncIntervalMinMinutes
required

Minimum sync interval allowed in minutes

number
>= 1
syncIntervalMaxMinutes
required

Maximum sync interval allowed in minutes

number
>= 1
createdAt
required

Timestamp when the policy was created

string format: date-time
updatedAt
required

Timestamp when the policy was last updated

string format: date-time
Example
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"allowTenantOverride": true,
"allowTenantOnlyRepos": true,
"requireGlobalRepos": false,
"credentialRotationDays": 90,
"syncIntervalMinMinutes": 15,
"syncIntervalMaxMinutes": 1440,
"createdAt": "2024-01-15T12:00:00.000Z",
"updatedAt": "2024-01-15T12:00:00.000Z"
}

Invalid input data

Unauthorized

Forbidden - requires Super Admin privileges

Repository policy not configured