Create/Update Destinations Permissions by Name

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Permissions can be created and overridden by specifying the unique permission name.

Destination permission is used to define permissions for interactions with Distribution Edges, such as distributing and deleting release bundles.

Allowed actions for destination permission: x, d.

The permissions are applied to Distribution Edges which information is matched by the passed wildcard expressions.

Description: Create/Update permissions for users and groups, based on permission scope. The response body will contain the created/updated permission.

Since: 2.0

Security: Admin only.

Usage: PUT /api/v1/security/permissions/:name

Request Headers: N/A

Consumes: application/json

cURL Example

$ curl -X PUT -u user:password -H "Content-Type: application/json" "http://ARTIFACTORY_SERVER_HOSTNAME:8082/distribution/api/v1/security/permissions/:name" -T permission.json

permission.json

{
  "distribution_destinations": [
    {
      "site_name": "*",
      "city_name": "*",
      "country_codes": [
        "*"
      ]
    }
  ],
  "name": "permission-name",
  "resource_type": "destination",
  "principals": {
    "users": {
      "anonymous": [
        "x"
      ]
    },
    "groups": {
      "readers": [
        "x"
      ]
    }
  }
}

Response status codes:

200 - Successfully set permission

Response headers: N/A Produces: application/json

Response

{
  "distribution_destinations": [
    {
      "site_name": "*",
      "city_name": "*",
      "country_codes": [
        "*"
      ]
    }
  ],
  "name": "permission-name",
  "resource_type": "destination",
  "principals": {
    "users": {
      "user1": [
        "x"
      ]
    },
    "groups": {
      "group1": [
        "x"
      ]
    }
  }
}