Upload Bucket

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Uploads and creates a new License Bucket.

Since: 4.0

Notes: Requires Artifactory Enterprise

Security: Requires an admin user

Usage: POST /mc/api/v1/buckets

Content-Type: multipart/form-data

Return codes:

201 - Created

400 - Your bucket file could not be used. Please verify that the file is correct and that the key is valid.

409 - Name '<Bucket name>' already exists

Consumes: application/json

name | Bucket’s name in Mission Control
file | Path to the bucket file
key  | Key used to decrypt the bucket

Produces: application/json

Sample usage:

curl -X POST 'http://localhost:8082/mc/api/v1/buckets' -H 'Authorization: Bearer <token>' -H 'Content-Type: multipart/form-data' -F 'file=@/tmp/728939433.json;type=application/octet-stream' -F 'key=d18fc5bc05dc3b6419ab6cd127f16cf6b57d7650ea0ef03cde130918f6f25487' -F 'name=mybucket'

Sample response:

{
  "subject" : "JFrog",
  "product_name" : "Artifactory",
  "product_id" : 6,
  "license_type" : "HA",
  "issued_date" : "2016-04-12T16:02:55.549+03:00",
  "valid_date" : "2017-04-12T16:02:54.759+03:00",
  "quantity" : 10,
  "identifier" : "bucket-test-1",
  "signature" : "06307c34405e6ab70c5d249a7ba7cffd81947d5f",
  "name" : "Test-bucket-name",
  "used" : 0
}