Chilkat Online Tools

PowerBuilder / Plivo REST API / Retrieve a PHLO Run

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_SbResponseBody

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

loo_Http.BasicAuth = 1
loo_Http.Login = "{{auth_id}}"
loo_Http.Password = "password"

loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

li_Success = loo_Http.QuickGetSb("https://phlorunner.plivo.com/v1/phlo/{phlo_id}/runs/{run_id}",loo_SbResponseBody)
if li_Success = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_SbResponseBody
    return
end if

Write-Debug "Response status code = " + string(loo_Http.LastStatus)
Write-Debug loo_SbResponseBody.GetAsString()


destroy loo_Http
destroy loo_SbResponseBody

Curl Command

curl -X GET
	-u '{{auth_id}}:password'
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/runs/{run_id}

Postman Collection Item JSON

{
  "name": "Retrieve a PHLO Run",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "https://phlorunner.plivo.com/v1/phlo/{phlo_id}/runs/{run_id}",
      "protocol": "https",
      "host": [
        "phlorunner",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "phlo",
        "{phlo_id}",
        "runs",
        "{run_id}"
      ]
    },
    "description": "More infomration can be found [here](https://www.plivo.com/docs/phlo/api/phlo#retrieve-a-phlo-run)"
  },
  "response": [
    {
      "name": "Retrieve a PHLO Run",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "https://phlorunner.plivo.com/v1/phlo/{phlo_id}/runs/{run_id}",
          "protocol": "https",
          "host": [
            "phlorunner",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "phlo",
            "{phlo_id}",
            "runs",
            "{run_id}"
          ]
        }
      },
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
      ],
      "cookie": [
      ],
      "body": "{\n    \"api_id\": \"36989807-a76f-4555-84d1-9dfdccca7a80\",\n    \"phlo_id\": \"e564a84a-7910-4447-b16f-65c541dd552c\",\n    \"run_id\": \"b7df01fd-1cb0-404e-a0d1-21e69a610e84\",\n    \"call_uuids\": [\n        \"11e4f82c-069c-49f9-9fcb-54c6633e2cdb\"\n    ],\n    \"message_uuids\": [],\n    \"recording_ids\": []\n}"
    }
  ]
}