optimserverclientpython.BucketApi

All URIs are relative to https://dbos

Method HTTP request Description
create_bucket POST /buckets Creates a new Bucket, and returns its ID for later use.
delete_bucket DELETE /buckets/{bucketId} Deletes this bucket.
get_bucket GET /buckets/{bucketId} Return a bucket object.
get_bucket_content GET /buckets/{bucketId}/content Returns the content of the requested bucket.
get_buckets GET /buckets Returns requested bucket definitions.
get_buckets_content GET /buckets/content Returns an archive containing the compressed content of requested buckets.

create_bucket

BucketDefinition create_bucket(bucket_creation)

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

from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = optimserverclientpython.BucketApi()
bucket_creation = optimserverclientpython.BucketCreation() # BucketCreation | 

try:
    # Creates a new Bucket, and returns its ID for later use.
    api_response = api_instance.create_bucket(bucket_creation)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BucketApi->create_bucket: %s\n" % e)

Parameters

Name Type Description Notes
bucket_creation BucketCreation

Return type

BucketDefinition

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_bucket

str delete_bucket(bucket_id)

Deletes this bucket.

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

Example

from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = optimserverclientpython.BucketApi()
bucket_id = 'bucket_id_example' # str | 

try:
    # Deletes this bucket.
    api_response = api_instance.delete_bucket(bucket_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BucketApi->delete_bucket: %s\n" % e)

Parameters

Name Type Description Notes
bucket_id str

Return type

str

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_bucket

Bucket get_bucket(bucket_id)

Return a bucket object.

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

Example

from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = optimserverclientpython.BucketApi()
bucket_id = 'bucket_id_example' # str | 

try:
    # Return a bucket object.
    api_response = api_instance.get_bucket(bucket_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BucketApi->get_bucket: %s\n" % e)

Parameters

Name Type Description Notes
bucket_id str

Return type

Bucket

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_bucket_content

file get_bucket_content(bucket_id)

Returns the content of the requested bucket.

Returns the content of the requested bucket.

Example

from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = optimserverclientpython.BucketApi()
bucket_id = 'bucket_id_example' # str | 

try:
    # Returns the content of the requested bucket.
    api_response = api_instance.get_bucket_content(bucket_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BucketApi->get_bucket_content: %s\n" % e)

Parameters

Name Type Description Notes
bucket_id str

Return type

file

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_buckets

list[BucketDefinition] get_buckets()

Returns requested bucket definitions.

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

Example

from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = optimserverclientpython.BucketApi()

try:
    # Returns requested bucket definitions.
    api_response = api_instance.get_buckets()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BucketApi->get_buckets: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

list[BucketDefinition]

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_buckets_content

file get_buckets_content(bucket_ids)

Returns an archive containing the compressed content of requested buckets.

Returns an archive containing the compressed content of requested buckets.

Example

from __future__ import print_function
import time
import optimserverclientpython
from optimserverclientpython.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = optimserverclientpython.BucketApi()
bucket_ids = ['bucket_ids_example'] # list[str] | 

try:
    # Returns an archive containing the compressed content of requested buckets.
    api_response = api_instance.get_buckets_content(bucket_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BucketApi->get_buckets_content: %s\n" % e)

Parameters

Name Type Description Notes
bucket_ids list[str]

Return type

file

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]