@convertrilo/sdk 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.d.ts +3 -0
- package/dist/src/types.d.ts +87 -15
- package/openapi.yaml +176 -13
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -110,6 +110,9 @@ export declare class ConvertriloClient {
|
|
|
110
110
|
events?: string[];
|
|
111
111
|
secret?: string;
|
|
112
112
|
isActive?: boolean;
|
|
113
|
+
failureCount?: number;
|
|
114
|
+
lastTriggeredAt?: string | null;
|
|
115
|
+
lastFailedAt?: string | null;
|
|
113
116
|
createdAt?: string;
|
|
114
117
|
}>;
|
|
115
118
|
deleteWebhook(id: string): Promise<unknown>;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -562,7 +562,10 @@ export interface paths {
|
|
|
562
562
|
path?: never;
|
|
563
563
|
cookie?: never;
|
|
564
564
|
};
|
|
565
|
-
/**
|
|
565
|
+
/**
|
|
566
|
+
* List webhooks
|
|
567
|
+
* @description List managed webhook subscriptions for the authenticated user. Managed webhook deliveries include HMAC-SHA256 signatures.
|
|
568
|
+
*/
|
|
566
569
|
get: {
|
|
567
570
|
parameters: {
|
|
568
571
|
query?: never;
|
|
@@ -584,7 +587,11 @@ export interface paths {
|
|
|
584
587
|
};
|
|
585
588
|
};
|
|
586
589
|
put?: never;
|
|
587
|
-
/**
|
|
590
|
+
/**
|
|
591
|
+
* Create a webhook
|
|
592
|
+
* @description Create a managed webhook subscription. The response includes `secret` exactly once.
|
|
593
|
+
* Store it securely and use it to verify `X-Webhook-Signature`.
|
|
594
|
+
*/
|
|
588
595
|
post: {
|
|
589
596
|
parameters: {
|
|
590
597
|
query?: never;
|
|
@@ -624,7 +631,10 @@ export interface paths {
|
|
|
624
631
|
};
|
|
625
632
|
get?: never;
|
|
626
633
|
put?: never;
|
|
627
|
-
/**
|
|
634
|
+
/**
|
|
635
|
+
* Test a webhook
|
|
636
|
+
* @description Sends a `webhook.test` event to the configured URL using the same HMAC signature header as managed deliveries.
|
|
637
|
+
*/
|
|
628
638
|
post: {
|
|
629
639
|
parameters: {
|
|
630
640
|
query?: never;
|
|
@@ -668,7 +678,33 @@ export interface paths {
|
|
|
668
678
|
};
|
|
669
679
|
options?: never;
|
|
670
680
|
head?: never;
|
|
671
|
-
|
|
681
|
+
/** Update a webhook */
|
|
682
|
+
patch: {
|
|
683
|
+
parameters: {
|
|
684
|
+
query?: never;
|
|
685
|
+
header?: never;
|
|
686
|
+
path: {
|
|
687
|
+
id: string;
|
|
688
|
+
};
|
|
689
|
+
cookie?: never;
|
|
690
|
+
};
|
|
691
|
+
requestBody: {
|
|
692
|
+
content: {
|
|
693
|
+
"application/json": components["schemas"]["WebhookUpdateRequest"];
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
responses: {
|
|
697
|
+
/** @description Updated */
|
|
698
|
+
200: {
|
|
699
|
+
headers: {
|
|
700
|
+
[name: string]: unknown;
|
|
701
|
+
};
|
|
702
|
+
content: {
|
|
703
|
+
"application/json": components["schemas"]["WebhookResponse"];
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
};
|
|
672
708
|
trace?: never;
|
|
673
709
|
};
|
|
674
710
|
"/jobs/bulk": {
|
|
@@ -1212,8 +1248,12 @@ export interface paths {
|
|
|
1212
1248
|
* @description Crawls an S3 prefix or Google Drive folder, queues one encode job per video file,
|
|
1213
1249
|
* and optionally delivers outputs to CDN, S3, or Google Drive.
|
|
1214
1250
|
*
|
|
1215
|
-
* For API integrations,
|
|
1216
|
-
*
|
|
1251
|
+
* For API integrations, use bring-your-own credentials:
|
|
1252
|
+
* - S3-compatible storage: pass `sourceS3` and/or `outputS3` credentials from your backend.
|
|
1253
|
+
* - Google Drive: pass customer OAuth `accessToken` values in `sourceGoogleDrive` and/or `outputGoogleDrive`.
|
|
1254
|
+
* - Include `refreshToken` when jobs may outlive a short access token.
|
|
1255
|
+
*
|
|
1256
|
+
* Your users do not need to connect Google Drive inside the Convertrilo dashboard for API usage.
|
|
1217
1257
|
*/
|
|
1218
1258
|
post: {
|
|
1219
1259
|
parameters: {
|
|
@@ -1590,6 +1630,12 @@ export interface components {
|
|
|
1590
1630
|
url: string;
|
|
1591
1631
|
events: ("job.created" | "job.queued" | "job.running" | "job.completed" | "job.failed" | "job.canceled")[];
|
|
1592
1632
|
};
|
|
1633
|
+
WebhookUpdateRequest: {
|
|
1634
|
+
/** Format: uri */
|
|
1635
|
+
url?: string;
|
|
1636
|
+
events?: ("job.created" | "job.queued" | "job.running" | "job.completed" | "job.failed" | "job.canceled")[];
|
|
1637
|
+
isActive?: boolean;
|
|
1638
|
+
};
|
|
1593
1639
|
WebhookResponse: {
|
|
1594
1640
|
/** Format: uuid */
|
|
1595
1641
|
id?: string;
|
|
@@ -1598,6 +1644,11 @@ export interface components {
|
|
|
1598
1644
|
/** @description HMAC secret, only returned on creation */
|
|
1599
1645
|
secret?: string;
|
|
1600
1646
|
isActive?: boolean;
|
|
1647
|
+
failureCount?: number;
|
|
1648
|
+
/** Format: date-time */
|
|
1649
|
+
lastTriggeredAt?: string | null;
|
|
1650
|
+
/** Format: date-time */
|
|
1651
|
+
lastFailedAt?: string | null;
|
|
1601
1652
|
/** Format: date-time */
|
|
1602
1653
|
createdAt?: string;
|
|
1603
1654
|
};
|
|
@@ -1615,45 +1666,63 @@ export interface components {
|
|
|
1615
1666
|
secretAccessKey?: string;
|
|
1616
1667
|
forcePathStyle?: boolean;
|
|
1617
1668
|
};
|
|
1669
|
+
/** @description Customer-owned S3-compatible folder source. Credentials should allow listing the prefix and reading objects. */
|
|
1618
1670
|
S3FolderSource: {
|
|
1619
1671
|
bucket: string;
|
|
1620
|
-
/**
|
|
1672
|
+
/**
|
|
1673
|
+
* @description Prefix to crawl. Only files with video extensions are queued.
|
|
1674
|
+
* @default
|
|
1675
|
+
*/
|
|
1621
1676
|
prefix?: string;
|
|
1622
|
-
/**
|
|
1677
|
+
/**
|
|
1678
|
+
* Format: uri
|
|
1679
|
+
* @description Optional S3-compatible endpoint, for example Cloudflare R2, MinIO, or object storage providers.
|
|
1680
|
+
*/
|
|
1623
1681
|
endpoint?: string;
|
|
1624
1682
|
region?: string;
|
|
1683
|
+
/** @description Optional source access key. Omit only when your backend/runtime provides credentials another way. */
|
|
1625
1684
|
accessKeyId?: string;
|
|
1626
1685
|
/** Format: password */
|
|
1627
1686
|
secretAccessKey?: string;
|
|
1628
1687
|
/** @default true */
|
|
1629
1688
|
forcePathStyle?: boolean;
|
|
1630
1689
|
};
|
|
1690
|
+
/** @description Customer-owned S3-compatible output destination. Credentials should allow writing encoded objects. */
|
|
1631
1691
|
S3FolderOutput: {
|
|
1632
1692
|
bucket: string;
|
|
1633
|
-
/**
|
|
1693
|
+
/**
|
|
1694
|
+
* @description Output key prefix. The source file name is appended to this prefix.
|
|
1695
|
+
* @default outputs/
|
|
1696
|
+
*/
|
|
1634
1697
|
prefix?: string;
|
|
1635
|
-
/**
|
|
1698
|
+
/**
|
|
1699
|
+
* Format: uri
|
|
1700
|
+
* @description Optional S3-compatible endpoint, for example Cloudflare R2, MinIO, or object storage providers.
|
|
1701
|
+
*/
|
|
1636
1702
|
endpoint?: string;
|
|
1637
1703
|
region?: string;
|
|
1704
|
+
/** @description Optional output access key. Omit only when your backend/runtime provides credentials another way. */
|
|
1638
1705
|
accessKeyId?: string;
|
|
1639
1706
|
/** Format: password */
|
|
1640
1707
|
secretAccessKey?: string;
|
|
1641
1708
|
/** @default true */
|
|
1642
1709
|
forcePathStyle?: boolean;
|
|
1643
1710
|
};
|
|
1711
|
+
/** @description Google Drive folder source for API integrations. Pass a customer-owned OAuth token instead of sending the user through the Convertrilo dashboard. */
|
|
1644
1712
|
GoogleDriveFolderSource: {
|
|
1645
1713
|
folderId: string;
|
|
1646
|
-
/** @description Short-lived Google OAuth access token supplied by the API caller. */
|
|
1714
|
+
/** @description Short-lived Google OAuth access token supplied by the API caller. Must allow reading/listing files in the folder. */
|
|
1647
1715
|
accessToken?: string;
|
|
1648
|
-
/** @description Optional Google refresh token supplied by the API caller for long-running jobs. */
|
|
1716
|
+
/** @description Optional Google refresh token supplied by the API caller. Recommended for long-running folder jobs so workers can refresh expired access tokens. */
|
|
1649
1717
|
refreshToken?: string;
|
|
1650
1718
|
};
|
|
1719
|
+
/** @description Google Drive output destination for API integrations. Pass a customer-owned OAuth token with upload access to the destination folder. */
|
|
1651
1720
|
GoogleDriveOutput: {
|
|
1652
1721
|
folderId: string;
|
|
1653
1722
|
fileName?: string;
|
|
1654
|
-
/** @description Short-lived Google OAuth access token supplied by the API caller. */
|
|
1723
|
+
/** @description Short-lived Google OAuth access token supplied by the API caller. Must allow uploading to the destination folder. */
|
|
1655
1724
|
accessToken?: string;
|
|
1656
|
-
/** @description Optional Google refresh token supplied by the API caller for long-running jobs. */
|
|
1725
|
+
/** @description Optional Google refresh token supplied by the API caller. Recommended for long-running jobs so workers can refresh expired access tokens. */
|
|
1657
1726
|
refreshToken?: string;
|
|
1658
1727
|
};
|
|
1659
1728
|
OnDemandEncodeRequest: {
|
|
@@ -1698,7 +1767,10 @@ export interface components {
|
|
|
1698
1767
|
priority?: "normal" | "high";
|
|
1699
1768
|
/** @default 86400 */
|
|
1700
1769
|
outputExpiry?: number;
|
|
1701
|
-
/**
|
|
1770
|
+
/**
|
|
1771
|
+
* Format: uri
|
|
1772
|
+
* @description Optional one-off terminal callback URL for this job. Best-effort and unsigned. Use managed webhooks for signed HMAC delivery.
|
|
1773
|
+
*/
|
|
1702
1774
|
webhook?: string;
|
|
1703
1775
|
outputS3?: components["schemas"]["S3Output"];
|
|
1704
1776
|
outputGoogleDrive?: components["schemas"]["GoogleDriveOutput"];
|
package/openapi.yaml
CHANGED
|
@@ -5,6 +5,16 @@ info:
|
|
|
5
5
|
description: |
|
|
6
6
|
JWT-protected API for creating and managing encode jobs. Supports browser-upload, direct URL ingest, or S3 source.
|
|
7
7
|
Public endpoints are limited and rate-limited.
|
|
8
|
+
|
|
9
|
+
Swagger auth:
|
|
10
|
+
1. Create an API key in Dashboard -> Developer.
|
|
11
|
+
2. Click Authorize in these docs.
|
|
12
|
+
3. Paste the raw API key into ApiKeyAuth.
|
|
13
|
+
4. Protected endpoints can then be executed from Swagger.
|
|
14
|
+
|
|
15
|
+
API integrations should keep Convertrilo API keys and customer storage/OAuth tokens on the server.
|
|
16
|
+
For storage integrations, pass customer-owned S3 credentials or Google OAuth access/refresh tokens directly in the API request.
|
|
17
|
+
Convertrilo does not require your API users to visit the dashboard OAuth flow.
|
|
8
18
|
|
|
9
19
|
Official TypeScript SDK: https://www.npmjs.com/package/@convertrilo/sdk
|
|
10
20
|
SDK source and examples: https://github.com/serkandrgn/convertrilo-js
|
|
@@ -292,6 +302,24 @@ components:
|
|
|
292
302
|
job.failed,
|
|
293
303
|
job.canceled,
|
|
294
304
|
]
|
|
305
|
+
WebhookUpdateRequest:
|
|
306
|
+
type: object
|
|
307
|
+
properties:
|
|
308
|
+
url: { type: string, format: uri }
|
|
309
|
+
events:
|
|
310
|
+
type: array
|
|
311
|
+
items:
|
|
312
|
+
type: string
|
|
313
|
+
enum:
|
|
314
|
+
[
|
|
315
|
+
job.created,
|
|
316
|
+
job.queued,
|
|
317
|
+
job.running,
|
|
318
|
+
job.completed,
|
|
319
|
+
job.failed,
|
|
320
|
+
job.canceled,
|
|
321
|
+
]
|
|
322
|
+
isActive: { type: boolean }
|
|
295
323
|
WebhookResponse:
|
|
296
324
|
type: object
|
|
297
325
|
properties:
|
|
@@ -306,6 +334,9 @@ components:
|
|
|
306
334
|
description: "HMAC secret, only returned on creation",
|
|
307
335
|
}
|
|
308
336
|
isActive: { type: boolean }
|
|
337
|
+
failureCount: { type: integer }
|
|
338
|
+
lastTriggeredAt: { type: string, format: date-time, nullable: true }
|
|
339
|
+
lastFailedAt: { type: string, format: date-time, nullable: true }
|
|
309
340
|
createdAt: { type: string, format: date-time }
|
|
310
341
|
WebhookListResponse:
|
|
311
342
|
type: object
|
|
@@ -329,49 +360,69 @@ components:
|
|
|
329
360
|
forcePathStyle: { type: boolean }
|
|
330
361
|
S3FolderSource:
|
|
331
362
|
type: object
|
|
363
|
+
description: Customer-owned S3-compatible folder source. Credentials should allow listing the prefix and reading objects.
|
|
332
364
|
required: [bucket]
|
|
333
365
|
properties:
|
|
334
366
|
bucket: { type: string }
|
|
335
|
-
prefix:
|
|
336
|
-
|
|
367
|
+
prefix:
|
|
368
|
+
type: string
|
|
369
|
+
default: ""
|
|
370
|
+
description: Prefix to crawl. Only files with video extensions are queued.
|
|
371
|
+
endpoint:
|
|
372
|
+
type: string
|
|
373
|
+
format: uri
|
|
374
|
+
description: Optional S3-compatible endpoint, for example Cloudflare R2, MinIO, or object storage providers.
|
|
337
375
|
region: { type: string }
|
|
338
|
-
accessKeyId:
|
|
376
|
+
accessKeyId:
|
|
377
|
+
type: string
|
|
378
|
+
description: Optional source access key. Omit only when your backend/runtime provides credentials another way.
|
|
339
379
|
secretAccessKey: { type: string, format: password }
|
|
340
380
|
forcePathStyle: { type: boolean, default: true }
|
|
341
381
|
S3FolderOutput:
|
|
342
382
|
type: object
|
|
383
|
+
description: Customer-owned S3-compatible output destination. Credentials should allow writing encoded objects.
|
|
343
384
|
required: [bucket]
|
|
344
385
|
properties:
|
|
345
386
|
bucket: { type: string }
|
|
346
|
-
prefix:
|
|
347
|
-
|
|
387
|
+
prefix:
|
|
388
|
+
type: string
|
|
389
|
+
default: outputs/
|
|
390
|
+
description: Output key prefix. The source file name is appended to this prefix.
|
|
391
|
+
endpoint:
|
|
392
|
+
type: string
|
|
393
|
+
format: uri
|
|
394
|
+
description: Optional S3-compatible endpoint, for example Cloudflare R2, MinIO, or object storage providers.
|
|
348
395
|
region: { type: string }
|
|
349
|
-
accessKeyId:
|
|
396
|
+
accessKeyId:
|
|
397
|
+
type: string
|
|
398
|
+
description: Optional output access key. Omit only when your backend/runtime provides credentials another way.
|
|
350
399
|
secretAccessKey: { type: string, format: password }
|
|
351
400
|
forcePathStyle: { type: boolean, default: true }
|
|
352
401
|
GoogleDriveFolderSource:
|
|
353
402
|
type: object
|
|
403
|
+
description: Google Drive folder source for API integrations. Pass a customer-owned OAuth token instead of sending the user through the Convertrilo dashboard.
|
|
354
404
|
required: [folderId]
|
|
355
405
|
properties:
|
|
356
406
|
folderId: { type: string }
|
|
357
407
|
accessToken:
|
|
358
408
|
type: string
|
|
359
|
-
description: Short-lived Google OAuth access token supplied by the API caller.
|
|
409
|
+
description: Short-lived Google OAuth access token supplied by the API caller. Must allow reading/listing files in the folder.
|
|
360
410
|
refreshToken:
|
|
361
411
|
type: string
|
|
362
|
-
description: Optional Google refresh token supplied by the API caller for long-running jobs.
|
|
412
|
+
description: Optional Google refresh token supplied by the API caller. Recommended for long-running folder jobs so workers can refresh expired access tokens.
|
|
363
413
|
GoogleDriveOutput:
|
|
364
414
|
type: object
|
|
415
|
+
description: Google Drive output destination for API integrations. Pass a customer-owned OAuth token with upload access to the destination folder.
|
|
365
416
|
required: [folderId]
|
|
366
417
|
properties:
|
|
367
418
|
folderId: { type: string }
|
|
368
419
|
fileName: { type: string }
|
|
369
420
|
accessToken:
|
|
370
421
|
type: string
|
|
371
|
-
description: Short-lived Google OAuth access token supplied by the API caller.
|
|
422
|
+
description: Short-lived Google OAuth access token supplied by the API caller. Must allow uploading to the destination folder.
|
|
372
423
|
refreshToken:
|
|
373
424
|
type: string
|
|
374
|
-
description: Optional Google refresh token supplied by the API caller for long-running jobs.
|
|
425
|
+
description: Optional Google refresh token supplied by the API caller. Recommended for long-running jobs so workers can refresh expired access tokens.
|
|
375
426
|
OnDemandEncodeRequest:
|
|
376
427
|
type: object
|
|
377
428
|
required: [sourceUrl]
|
|
@@ -393,7 +444,10 @@ components:
|
|
|
393
444
|
priority: { type: string, enum: [normal, high], default: normal }
|
|
394
445
|
outputExpiry:
|
|
395
446
|
{ type: integer, minimum: 3600, maximum: 604800, default: 86400 }
|
|
396
|
-
webhook:
|
|
447
|
+
webhook:
|
|
448
|
+
type: string
|
|
449
|
+
format: uri
|
|
450
|
+
description: Optional one-off terminal callback URL for this job. Best-effort and unsigned. Use managed webhooks for signed HMAC delivery.
|
|
397
451
|
outputS3:
|
|
398
452
|
$ref: "#/components/schemas/S3Output"
|
|
399
453
|
outputGoogleDrive:
|
|
@@ -758,6 +812,7 @@ paths:
|
|
|
758
812
|
get:
|
|
759
813
|
security: [{ BearerAuth: [] }]
|
|
760
814
|
summary: List webhooks
|
|
815
|
+
description: List managed webhook subscriptions for the authenticated user. Managed webhook deliveries include HMAC-SHA256 signatures.
|
|
761
816
|
responses:
|
|
762
817
|
"200":
|
|
763
818
|
description: List of webhooks
|
|
@@ -768,12 +823,21 @@ paths:
|
|
|
768
823
|
post:
|
|
769
824
|
security: [{ BearerAuth: [] }]
|
|
770
825
|
summary: Create a webhook
|
|
826
|
+
description: |
|
|
827
|
+
Create a managed webhook subscription. The response includes `secret` exactly once.
|
|
828
|
+
Store it securely and use it to verify `X-Webhook-Signature`.
|
|
771
829
|
requestBody:
|
|
772
830
|
required: true
|
|
773
831
|
content:
|
|
774
832
|
application/json:
|
|
775
833
|
schema:
|
|
776
834
|
$ref: "#/components/schemas/WebhookCreateRequest"
|
|
835
|
+
examples:
|
|
836
|
+
jobCompletionWebhook:
|
|
837
|
+
summary: Completion and failure notifications
|
|
838
|
+
value:
|
|
839
|
+
url: https://your-app.com/webhooks/convertrilo
|
|
840
|
+
events: [job.completed, job.failed, job.canceled]
|
|
777
841
|
responses:
|
|
778
842
|
"200":
|
|
779
843
|
description: Created
|
|
@@ -782,6 +846,36 @@ paths:
|
|
|
782
846
|
schema:
|
|
783
847
|
$ref: "#/components/schemas/WebhookResponse"
|
|
784
848
|
/webhooks/{id}:
|
|
849
|
+
patch:
|
|
850
|
+
security: [{ BearerAuth: [] }]
|
|
851
|
+
summary: Update a webhook
|
|
852
|
+
parameters:
|
|
853
|
+
- in: path
|
|
854
|
+
name: id
|
|
855
|
+
required: true
|
|
856
|
+
schema: { type: string, format: uuid }
|
|
857
|
+
requestBody:
|
|
858
|
+
required: true
|
|
859
|
+
content:
|
|
860
|
+
application/json:
|
|
861
|
+
schema:
|
|
862
|
+
$ref: "#/components/schemas/WebhookUpdateRequest"
|
|
863
|
+
examples:
|
|
864
|
+
reEnableWebhook:
|
|
865
|
+
summary: Re-enable a disabled webhook
|
|
866
|
+
value:
|
|
867
|
+
isActive: true
|
|
868
|
+
changeEvents:
|
|
869
|
+
summary: Receive only terminal job events
|
|
870
|
+
value:
|
|
871
|
+
events: [job.completed, job.failed, job.canceled]
|
|
872
|
+
responses:
|
|
873
|
+
"200":
|
|
874
|
+
description: Updated
|
|
875
|
+
content:
|
|
876
|
+
application/json:
|
|
877
|
+
schema:
|
|
878
|
+
$ref: "#/components/schemas/WebhookResponse"
|
|
785
879
|
delete:
|
|
786
880
|
security: [{ BearerAuth: [] }]
|
|
787
881
|
summary: Delete a webhook
|
|
@@ -795,6 +889,7 @@ paths:
|
|
|
795
889
|
post:
|
|
796
890
|
security: [{ BearerAuth: [] }]
|
|
797
891
|
summary: Test a webhook
|
|
892
|
+
description: Sends a `webhook.test` event to the configured URL using the same HMAC signature header as managed deliveries.
|
|
798
893
|
parameters:
|
|
799
894
|
- in: path
|
|
800
895
|
name: id
|
|
@@ -1018,6 +1113,37 @@ paths:
|
|
|
1018
1113
|
application/json:
|
|
1019
1114
|
schema:
|
|
1020
1115
|
$ref: "#/components/schemas/OnDemandEncodeRequest"
|
|
1116
|
+
examples:
|
|
1117
|
+
urlToCdn:
|
|
1118
|
+
summary: URL source to CDN output
|
|
1119
|
+
value:
|
|
1120
|
+
sourceUrl: https://example.com/video.mp4
|
|
1121
|
+
codec: h264
|
|
1122
|
+
resolution: 1080p
|
|
1123
|
+
quality: better
|
|
1124
|
+
urlToS3:
|
|
1125
|
+
summary: URL source to S3 output
|
|
1126
|
+
value:
|
|
1127
|
+
sourceUrl: https://example.com/video.mp4
|
|
1128
|
+
codec: h264
|
|
1129
|
+
resolution: 1080p
|
|
1130
|
+
outputS3:
|
|
1131
|
+
bucket: customer-output-bucket
|
|
1132
|
+
key: encoded/video-1080p.mp4
|
|
1133
|
+
region: us-east-1
|
|
1134
|
+
accessKeyId: AKIA...
|
|
1135
|
+
secretAccessKey: replace-with-secret
|
|
1136
|
+
urlToGoogleDrive:
|
|
1137
|
+
summary: URL source to Google Drive output with BYO token
|
|
1138
|
+
value:
|
|
1139
|
+
sourceUrl: https://example.com/video.mp4
|
|
1140
|
+
codec: h264
|
|
1141
|
+
resolution: 1080p
|
|
1142
|
+
outputGoogleDrive:
|
|
1143
|
+
folderId: GOOGLE_DRIVE_FOLDER_ID
|
|
1144
|
+
fileName: video-1080p.mp4
|
|
1145
|
+
accessToken: ya29...
|
|
1146
|
+
refreshToken: optional-refresh-token
|
|
1021
1147
|
responses:
|
|
1022
1148
|
"200":
|
|
1023
1149
|
description: Job created and queued
|
|
@@ -1057,14 +1183,51 @@ paths:
|
|
|
1057
1183
|
Crawls an S3 prefix or Google Drive folder, queues one encode job per video file,
|
|
1058
1184
|
and optionally delivers outputs to CDN, S3, or Google Drive.
|
|
1059
1185
|
|
|
1060
|
-
For API integrations,
|
|
1061
|
-
|
|
1186
|
+
For API integrations, use bring-your-own credentials:
|
|
1187
|
+
- S3-compatible storage: pass `sourceS3` and/or `outputS3` credentials from your backend.
|
|
1188
|
+
- Google Drive: pass customer OAuth `accessToken` values in `sourceGoogleDrive` and/or `outputGoogleDrive`.
|
|
1189
|
+
- Include `refreshToken` when jobs may outlive a short access token.
|
|
1190
|
+
|
|
1191
|
+
Your users do not need to connect Google Drive inside the Convertrilo dashboard for API usage.
|
|
1062
1192
|
requestBody:
|
|
1063
1193
|
required: true
|
|
1064
1194
|
content:
|
|
1065
1195
|
application/json:
|
|
1066
1196
|
schema:
|
|
1067
1197
|
$ref: "#/components/schemas/OnDemandFolderIngestRequest"
|
|
1198
|
+
examples:
|
|
1199
|
+
s3FolderToS3:
|
|
1200
|
+
summary: S3 folder source to S3 output
|
|
1201
|
+
value:
|
|
1202
|
+
sourceS3:
|
|
1203
|
+
bucket: customer-source-bucket
|
|
1204
|
+
prefix: incoming/
|
|
1205
|
+
region: us-east-1
|
|
1206
|
+
accessKeyId: AKIA...
|
|
1207
|
+
secretAccessKey: replace-with-secret
|
|
1208
|
+
outputDestination: s3
|
|
1209
|
+
outputS3:
|
|
1210
|
+
bucket: customer-output-bucket
|
|
1211
|
+
prefix: encoded/
|
|
1212
|
+
region: us-east-1
|
|
1213
|
+
accessKeyId: AKIA...
|
|
1214
|
+
secretAccessKey: replace-with-secret
|
|
1215
|
+
codec: h264
|
|
1216
|
+
resolution: 1080p
|
|
1217
|
+
googleDriveFolderToGoogleDrive:
|
|
1218
|
+
summary: Google Drive folder source to Google Drive output
|
|
1219
|
+
value:
|
|
1220
|
+
sourceGoogleDrive:
|
|
1221
|
+
folderId: SOURCE_FOLDER_ID
|
|
1222
|
+
accessToken: ya29...
|
|
1223
|
+
refreshToken: optional-refresh-token
|
|
1224
|
+
outputDestination: google-drive
|
|
1225
|
+
outputGoogleDrive:
|
|
1226
|
+
folderId: OUTPUT_FOLDER_ID
|
|
1227
|
+
accessToken: ya29...
|
|
1228
|
+
refreshToken: optional-refresh-token
|
|
1229
|
+
codec: h264
|
|
1230
|
+
resolution: 1080p
|
|
1068
1231
|
responses:
|
|
1069
1232
|
"200":
|
|
1070
1233
|
description: Folder jobs queued
|