Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Overview

The following V2 REST APIs apply for Artifactory version 6.6.0 and above. They are extensions for existing REST APIs, with additional functionalities. 


BUILDS

Get Permission Targets

Description: Get the permission targets list for repository and build permission targets.
Since: 6.6.0
Notes: Requires Artifactory Pro. This REST API is also available for Artifactory versions below 6.6.
Security: Requires an admin user or a user with Manage permission on permission target
Usage: GET /api/v2/security/permissions
Producesapplication/vnd.org.jfrog.artifactory.security.PermissionTargetV2+json
Sample Output:

Page Contents

 

GET /api/v2/security/permissions
[
  {
    "name": "readSourceArtifacts"
    "uri" : "http://localhost:8081/artifactory/api/v2/security/permissions/readSourceArtifacts"
  }, {
    "name": "populateCaches"
    "uri" : "http://localhost:8081/artifactory/api/v2/security/permissions/populateCaches"
  }
]

Get Permission Target Details

Description: Get the details of an Artifactory Permission Target
Since: 6.6.0
Notes: Requires Artifactory Pro. This REST API is also available for Artifactory versions below 6.6.
Security: Requires an admin user or a user with Manage permission on permission target
Usage: GET /api/v2/security/permissions/{permissionTargetName}
Producesapplication/vnd.org.jfrog.artifactory.security.PermissionTargetV2+json
Sample Output:

GET /api/v2/security/permissions/populateCaches
{
permission-target.json
}

Permission Target existence check

Description: Get the existence details of an Artifactory Permission Target
Since: 6.6.0
Notes: Requires Artifactory Pro.
Security: Requires an admin user or a user with Manage permission on permission target
Usage: HEAD /api/v2/security/permissions/{permissionTargetName}
Produces: 200 OK in case it exists, 404 NOT FOUND in case it doesn't, with an empty response.
Sample Output:

HEAD /api/v2/security/permissions/populateCaches

200 OK
or
404 NOT FOUND

Create Permission Target

Description: Creates a new permission target in Artifactory or replaces an existing permission target
Since: 6.6.0
Notes: Requires Artifactory Pro
Missing values will be set to the default values as defined by the consumed type.
Security: Requires an admin user
Usage: POST /api/v2/security/permissions/{permissionTargetName}
Consumesapplication/vnd.org.jfrog.artifactory.security.PermissionTargetV2+json
Produces201 CREATED in case of success, with an empty response.
Sample Usage
:

POST /api/v2/security/permissions/populateCaches
{
permission-target.json
}

201 CREATED 

Update Permission Target

Description: Creates a new permission target in Artifactory or replaces an existing permission target
Since: 6.6.0
Notes: Requires Artifactory Pro
Missing permission target values will be set to the default values as defined by the consumed type.
The values defined in the request payload will replace what currently exists in the permission target entity. In case the request is missing one of the permission target entities (repo/build), the entity will be deleted. This means that if an update request is sent to an entity that contains both repo and build, with only repo, the build values will be removed from the entity.
Security: Requires an admin user or a user with Manage permission on permission target.
User with a Manage permission can only edit the actions.
Usage: PUT /api/v2/security/permissions/{permissionTargetName}
Consumesapplication/vnd.org.jfrog.artifactory.security.PermissionTargetV2+json
Produces200 OK in case of success, with an empty response.
Sample Usage
:

PUT /api/v2/security/permissions/populateCaches
{
permission-target.json
}

200 OK 

Delete Permission Target

Description: Deletes an Artifactory permission target.
Since: 6.6.0
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: DELETE /api/v2/security/permissions/{permissionTargetName}
Produces200 OK in case of success, with an empty response.
Sample usage:

DELETE /api/v2/security/permissions/populateCaches

200 OK
  • No labels