Skip to main content

WorkstreamEvents API

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

MethodHTTP requestDescription
workstreamEventsCreateNewWorkstreamEventPOST /workstream_events/create/workstream_events/create [POST]
workstreamEventsDeleteSpecificWorkstreamEventPOST /workstream_events/{workstream_event}/delete/workstream_events/{workstream_event}/delete [POST]
workstreamEventsSnapshotGET /workstream_events/workstream_events [GET]

workstreamEventsCreateNewWorkstreamEvent

WorkstreamEvent workstreamEventsCreateNewWorkstreamEvent()

This will create a new WorkstreamEvent in the database.

Example

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

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

const body: Pieces.WorkstreamEventsCreateNewWorkstreamEventRequest = {
// 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,
// SeededWorkstreamEvent (optional)
seededWorkstreamEvent: ,
};

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

Parameters

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

WorkstreamEvent

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

workstreamEventsDeleteSpecificWorkstreamEvent

workstreamEventsDeleteSpecificWorkstreamEvent()

This will delete a specific workstream_event from the database!

Example

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

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

const body: Pieces.WorkstreamEventsDeleteSpecificWorkstreamEventRequest = {
// string | This is a identifier that is used to identify a specific workstream_event.
workstreamEvent: workstreamEvent_example,
};

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

Parameters

NameTypeDescriptionNotes
workstreamEvent[string]This is a identifier that is used to identify a specific workstream_event.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-

workstreamEventsSnapshot

WorkstreamEvents workstreamEventsSnapshot()

This will get a snapshot of all your workstream events.

Example

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

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

const body: Pieces.WorkstreamEventsSnapshotRequest = {
// 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.workstreamEventsSnapshot(body).then((data: WorkstreamEvents) => {
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

WorkstreamEvents

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-