Skip to main content

Tag API

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

MethodHTTP requestDescription
tagAssociateAssetPOST /tag/{tag}/assets/associate/{asset}/tag/{tag}/assets/associate/{asset} [POST]
tagAssociatePersonPOST /tag/{tag}/persons/associate/{person}/tag/{tag}/persons/associate/{person} [POST]
tagDisassociateAssetPOST /tag/{tag}/assets/disassociate/{asset}/tag/{tag}/assets/disassociate/{asset} [POST]
tagDisassociatePersonPOST /tag/{tag}/persons/disassociate/{person}/tag/{tag}/persons/disassociate/{person} [POST]
tagScoresIncrementPOST /tag/{tag}/scores/increment'/tag/{tag}/scores/increment' [POST]
tagUpdatePOST /tag/update/tag/update [POST]
tagsSpecificTagSnapshotGET /tag/{tag}/tag/{tag} [GET]

tagAssociateAsset

tagAssociateAsset()

This will associate a tag with a asset.

Example

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

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

const body: Pieces.TagAssociateAssetRequest = {
// 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.tagAssociateAsset(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-

tagAssociatePerson

tagAssociatePerson()

This will associate a tag with a person.

Example

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

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

const body: Pieces.TagAssociatePersonRequest = {
// string | tag id
tag: tag_example,
// string | This is a uuid that represents a person.
person: person_example,
};

apiInstance.tagAssociatePerson(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
person[string]This is a uuid that represents a person.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-

tagDisassociateAsset

tagDisassociateAsset()

This will enable us to dissassociate a tag from a asset.

Example

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

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

const body: Pieces.TagDisassociateAssetRequest = {
// 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.tagDisassociateAsset(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-

tagDisassociatePerson

tagDisassociatePerson()

This will enable us to dissassociate a tag from a person.

Example

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

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

const body: Pieces.TagDisassociatePersonRequest = {
// string | tag id
tag: tag_example,
// string | This is a uuid that represents a person.
person: person_example,
};

apiInstance.tagDisassociatePerson(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
person[string]This is a uuid that represents a person.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-

tagScoresIncrement

tagScoresIncrement()

This will take in a SeededScoreIncrement and will increment the material relative to the incoming body.

Example

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

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

const body: Pieces.TagScoresIncrementRequest = {
// string | tag id
tag: tag_example,
// SeededScoreIncrement (optional)
seededScoreIncrement: ,
};

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

Parameters

NameTypeDescriptionNotes
seededScoreIncrementSeededScoreIncrement
tag[string]tag iddefaults 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-

tagUpdate

Tag tagUpdate()

This will update a specific tag.

Example

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

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

const body: Pieces.TagUpdateRequest = {
// 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,
// Tag (optional)
tag: ,
};

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

Parameters

NameTypeDescriptionNotes
tagTag
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

Tag

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

tagsSpecificTagSnapshot

Tag tagsSpecificTagSnapshot()

This will get a specific tag.

Example

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

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

const body: Pieces.TagsSpecificTagSnapshotRequest = {
// string | tag id
tag: tag_example,
// 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.tagsSpecificTagSnapshot(body).then((data: Tag) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
tag[string]tag iddefaults 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

Tag

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
410Tag was not found.-