Skip to main content

Asset API

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

MethodHTTP requestDescription
assetAssociateTagPOST /asset/{asset}/tags/associate/{tag}/asset/{asset}/tags/associate/{tag} [POST]
assetAssociateWebsitePOST /asset/{asset}/websites/associate/{website}/asset/{asset}/websites/associate/{website} [POST]
assetAssociateWorkstreamSummaryPOST /asset/{asset}/workstream_summaries/associate/{workstream_summary}/asset/{asset}/workstream_summaries/associate/{workstream_summary} [POST]
assetDisassociateTagPOST /asset/{asset}/tags/disassociate/{tag}/asset/{asset}/tags/disassociate/{tag} [POST]
assetDisassociateWebsitePOST /asset/{asset}/websites/disassociate/{website}/asset/{asset}/websites/disassociate/{website} [POST]
assetDisassociateWorkstreamSummaryPOST /asset/{asset}/workstream_summaries/disassociate/{workstream_summary}/asset/{asset}/workstream_summaries/disassociate/{workstream_summary} [POST]
assetFormatsGET /asset/{asset}/formats/asset/{asset}/formats [GET] Scoped To Asset
assetReclassifyPOST /asset/reclassify/asset/reclassify [POST]
assetScoresIncrementPOST /asset/{asset}/scores/increment/asset/{asset}/scores/increment [POST]
assetSnapshotGET /asset/{asset}/asset/{asset} [GET] Scoped To Asset
assetSnapshotPostPOST /asset/{asset}/asset/{asset} [POST] Scoped to an Asset
assetSpecificAssetActivitiesGET /asset/{asset}/activities/asset/{asset}/activities [GET]
assetSpecificAssetConversationsGET /asset/{asset}/conversations/asset/{asset}/conversations [GET]
assetSpecificAssetExportGET /asset/{asset}/export/asset/{asset}/export [GET]
assetUpdatePOST /asset/update/asset/update [POST] Scoped to Asset

assetAssociateTag

assetAssociateTag()

Associates a tag with a specified asset. It performs the same action as the tag equivalent.

Example

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

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

const body: Pieces.AssetAssociateTagRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// string | tag id
tag: tag_example,
};

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

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
tag[string]tag iddefaults 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-

assetAssociateWebsite

assetAssociateWebsite()

Associates a website with an asset. It performs the same action as its website equivalent.

Example

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

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

const body: Pieces.AssetAssociateWebsiteRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// string | website id
website: website_example,
};

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

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
website[string]website iddefaults 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-

assetAssociateWorkstreamSummary

assetAssociateWorkstreamSummary()

This will associate a asset with a workstream summary. This will do the same thing as the workstreamSummary equivalent.

Example

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

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

const body: Pieces.AssetAssociateWorkstreamSummaryRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// string | This is a identifier that is used to identify a specific workstream_summary.
workstreamSummary: workstreamSummary_example,
};

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

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
workstreamSummary[string]This is a identifier that is used to identify a specific workstream_summary.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-

assetDisassociateTag

assetDisassociateTag()

Disassociates a tag from an asset. It performs the same action as the tag equivalent.

Example

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

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

const body: Pieces.AssetDisassociateTagRequest = {
// string | tag id
tag: tag_example,
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
};

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

Parameters

NameTypeDescriptionNotes
tag[string]tag iddefaults to undefined
asset[string]The id (uuid) of the asset that you are trying to access.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-

assetDisassociateWebsite

assetDisassociateWebsite()

Disassociates a website from an asset. It performs the same action as the website equivalent.

Example

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

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

const body: Pieces.AssetDisassociateWebsiteRequest = {
// string | website id
website: website_example,
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
};

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

Parameters

NameTypeDescriptionNotes
website[string]website iddefaults to undefined
asset[string]The id (uuid) of the asset that you are trying to access.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-

assetDisassociateWorkstreamSummary

assetDisassociateWorkstreamSummary()

This will enable us to disassociate an asset from a workstream summary. This will do the same thing as the workstreamSummary equivalent.

Example

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

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

