Skip to main contenttelnyx-storage-javascript
Manage cloud storage buckets and objects using the S3-compatible Telnyx Storage API. This skill provides JavaScript SDK examples.
الانتقال إلى التثبيت التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
يتجاوز الأمر المباشر Prompt المخصّص للمراجعة. افحص المصدر قبل تشغيله.
npx skills add https://github.com/team-telnyx/telnyx-toolkit --skill telnyx-storage-javascriptيبقى الأمر في سطر واحد. مرّر أفقيًا لمراجعته كاملًا قبل النسخ.
تفضّل نسخة محلية؟ نزّل الملفات المتاحة حاليًا لدى SkillsMP.
المزيد من هذا المستودع
Complete Telnyx toolkit — ready-to-use tools (STT, TTS, RAG, Networking, 10DLC) plus SDK documentation for JavaScript, Python, Go, Java, and Ruby.
Automated Telnyx bot account signup via challenge-response
Track agent activities using the Telnyx AI Missions API. Use this skill when executing multi-step tasks that should be logged and tracked. Supports creating voice/SMS agents, scheduling calls, and retrieving conversation insights. Use when tasks involve calling people, sending SMS, or any substantial tracked work.
SOC
استنادا إلى تصنيف SOC المهني
| name | telnyx-storage-javascript |
| description | Manage cloud storage buckets and objects using the S3-compatible Telnyx Storage API. This skill provides JavaScript SDK examples. |
| metadata | {"author":"telnyx","product":"storage","language":"javascript","generated_by":"telnyx-ext-skills-generator"} |
Telnyx Storage - JavaScript
Installation
npm install telnyx
Setup
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'],
});
All examples below assume client is already initialized as shown above.
Create Presigned Object URL
Returns a timed and authenticated URL to download (GET) or upload (PUT) an object.
POST /storage/buckets/{bucketName}/{objectName}/presigned_url
const response = await client.storage.buckets.createPresignedURL('', { : });
.(response.);
bucketName
''
console
log
content
Get Bucket SSL Certificate
Returns the stored certificate detail of a bucket, if applicable.
GET /storage/buckets/{bucketName}/ssl_certificate
const sslCertificate = await client.storage.buckets.sslCertificate.retrieve('');
console.log(sslCertificate.data);
Add SSL Certificate
Uploads an SSL certificate and its matching secret so that you can use Telnyx's storage as your CDN.
PUT /storage/buckets/{bucketName}/ssl_certificate
const sslCertificate = await client.storage.buckets.sslCertificate.create('');
console.log(sslCertificate.data);
Remove SSL Certificate
Deletes an SSL certificate and its matching secret.
DELETE /storage/buckets/{bucketName}/ssl_certificate
const sslCertificate = await client.storage.buckets.sslCertificate.delete('');
console.log(sslCertificate.data);
Get API Usage
Returns the detail on API usage on a bucket of a particular time period, group by method category.
GET /storage/buckets/{bucketName}/usage/api
const response = await client.storage.buckets.usage.getAPIUsage('', {
filter: { end_time: '2019-12-27T18:11:19.117Z', start_time: '2019-12-27T18:11:19.117Z' },
});
console.log(response.data);
Get Bucket Usage
Returns the amount of storage space and number of files a bucket takes up.
GET /storage/buckets/{bucketName}/usage/storage
const response = await client.storage.buckets.usage.getBucketUsage('');
console.log(response.data);
List Migration Source coverage
GET /storage/migration_source_coverage
const response = await client.storage.listMigrationSourceCoverage();
console.log(response.data);
List all Migration Sources
GET /storage/migration_sources
const migrationSources = await client.storage.migrationSources.list();
console.log(migrationSources.data);
Create a Migration Source
Create a source from which data can be migrated from.
POST /storage/migration_sources — Required: provider, provider_auth, bucket_name
const migrationSource = await client.storage.migrationSources.create({
bucket_name: 'bucket_name',
provider: 'aws',
provider_auth: {},
});
console.log(migrationSource.data);
Get a Migration Source
GET /storage/migration_sources/{id}
const migrationSource = await client.storage.migrationSources.retrieve('');
console.log(migrationSource.data);
Delete a Migration Source
DELETE /storage/migration_sources/{id}
const migrationSource = await client.storage.migrationSources.delete('');
console.log(migrationSource.data);
List all Migrations
const migrations = await client.storage.migrations.list();
console.log(migrations.data);
Create a Migration
Initiate a migration of data from an external provider into Telnyx Cloud Storage.
POST /storage/migrations — Required: source_id, target_bucket_name, target_region
const migration = await client.storage.migrations.create({
source_id: 'source_id',
target_bucket_name: 'target_bucket_name',
target_region: 'target_region',
});
console.log(migration.data);
Get a Migration
GET /storage/migrations/{id}
const migration = await client.storage.migrations.retrieve('');
console.log(migration.data);
Stop a Migration
POST /storage/migrations/{id}/actions/stop
const response = await client.storage.migrations.actions.stop('');
console.log(response.data);