Tag API
All URIs are relative to http://localhost:1000
Method | HTTP request | Description |
---|---|---|
tagAssociateAsset | POST /tag/{tag}/assets/associate/{asset} | /tag/{tag}/assets/associate/{asset} [POST] |
tagAssociatePerson | POST /tag/{tag}/persons/associate/{person} | /tag/{tag}/persons/associate/{person} [POST] |
tagDisassociateAsset | POST /tag/{tag}/assets/disassociate/{asset} | /tag/{tag}/assets/disassociate/{asset} [POST] |
tagDisassociatePerson | POST /tag/{tag}/persons/disassociate/{person} | /tag/{tag}/persons/disassociate/{person} [POST] |
tagScoresIncrement | POST /tag/{tag}/scores/increment | '/tag/{tag}/scores/increment' [POST] |
tagUpdate | POST /tag/update | /tag/update [POST] |
tagsSpecificTagSnapshot | GET /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​
Name | Type | Description | Notes |
---|---|---|---|
asset | [string] | The id (uuid) of the asset that you are trying to access. | defaults to undefined |
tag | [string] | tag id | defaults to undefined |
Return type​
void (empty response body)
HTTP request headers​
- Content-Type: Not defined
- Accept: text/plain
HTTP response details​
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
500 | Internal 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​
Name | Type | Description | Notes |
---|---|---|---|
tag | [string] | tag id | defaults 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 code | Description | Response headers |
---|---|---|
204 | No Content | - |
500 | Internal 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​
Name | Type | Description | Notes |
---|---|---|---|
tag | [string] | tag id | defaults 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 code | Description | Response headers |
---|---|---|
204 | No Content | - |
500 | Internal 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​
Name | Type | Description | Notes |
---|---|---|---|
tag | [string] | tag id | defaults 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 code | Description | Response headers |
---|---|---|
204 | No Content | - |
500 | Internal 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​
Name | Type | Description | Notes |
---|---|---|---|
seededScoreIncrement | SeededScoreIncrement | ||
tag | [string] | tag id | defaults to undefined |
Return type​
void (empty response body)
HTTP request headers​
- Content-Type: application/json
- Accept: text/plain
HTTP response details​
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
500 | Internal 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​
Name | Type | Description | Notes |
---|---|---|---|
tag | Tag | ||
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​
HTTP request headers​
- Content-Type: application/json
- Accept: application/json, text/plain
HTTP response details​
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
500 | Internal 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​
Name | Type | Description | Notes |
---|---|---|---|
tag | [string] | tag id | 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​
HTTP request headers​
- Content-Type: Not defined
- Accept: application/json, text/plain
HTTP response details​
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
410 | Tag was not found. | - |