Skip to main content

Persons API

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

MethodHTTP requestDescription
personDisassociateAssetPOST /persons/{person}/assets/delete/{asset}/persons/{person}/assets/delete/{asset} [POST]
personsCreateNewPersonPOST /persons/create/persons/create [POST]
personsDeletePersonPOST /persons/{person}/delete/persons/{person}/delete [POST]
personsSnapshotGET /persons/persons [GET]

personDisassociateAsset

personDisassociateAsset(person, asset)

/persons/{person}/assets/delete/{asset} [POST]

This will update both the asset and the person reference, that will remove a person from an asset(only the references). This will NOT remove the person. This will NOT remove the asset. This will only update the references so that they are disconnected from one another.

Example

// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*

val apiInstance = PersonsApi()
val person : kotlin.String = person_example // kotlin.String | This is a uuid that represents a person.
val asset : java.util.UUID = 2254f2c8-5797-40e8-ac56-41166dc0e159 // java.util.UUID | The id (uuid) of the asset that you are trying to access.
try {
apiInstance.personDisassociateAsset(person, asset)
} catch (e: ClientException) {
println("4xx response calling PersonsApi#personDisassociateAsset")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PersonsApi#personDisassociateAsset")
e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
personkotlin.StringThis is a uuid that represents a person.
assetjava.util.UUIDThe id (uuid) of the asset that you are trying to access.

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

personsCreateNewPerson

Person personsCreateNewPerson(transferables, seededPerson)

/persons/create [POST]

This will create a new person.

Example

// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*

val apiInstance = PersonsApi()
val transferables : kotlin.Boolean = true // kotlin.Boolean | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)
val seededPerson : SeededPerson = // SeededPerson |
try {
val result : Person = apiInstance.personsCreateNewPerson(transferables, seededPerson)
println(result)
} catch (e: ClientException) {
println("4xx response calling PersonsApi#personsCreateNewPerson")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PersonsApi#personsCreateNewPerson")
e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
transferableskotlin.BooleanThis is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)[optional]
seededPersonSeededPerson[optional]

Return type

Person

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

personsDeletePerson

personsDeletePerson(person)

/persons/{person}/delete [POST]

This will delete a specific person.

Example

// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*

val apiInstance = PersonsApi()
val person : kotlin.String = person_example // kotlin.String | This is a uuid that represents a person.
try {
apiInstance.personsDeletePerson(person)
} catch (e: ClientException) {
println("4xx response calling PersonsApi#personsDeletePerson")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PersonsApi#personsDeletePerson")
e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
personkotlin.StringThis is a uuid that represents a person.

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

personsSnapshot

Persons personsSnapshot(transferables)

/persons [GET]

This will get a snapshot of all of your people

Example

// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*

val apiInstance = PersonsApi()
val transferables : kotlin.Boolean = true // kotlin.Boolean | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)
try {
val result : Persons = apiInstance.personsSnapshot(transferables)
println(result)
} catch (e: ClientException) {
println("4xx response calling PersonsApi#personsSnapshot")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PersonsApi#personsSnapshot")
e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
transferableskotlin.BooleanThis is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement)[optional]

Return type

Persons

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json