Skip to main content

Allocation API

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

MethodHTTP requestDescription
allocationSnapshotGET /allocation/{allocation}/allocation/{allocation} [GET]
allocationUpdatePOST /allocation/update/allocation/update [POST]

allocationSnapshot​

AllocationCloud allocationSnapshot()

This will get a snapshot of a specific allocation.

Example​

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

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

const body: Pieces.AllocationSnapshotRequest = {
// string
allocation: allocation_example,
};

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

Parameters​

NameTypeDescriptionNotes
allocation[string]defaults to undefined

Return type​

AllocationCloud

HTTP request headers​

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

HTTP response details​

Status codeDescriptionResponse headers
200OK-
410Cloud not found.-

allocationUpdate​

AllocationCloud allocationUpdate()

This will update a specific allocation.

Example​

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

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

const body: Pieces.AllocationUpdateRequest = {
// AllocationCloud (optional)
allocationCloud: ,
};

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

Parameters​

NameTypeDescriptionNotes
allocationCloudAllocationCloud

Return type​

AllocationCloud

HTTP request headers​

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

HTTP response details​

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-
504Gateway Timeout, request timed out.-