GET-Get Channel Details

Introduces the interface call method for the Get Channel Details interface.

Interface Introduction

The Get Channel Details interface is used to retrieve detailed information of a specific channel type.

Request method

GET
URL

Request URL

https://<ucwi_endpoint>:5443/skg/v1/dlp/channel/<channel_type>
Note: You can use the Get Channel interface to view all supported channel types.

Request Parameters

Parameter Name Parameter Location Required Description
<channel_type> URL Parameter Yes Specify a channel type, such as web, email, or webserviceapp. You can use the Get Channel interface to view all channel types.
Parameter Name Parameter Location Required Description
authorization header Yes Authentication information in the request. See the section for details Authentication.
x-skg-timestamp header Yes Current Timestamp. See the section for details Authentication.

Python Request Example

The following example shows how to call the interface using Python code to request detailed information of the WebService application channel (webserviceapp).

Note: In the following Python code example, the imported header files ucwi_config and ucwi_auth need to be created beforehand. For detailed reference examples, see Header File Examples.
from requests.packages.urllib3.exceptions import InsecureRequestWarning
                    from ucwi_config import UCWIConfig
                    from ucwi_auth import get_headers
                    import requests
                    import json
                    
                    requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
                    
                    # Available channel values include: "web", "email", and "webserviceapp".
                    channel = "webserviceapp"
                    api = "/skg/v1/dlp/channel/{}".format(channel)
                    url = "{0}{1}".format(UCWIConfig.base_url, api)
                    
                    headers = get_headers()
                    response = requests.get(url, headers=headers, verify=False)
                    if response.status_code != 200:
                    print("Bad request, response code:", response.status_code)
                    print(response.text)
                    else:
                    print(json.dumps(response.json(), indent=4).encode('utf-8').decode('raw_unicode_escape'))

Return Results

The return results include the following parameters:
Name Description
<channel_type> List displaying all WebService applications in the current channel.
<channel_type>.name Name of the WebService application in the current channel.
<channel_type>.appid ID of the WebService application in the current channel.
<channel_type>.description Description information of the WebService application in the current channel.

Return Example

{
                "webserviceapp": [
                {
                "name": "cloudstorage",
                "appid": "78217a43-542d-47e2-97a5-4435bf11521d", 
                "description": "Cloud storage application"
                }, 
                {
                "name": "cloudcrm",
                "appid": "1e99e55d-64c0-49ea-9e94-7df304e4580f", 
                "description": "Cloud CRM application"
                }
                ]
                }

Error code

If calling the API has an error, the following error codes are returned:
Error Code Description
400 Invalid parameter
404 Unknown Error
500 Invalid parameter