Skip to main content

Distribution API

All URIs are relative to http://localhost:1000

MethodHTTP requestDescription
distribution_updatePOST /distribution/update/distribution/update [POST]
distributions_specific_distribution_snapshotGET /distribution/{distribution}/distribution/{distribution} [GET]

distribution_update

Distribution distribution_update(distribution=distribution)

/distribution/update [POST]

This will update a specific Distribution.

Example

import pieces_os_client
from pieces_os_client.models.distribution import Distribution
from pieces_os_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:1000
# See configuration.py for a list of all supported configuration parameters.
configuration = pieces_os_client.Configuration(
host="http://localhost:1000"
)


# Enter a context with an instance of the API client
with pieces_os_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pieces_os_client.DistributionApi(api_client)
distribution = pieces_os_client.Distribution() # Distribution | (optional)

try:
# /distribution/update [POST]
api_response = api_instance.distribution_update(distribution=distribution)
print("The response of DistributionApi->distribution_update:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DistributionApi->distribution_update: %s\n" % e)

Parameters

NameTypeDescriptionNotes
distributionDistribution[optional]

Return type

Distribution

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

distributions_specific_distribution_snapshot

Distribution distributions_specific_distribution_snapshot(distribution)

/distribution/{distribution} [GET]

This will get a specific snapshot of a distribution.

Example

import pieces_os_client
from pieces_os_client.models.distribution import Distribution
from pieces_os_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:1000
# See configuration.py for a list of all supported configuration parameters.
configuration = pieces_os_client.Configuration(
host="http://localhost:1000"
)


# Enter a context with an instance of the API client
with pieces_os_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pieces_os_client.DistributionApi(api_client)
distribution = 'distribution_example' # str | This is the uuid of a specific distribution.

try:
# /distribution/\{distribution\} [GET]
api_response = api_instance.distributions_specific_distribution_snapshot(distribution)
print("The response of DistributionApi->distributions_specific_distribution_snapshot:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DistributionApi->distributions_specific_distribution_snapshot: %s\n" % e)

Parameters

NameTypeDescriptionNotes
distributionstrThis is the uuid of a specific distribution.

Return type

Distribution

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
410Distribution not found.-
500Internal Server Error-