Skip to main content

AnchorPoints API

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

MethodHTTP requestDescription
anchorPointsCreateNewAnchorPointPOST /anchor_points/create/anchor_points/create [POST]
anchorPointsDeleteSpecificAnchorPointPOST /anchor_points/{anchor_point}/delete/anchor_points/{anchor_point}/delete [POST]
anchorPointsSnapshotGET /anchor_points/anchor_points [GET]

anchorPointsCreateNewAnchorPoint

AnchorPoint anchorPointsCreateNewAnchorPoint()

This will create a anchorPoint.

Example

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

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

const body: Pieces.AnchorPointsCreateNewAnchorPointRequest = {
// boolean | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) (optional)
transferables: true,
// SeededAnchorPoint (optional)
seededAnchorPoint: ,
};

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

Parameters

NameTypeDescriptionNotes
seededAnchorPointSeededAnchorPoint
transferables[boolean]This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)(optional) defaults to undefined

Return type

AnchorPoint

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

anchorPointsDeleteSpecificAnchorPoint

anchorPointsDeleteSpecificAnchorPoint()

This will delete a specific anchorPoint!

Example

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

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

const body: Pieces.AnchorPointsDeleteSpecificAnchorPointRequest = {
// string | This is the specific uuid of an anchor_point.
anchorPoint: anchorPoint_example,
};

apiInstance.anchorPointsDeleteSpecificAnchorPoint(body).then((data: void (empty response body)) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
anchorPoint[string]This is the specific uuid of an anchor_point.defaults to undefined

Return type

void (empty response body)

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status codeDescriptionResponse headers
204No Content-
500Internal Server Error-

anchorPointsSnapshot

AnchorPoints anchorPointsSnapshot()

This will get a snapshot of all your anchorPoints.

Example

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

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

const body: Pieces.AnchorPointsSnapshotRequest = {
// boolean | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) (optional)
transferables: true,
};

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

Parameters

NameTypeDescriptionNotes
transferables[boolean]This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)(optional) defaults to undefined

Return type

AnchorPoints

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-