Skip to main content

ExternalProvider API

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

MethodHTTP requestDescription
externalProviderApiKeyCreatePOST /external_provider/api_key/create/external_provider/api_key/create [POST]
externalProviderApiKeyDeletePOST /external_provider/api_key/delete/external_provider/api_key/delete [POST]
externalProviderApiKeyUpdatePOST /external_provider/api_key/update/external_provider/api_key/update [POST]

externalProviderApiKeyCreate

CreatedExternalProviderApiKey externalProviderApiKeyCreate()

This will create a specific external_provider api_key from a specific user Auth0UserMetadata

Example

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

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

const body: Pieces.ExternalProviderApiKeyCreateRequest = {
// PrecreatedExternalProviderApiKey (optional)
precreatedExternalProviderApiKey: ,
};

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

Parameters

NameTypeDescriptionNotes
precreatedExternalProviderApiKeyPrecreatedExternalProviderApiKey

Return type

CreatedExternalProviderApiKey

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Invalid Authentication, Incorrect API key provided or organization-
500Internal Server Error-

externalProviderApiKeyDelete

DeletedExternalProviderApiKey externalProviderApiKeyDelete()

This will remove a specific external_provider api_key from a specific user Auth0UserMetadata

Example

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

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

const body: Pieces.ExternalProviderApiKeyDeleteRequest = {
// PredeletedExternalProviderApiKey (optional)
predeletedExternalProviderApiKey: ,
};

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

Parameters

NameTypeDescriptionNotes
predeletedExternalProviderApiKeyPredeletedExternalProviderApiKey

Return type

DeletedExternalProviderApiKey

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Invalid Authentication, Incorrect API key provided or organization-
500Internal Server Error-

externalProviderApiKeyUpdate

UpdatedExternalProviderApiKey externalProviderApiKeyUpdate()

This will update a specific external_provider api_key from a specific user Auth0UserMetadata

Example

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

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

const body: Pieces.ExternalProviderApiKeyUpdateRequest = {
// PreupdatedExternalProviderApiKey (optional)
preupdatedExternalProviderApiKey: ,
};

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

Parameters

NameTypeDescriptionNotes
preupdatedExternalProviderApiKeyPreupdatedExternalProviderApiKey

Return type

UpdatedExternalProviderApiKey

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Invalid Authentication, Incorrect API key provided or organization-
500Internal Server Error-