Get a Migration
GET
/
storage
/
migrations
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const migration = await client.storage.migrations.retrieve('');
console.log(migration.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
migration = client.storage.migrations.retrieve(
"",
)
print(migration.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
migration, err := client.Storage.Migrations.Get(context.TODO(), "")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", migration.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.storage.migrations.MigrationRetrieveParams;
import com.telnyx.sdk.models.storage.migrations.MigrationRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
MigrationRetrieveResponse migration = client.storage().migrations().retrieve("");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
migration = telnyx.storage.migrations.retrieve("")
puts(migration)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$migration = $client->storage->migrations->retrieve('');
var_dump($migration);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx storage:migrations retrieve \
--api-key 'My API Key' \
--id ''curl --request GET \
--url https://api.telnyx.com/v2/storage/migrations/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"source_id": "<string>",
"target_bucket_name": "<string>",
"target_region": "<string>",
"id": "<string>",
"refresh": true,
"last_copy": "2020-01-01T00:00:00Z",
"bytes_to_migrate": 123,
"bytes_migrated": 123,
"speed": 123,
"eta": "2020-01-01T00:00:00Z",
"created_at": "2020-01-01T00:00:00Z"
}
}Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const migration = await client.storage.migrations.retrieve('');
console.log(migration.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
migration = client.storage.migrations.retrieve(
"",
)
print(migration.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
migration, err := client.Storage.Migrations.Get(context.TODO(), "")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", migration.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.storage.migrations.MigrationRetrieveParams;
import com.telnyx.sdk.models.storage.migrations.MigrationRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
MigrationRetrieveResponse migration = client.storage().migrations().retrieve("");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
migration = telnyx.storage.migrations.retrieve("")
puts(migration)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$migration = $client->storage->migrations->retrieve('');
var_dump($migration);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx storage:migrations retrieve \
--api-key 'My API Key' \
--id ''curl --request GET \
--url https://api.telnyx.com/v2/storage/migrations/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"source_id": "<string>",
"target_bucket_name": "<string>",
"target_region": "<string>",
"id": "<string>",
"refresh": true,
"last_copy": "2020-01-01T00:00:00Z",
"bytes_to_migrate": 123,
"bytes_migrated": 123,
"speed": 123,
"eta": "2020-01-01T00:00:00Z",
"created_at": "2020-01-01T00:00:00Z"
}
}