Chilkat Online Tools

PureBasic / Plivo REST API / Retrieve a Multi-Party Call

Back to Collection Items

IncludeFile "CkJsonObject.pb"
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"

Procedure ChilkatExample()

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

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    CkHttp::setCkBasicAuth(http, 1)
    CkHttp::setCkLogin(http, "{{auth_id}}")
    CkHttp::setCkPassword(http, "password")

    queryParams.i = CkJsonObject::ckCreate()
    If queryParams.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(queryParams,"phlo_id","<PHLO_ID>")
    CkJsonObject::ckUpdateString(queryParams,"node_id","<NODE_ID>")

    resp.i = CkHttp::ckQuickRequestParams(http,"GET","https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}",queryParams)
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(queryParams)
        ProcedureReturn
    EndIf

    Debug Str(CkHttpResponse::ckStatusCode(resp))
    Debug CkHttpResponse::ckBodyStr(resp)
    CkHttpResponse::ckDispose(resp)



    CkHttp::ckDispose(http)
    CkJsonObject::ckDispose(queryParams)


    ProcedureReturn
EndProcedure

Curl Command

curl -G -d "phlo_id=%3CPHLO_ID%3E"
	-d "node_id=%3CNODE_ID%3E"
	-u '{{auth_id}}:password'
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}

Postman Collection Item JSON

{
  "name": "Retrieve a Multi-Party Call",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}?phlo_id=<PHLO_ID>&node_id=<NODE_ID>",
      "protocol": "https",
      "host": [
        "phlorunner",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "phlo",
        "{phlo_id}",
        "multi_party_call",
        "{node_id}"
      ],
      "query": [
        {
          "key": "phlo_id",
          "value": "<PHLO_ID>",
          "description": "Unique identifier for the PHLO."
        },
        {
          "key": "node_id",
          "value": "<NODE_ID>",
          "description": "Unique identifier for the node. Node ID is available in the configuration section of the corresponding Multi-Party Call node in the PHLO"
        }
      ]
    },
    "description": "More information can be found [here](https://www.plivo.com/docs/phlo/api/phlo/multi-party-call#the-multipartycall-object)"
  },
  "response": [
    {
      "name": "Retrieve a Multi-Party Call",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}?phlo_id=<PHLO_ID>&node_id=<NODE_ID>",
          "protocol": "https",
          "host": [
            "phlorunner",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "phlo",
            "{phlo_id}",
            "multi_party_call",
            "{node_id}"
          ],
          "query": [
            {
              "key": "phlo_id",
              "value": "<PHLO_ID>",
              "description": "Unique identifier for the PHLO."
            },
            {
              "key": "node_id",
              "value": "<NODE_ID>",
              "description": "Unique identifier for the node. Node ID is available in the configuration section of the corresponding Multi-Party Call node in the PHLO"
            }
          ]
        }
      },
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
      ],
      "cookie": [
      ],
      "body": "{\n    \"api_id\": \"2163e3fb-d6d0-46fb-a4ce-2d24a6b0b89f\",\n    \"node_id\": \"b4b48fc2-f47a-4a93-97c3-749ed9a40fa8\",\n    \"phlo_id\": \"73d6ab01-a2f6-4a84-850f-21e1d46b30bf\",\n    \"name\": \"Multi-Party Call_1\",\n    \"node_type\": \"multi_party_call\",\n    \"created_on\": \"2018-08-01 09:05:11.846982+00:00\"\n}"
    }
  ]
}