const body: Pieces.AssetDisassociateWorkstreamSummaryRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// string | This is a identifier that is used to identify a specific workstream_summary.
workstreamSummary: workstreamSummary_example,
};

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

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
workstreamSummary[string]This is a identifier that is used to identify a specific workstream_summary.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-

assetFormats

Formats assetFormats()

Retrieves the formats available for a specified asset.

Example

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

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

const body: Pieces.AssetFormatsRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// 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.assetFormats(body).then((data: Formats) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
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

Formats

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-

assetReclassify

Asset assetReclassify()

Retrieves the formats available for a specified asset.

Example

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

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

const body: Pieces.AssetReclassifyRequest = {
// 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,
// AssetReclassification | This will accept a Reclassification that includeds and assetand a language that this assets needs to be reclassified to. We will just return an Asset that has been reclassified. (optional)
assetReclassification: ,
};

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

Parameters

NameTypeDescriptionNotes
assetReclassificationAssetReclassificationThis will accept a Reclassification that includeds and assetand a language that this assets needs to be reclassified to. We will just return an Asset that has been reclassified.
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

Asset

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-

assetScoresIncrement

assetScoresIncrement()

Increments the scores associated with the specified asset based on the provided SeededScoreIncrement data in the request body.

Example

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

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

const body: Pieces.AssetScoresIncrementRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// SeededScoreIncrement (optional)
seededScoreIncrement: ,
};

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

Parameters

NameTypeDescriptionNotes
seededScoreIncrementSeededScoreIncrement
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined

Return type

void (empty response body)

HTTP request headers

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

HTTP response details

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

assetSnapshot

Asset assetSnapshot()

Retrieves the snapshot of a specific asset

Example

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

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

const body: Pieces.AssetSnapshotRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// 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.assetSnapshot(body).then((data: Asset) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
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

Asset

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
410Asset no longer exists and is Gone.-

assetSnapshotPost

Asset assetSnapshotPost()

Retrieves a snapshot of a specific asset, along with the user requesting the snapshot.

Example

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

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

const body: Pieces.AssetSnapshotPostRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// 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,
// SeededAccessor (optional)
seededAccessor: ,
};

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

Parameters

NameTypeDescriptionNotes
seededAccessorSeededAccessor
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
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

Asset

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-

assetSpecificAssetActivities

Activities assetSpecificAssetActivities()

Retrieves activity events specific to the given asset.

Example

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

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

const body: Pieces.AssetSpecificAssetActivitiesRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// 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.assetSpecificAssetActivities(body).then((data: Activities) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
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

Activities

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

assetSpecificAssetConversations

Conversations assetSpecificAssetConversations()

Retrieves conversations specific to the given asset.

Example

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

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

const body: Pieces.AssetSpecificAssetConversationsRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// 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.assetSpecificAssetConversations(body).then((data: Conversations) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
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

Conversations

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

assetSpecificAssetExport

ExportedAsset assetSpecificAssetExport()

Retrieves an export version of the specified asset.

Example

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

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

const body: Pieces.AssetSpecificAssetExportRequest = {
// string | The id (uuid) of the asset that you are trying to access.
asset: 2254f2c8-5797-40e8-ac56-41166dc0e159,
// 'HTML' | 'MD' | This specifies the type of export the user wants.
exportType: exportType_example,
};

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

Parameters

NameTypeDescriptionNotes
asset[string]The id (uuid) of the asset that you are trying to access.defaults to undefined
exportType[**'HTML''MD'**]Array<'HTML' | 'MD'>This specifies the type of export the user wants.

Return type

ExportedAsset

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

assetUpdate

Asset assetUpdate()

Allows the user to update an existing Asset. It accepts the Asset object that needs updating and returns the fully updated Asset.

Example

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

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

const body: Pieces.AssetUpdateRequest = {
// 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,
// Asset | This endpoint allows the user to update an existing Asset. It accepts the Asset object that needs updating and returns the fully updated Asset. (optional)
asset: ,
};

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

Parameters

NameTypeDescriptionNotes
assetAssetThis endpoint allows the user to update an existing Asset. It accepts the Asset object that needs updating and returns the fully updated Asset.
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

Asset

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-