Skip to main content

Distribution API

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

MethodHTTP requestDescription
distributionUpdatePOST /distribution/update/distribution/update [POST]
distributionsSpecificDistributionSnapshotGET /distribution/{distribution}/distribution/{distribution} [GET]

distributionUpdate​

Distribution distributionUpdate()

This will update a specific Distribution.

Example​

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.DistributionApi(configuration)

const body: Pieces.DistributionUpdateRequest = {
// Distribution (optional)
distribution: ,
};

apiInstance.distributionUpdate(body).then((data: Distribution) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters​

NameTypeDescriptionNotes
distributionDistribution

Return type​

Distribution

HTTP request headers​

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

HTTP response details​

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

distributionsSpecificDistributionSnapshot​

Distribution distributionsSpecificDistributionSnapshot()

This will get a specific snapshot of a distribution.

Example​

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.DistributionApi(configuration)

const body: Pieces.DistributionsSpecificDistributionSnapshotRequest = {
// string | This is the uuid of a specific distribution.
distribution: distribution_example,
};

apiInstance.distributionsSpecificDistributionSnapshot(body).then((data: Distribution) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters​

NameTypeDescriptionNotes
distribution[string]This is the uuid of a specific distribution.defaults to undefined

Return type​

Distribution

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-