Skip to main content

Activity API

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

MethodHTTP requestDescription
activitiesSpecificActivitySnapshotGET /activity/{activity}/activity/{activity} [GET]
activityIdentifiersSnapshotGET /activity/identifiers/activity/identifiers [GET]
activityUpdatePOST /activity/update/activity/update [POST]

activitiesSpecificActivitySnapshot

Activity activitiesSpecificActivitySnapshot()

This will attempt to get a specific activity.

Example

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

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

const body: Pieces.ActivitiesSpecificActivitySnapshotRequest = {
// string | This is a specific activity uuid.
activity: activity_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.activitiesSpecificActivitySnapshot(body).then((data: Activity) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

NameTypeDescriptionNotes
activity[string]This is a specific activity uuid.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

Activity

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
410Activity was not found.-
500Internal Server Error-

activityIdentifiersSnapshot

FlattenedActivities activityIdentifiersSnapshot()

This is going to return all the identifiers of the activity event in order of most recent -> oldest.

Example

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

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

const body: Pieces.ActivityIdentifiersSnapshotRequest = {
// boolean | This is helper boolean that will give you the ability to also include your pseudo assets, we will always default to false. (optional)
pseudo: true,
// 'CREATED' | 'UPDATED' | 'DELETED' | 'REFERENCED' | This is an ActivityFilterEnum as a optional filter. Ensure you update ActivityFilterEnum if this is updated. (optional)
activityFilterEnum: activityFilterEnum_example,
};

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

Parameters

NameTypeDescriptionNotes
pseudo[boolean]This is helper boolean that will give you the ability to also include your pseudo assets, we will always default to false.(optional) defaults to undefined
activityFilterEnum[**'CREATED''UPDATED''DELETED'

Return type

FlattenedActivities

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

activityUpdate

Activity activityUpdate()

this will update a specific activity.

Example

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

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

const body: Pieces.ActivityUpdateRequest = {
// 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,
// Activity (optional)
activity: ,
};

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

Parameters

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

Activity

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-