diff --git a/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx b/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx index 9a0bbfed..a01a9a7b 100644 --- a/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx +++ b/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx @@ -14,7 +14,10 @@ If you need support for a different storage provider, you can participate in the To use your own storage you need to: 1. Configure a new storage for your Stream application -2. Configure your call type(s) to use the new storage +2. (Optional) Check storage configuration for correctness. + Calling check endpoint will create a test markdown file in the storage to verify the configuration. It will return an error if the file is not created. + In case of success, the file with`stream-.md` will be uploaded to the storage. Every time you call this endpoint, a new file will be created. +3. Configure your call type(s) to use the new storage Once the setup is complete, call recordings and transcription files will be automatically stored in your own storage. @@ -35,7 +38,13 @@ await serverSideClient.createExternalStorage({ }, }); -// 2. update the call type to use the new storage +// 2. (Optional) Check storage configuration for correctness +// In case of any errors, this will throw a ResponseError. +await serverSideClient.checkExternalStorage({ + name: 'my-s3' +}); + +// 3. update the call type to use the new storage await serverSideClient.updateCallType('my-call-type', { external_storage: "my-s3", }); @@ -44,10 +53,10 @@ await serverSideClient.updateCallType('my-call-type', { ```py -from getstream.models import S3Request - # 1. create a new storage with all the required parameters -client.create_external_storage( +from getstream.models.s_3_request import S3Request + +client.video.create_external_storage( name='my-s3', storage_type='s3', bucket='my-bucket', @@ -59,8 +68,12 @@ client.create_external_storage( ), ) -# 2. update the call type to use the new storage -client.video.update_call_type(name='allhands', external_storage= "my-s3") +# 2. (Optional) Check storage configuration for correctness +# In case of any errors, this will throw a StreamAPIException. +response = client.video.check_external_storage(name='my-s3') + +# 3. update the call type to use the new storage +client.video.update_call_type(name='allhands', external_storage='my-s3') ``` @@ -83,7 +96,13 @@ curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${AP } }' -# 2. update the call type to use the new storage + # 2. (Optional) Check storage configuration for correctness +curl -X GET https://video.stream-io-api.com/video/external_storage/check?api_key=${API_KEY} \ + -H "Authorization: ${TOKEN}" \ + -H "stream-auth-type: jwt" + + +# 3. update the call type to use the new storage curl -X PUT https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE}?api_key=${API_KEY} \ -H "Authorization: ${TOKEN}" \ -H "Content-Type: application/json" \