Latest Legacy

Retrieve a PHLO

API Endpoint

GET https://phlorunner.plivo.com/v1/phlo/{phlo_id}

Arguments

URL Params

Param Description/Allowed Values
phlo_idRequiredstring

Unique identifier for the PHLO. PHLO IDs are listed on the PHLO page of the console.

Payload

No arguments need to be passed.

Returns

Returns a PHLO object.

Response

HTTP Status Code: 200

{
    "api_id": "e4202a42-0419-43db-9889-c440d3167796",
    "phlo_id": "4c1a9f23-7f56-4879-bb80-db856e1e7701",
    "name": "SMS Notifications",
    "created_on": "2021-01-30 09:20:08.617883+00:00"
}

Example Request

1
2
3
4
5
6
7
8
import plivo

auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
response = phlo_client.phlo.get(phlo_id)
print (str(response))
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'rubygems'
require 'plivo'

include Plivo

AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'

client = Phlo.new(AUTH_ID, AUTH_TOKEN)

# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new

# provide the phlo_id in params
begin
    phlo = client.phlo.get('<phlo_id>')
    puts phlo
  rescue PlivoRESTError => e
    puts 'Exception: ' + e.message
  end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var phloClient = phlo = null;

//Get Phlo details by phlo id
phloClient = new PhloClient(authId, authToken);
phloClient.phlo.get(phloId).then(function (result) {
    console.log('phlo details =>', result);
}).catch(function (err) {
    console.log('Failed to fetch phlo details', err);
});;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
/**
 * Example for API Request
 */
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
try {
    $response = $client->phlo->getPhlo("<phlo_id>");
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}
?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;

public class Example
{
    private static final String authId = "<auth_id>";
    private static final String authToken = "<auth_token>";
    private static PlivoClient client = new PlivoClient(authId, authToken);
    public static void main(String[] args) throws IOException, PlivoRestException
    {
        String phloId = "<phlo_id>";
        Plivo.init(authId, authToken);
        Phlo phlo = Phlo.getter(phloId).client(client).get();
        System.out.println("Call Response:"+ phlo);
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;
using Plivo;

namespace test_PHLO_dotnet
{
    class Program
    {
        public static void Main(string[] args)
        {
            var phloClient = new PhloApi("<auth_id>", "<auth_token>");
            var phloID = "<phlo_id>";
            var phlo = phloClient.Phlo.Get(phloID);   
            Console.WriteLine(phlo());
        }
    }
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
  https://phlorunner.plivo.com/v1/phlo/{phlo_id}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main

import (
	"fmt"
	"plivo-go"
)

// Initialize the following params with corresponding values to trigger resources

const authId  = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"


func main() {
	testPhloGet()
}

func testPhloGet() {
	phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
	if err != nil {
			fmt.Print("Error", err.Error())
			return
		}
	response, err := phloClient.Phlos.Get(phloId)
	if err != nil {
			fmt.Print("Error", err.Error())
			return
		}
	fmt.Printf("Response: %#v\n", response)

}