Connector API
All URIs are relative to http://localhost:1000
Method | HTTP request | Description |
---|---|---|
connect | POST /connect | /connect [POST] |
intention | POST /{application}/intention | /{application}/intention [POST] |
onboarded | POST /{application}/onboarded | /onboarded [POST] |
react | POST /{application}/reaction | /{application}/reaction [POST] |
suggest | POST /{application}/suggestion | /{application}/suggestion [POST] |
track | POST /{application}/track | /{application}/track [POST] |
connect
Context connect(seededConnectorConnection)
/connect [POST]
Abstracts a bootup/connection for a specific context.
Example
// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*
val apiInstance = ConnectorApi()
val seededConnectorConnection : SeededConnectorConnection = // SeededConnectorConnection |
try {
val result : Context = apiInstance.connect(seededConnectorConnection)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConnectorApi#connect")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConnectorApi#connect")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
seededConnectorConnection | SeededConnectorConnection | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
intention
kotlin.String intention(application, seededConnectorAsset)
/{application}/intention [POST]
Allows you to send a SeededAsset for future comparison.
Example
// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*
val apiInstance = ConnectorApi()
val application : kotlin.String = application_example // kotlin.String |
val seededConnectorAsset : SeededConnectorAsset = // SeededConnectorAsset |
try {
val result : kotlin.String = apiInstance.intention(application, seededConnectorAsset)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConnectorApi#intention")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConnectorApi#intention")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
application | kotlin.String | ||
seededConnectorAsset | SeededConnectorAsset | [optional] |
Return type
kotlin.String
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
onboarded
kotlin.String onboarded(application, body)
/onboarded [POST]
A central endpoint to manage updates to the onboarding process.
Example
// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*
val apiInstance = ConnectorApi()
val application : kotlin.String = application_example // kotlin.String | This is a uuid that represents an application
val body : kotlin.Boolean = true // kotlin.Boolean | Whether or not that application has been onboarded.
try {
val result : kotlin.String = apiInstance.onboarded(application, body)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConnectorApi#onboarded")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConnectorApi#onboarded")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
application | kotlin.String | This is a uuid that represents an application | |
body | kotlin.Boolean | Whether or not that application has been onboarded. | [optional] |
Return type
kotlin.String
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
react
kotlin.String react(application, reaction)
/{application}/reaction [POST]
This will respond to the output generated by the /suggest endpoint.
Example
// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*
val apiInstance = ConnectorApi()
val application : kotlin.String = application_example // kotlin.String |
val reaction : Reaction = // Reaction | ** This body will need to be modified.
try {
val result : kotlin.String = apiInstance.react(application, reaction)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConnectorApi#react")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConnectorApi#react")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
application | kotlin.String | ||
reaction | Reaction | ** This body will need to be modified. | [optional] |
Return type
kotlin.String
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
suggest
Suggestion suggest(application, seededConnectorCreation)
/{application}/suggestion [POST]
Invoked whenever a code snippet is copied from an integration. For instance, if a JetBrains user copies code, this endpoint can be called to assess whether to suggest reusing a piece (if reuse is true, the endpoint provides assets that the user may consider using), saving the code snippet, or taking no action. **Note: This endpoint could potentially accept a SeededFormat for the request body if required.
Example
// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*
val apiInstance = ConnectorApi()
val application : kotlin.String = application_example // kotlin.String |
val seededConnectorCreation : SeededConnectorCreation = // SeededConnectorCreation | This is the Snippet that we will compare to all the saved assets to determine what we want to do with it!
try {
val result : Suggestion = apiInstance.suggest(application, seededConnectorCreation)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConnectorApi#suggest")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConnectorApi#suggest")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
application | kotlin.String | ||
seededConnectorCreation | SeededConnectorCreation | This is the Snippet that we will compare to all the saved assets to determine what we want to do with it! | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
track
kotlin.String track(application, seededConnectorTracking)
/{application}/track [POST]
Abstracts the process of packaging segments on a per-context basis.
Example
// Import classes:
import app.pieces.pieces-os-client.infrastructure.*
import app.pieces.pieces-os-client.models.*
val apiInstance = ConnectorApi()
val application : kotlin.String = application_example // kotlin.String | This is a uuid that represents an application
val seededConnectorTracking : SeededConnectorTracking = // SeededConnectorTracking | The body is able to take in several properties
try {
val result : kotlin.String = apiInstance.track(application, seededConnectorTracking)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConnectorApi#track")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConnectorApi#track")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
application | kotlin.String | This is a uuid that represents an application | |
seededConnectorTracking | SeededConnectorTracking | The body is able to take in several properties | [optional] |
Return type
kotlin.String
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined