Creates or updates a Live Plugin for your Source with given code.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
• In order to successfully call this endpoint, the specified Workspace needs to have the Live Plugins feature enabled. Please reach out to your customer success manager for more information.
OK
Resource not found
Validation failure
Too many requests
{- "code": "console.log('Hello, World!');"
}
{- "data": {
- "livePlugin": {
- "id": "<id>",
- "sourceId": "qQEHquLrjRDN9j1ByrChyn",
- "downloadURL": "<download_url>",
- "createdBy": "sgJDWk3K21k6LE3tLU9nRK",
- "createdAt": "2006-01-02T15:04:05.000Z",
- "version": 1,
- "code": "console.log('Hello, World!');"
}
}
}
Delete the Live Plugin code for a Source. This will not disable Live Plugins for the Source, but will remove any existing code.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
• In order to successfully call this endpoint, the specified Workspace needs to have the Live Plugins feature enabled. Please reach out to your customer success manager for more information.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap(api.livePlugins.deleteLivePluginCode('qQEHquLrjRDN9j1ByrChyn')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "status": "SUCCESS"
}
}
Get the latest Live Plugins for your Source.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
• In order to successfully call this endpoint, the specified Workspace needs to have the Live Plugins feature enabled. Please reach out to your customer success manager for more information.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap(api.livePlugins.getLatestFromLivePlugins('qQEHquLrjRDN9j1ByrChyn')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "livePlugin": {
- "id": "4a502354-637c-4b5f-bd46-281f7c973fbd",
- "sourceId": "qQEHquLrjRDN9j1ByrChyn",
- "createdBy": "sgJDWk3K21k6LE3tLU9nRK",
- "createdAt": "2006-01-02T15:04:05.000Z",
- "version": 1,
- "code": null
}
}
}