Skip to main content

Tags API

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

MethodHTTP requestDescription
tagsCreateNewTagPOST /tags/create/tags/create [POST]
tagsDeleteSpecificTagPOST /tags/{tag}/delete/tags/{tag}/delete [POST]
tagsExistsPOST /tags/exists/tags/exists [POST]
tagsSnapshotGET /tags/tags [GET]

tagsCreateNewTag

Tag tagsCreateNewTag()

This will create a new tag.

Example

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

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

const body: Pieces.TagsCreateNewTagRequest = {
// 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,
// SeededTag (optional)
seededTag: ,
};

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

Parameters

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

tagsDeleteSpecificTag

tagsDeleteSpecificTag()

This will delete a specific tag.

Example

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

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

const body: Pieces.TagsDeleteSpecificTagRequest = {
// string | tag id
tag: tag_example,
};

apiInstance.tagsDeleteSpecificTag(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

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-

tagsExists

ExistingMetadata tagsExists()

This will check all of the tags in our database to see if this specific provided tag actually exists, if not we will just return a null tag in the output.

Example

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

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

const body: Pieces.TagsExistsRequest = {
// ExistentMetadata (optional)
existentMetadata: ,
};

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

Parameters

NameTypeDescriptionNotes
existentMetadataExistentMetadata

Return type

ExistingMetadata

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

tagsSnapshot

Tags tagsSnapshot()

This will get a snapshot of all of your tags.

Example

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

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

const body: Pieces.TagsSnapshotRequest = {
// 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.tagsSnapshot(body).then((data: Tags) => {
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

Tags

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-