BucketApi

BucketApi

All URIs are relative to https://dbos

Method HTTP request Description
createBucket POST /buckets Creates a new Bucket, and returns its ID for later use.
deleteBucket DELETE /buckets/{bucketId} Deletes this bucket.
getBucket GET /buckets/{bucketId} Return a bucket object.
getBucketContent GET /buckets/{bucketId}/content Returns the content of the requested bucket.
getBuckets GET /buckets Returns requested bucket definitions.
getBucketsContent GET /buckets/content Returns an archive containing the compressed content of requested buckets.

createBucket

BucketDefinition createBucket(bucketCreation)

Creates a new Bucket, and returns its ID for later use.

This API creates a new Bucket. The returned ID will be used in further jobs requests, to specify job parameters.

Example

// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.BucketApi;


BucketApi apiInstance = new BucketApi();
BucketCreation bucketCreation = new BucketCreation(); // BucketCreation | 
try {
    BucketDefinition result = apiInstance.createBucket(bucketCreation);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BucketApi#createBucket");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bucketCreation BucketCreation

Return type

BucketDefinition

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

deleteBucket

String deleteBucket(bucketId)

Deletes this bucket.

This API is to be called to delete a bucket. It cannot be undone.

Example

// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.BucketApi;


BucketApi apiInstance = new BucketApi();
String bucketId = "bucketId_example"; // String | 
try {
    String result = apiInstance.deleteBucket(bucketId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BucketApi#deleteBucket");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bucketId String

Return type

String

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getBucket

Bucket getBucket(bucketId)

Return a bucket object.

This API is to be called to get a bucket, including bucket definition and bucket data.

Example

// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.BucketApi;


BucketApi apiInstance = new BucketApi();
String bucketId = "bucketId_example"; // String | 
try {
    Bucket result = apiInstance.getBucket(bucketId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BucketApi#getBucket");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bucketId String

Return type

Bucket

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getBucketContent

File getBucketContent(bucketId)

Returns the content of the requested bucket.

Returns the content of the requested bucket.

Example

// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.BucketApi;


BucketApi apiInstance = new BucketApi();
String bucketId = "bucketId_example"; // String | 
try {
    File result = apiInstance.getBucketContent(bucketId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BucketApi#getBucketContent");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bucketId String

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream, plain/text, application/xml, application/json, application/zip

getBuckets

List<BucketDefinition> getBuckets()

Returns requested bucket definitions.

This API allows you to retrieve bucket definitions (without the content) from the system.

Example

// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.BucketApi;


BucketApi apiInstance = new BucketApi();
try {
    List<BucketDefinition> result = apiInstance.getBuckets();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BucketApi#getBuckets");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<BucketDefinition>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getBucketsContent

File getBucketsContent(bucketIds)

Returns an archive containing the compressed content of requested buckets.

Returns an archive containing the compressed content of requested buckets.

Example

// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.BucketApi;


BucketApi apiInstance = new BucketApi();
List<String> bucketIds = Arrays.asList(); // List<String> | 
try {
    File result = apiInstance.getBucketsContent(bucketIds);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BucketApi#getBucketsContent");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bucketIds List<String>

Return type

File

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zip