Get Profiles Assigned to Device Group

Release Time
06/07/2018
Views
744 times
Category
ITSM
Tags

This resource provides profiles assigned to device group. 

Scheme

https

Host

Valid ITSM host (example: subdomain-msp.cmdm.comodo.com )

Path 

/api/rest/v1/device-group/assigned-profiles-list

Query Params

Param Name Description Limitation
page interested page  
page-size how many results in answer max is 200
id Group id required

 

Request Headers

Key Value Description
Http method GET Http method
Content-Type application/json  
x-auth-type 4 Authentication type identifier
x-auth-token access token 3rd Party Authentication token

 

See the below links for more detail:

Examples:

curl

curl -X GET -H "Content-Type: application/json" -H "x-auth-type: 4"  -H "x-auth-token: e087f80be7add78cea126174f474ad33" -H "Cache-Control: no-cache" "https://subdomain-msp.env.comodo.com/api/rest/v1/device-group/assigned-profiles-list?id=1&page=1&page-size=200"

PHP/cUrl

<?php

 

$curl = curl_init();

 

curl_setopt_array($curl, array(

  CURLOPT_PORT => "82",

  CURLOPT_URL => "https://subdomain-msp.env.comodo.com/api/rest/v1/device-group/assigned-profiles-list?id=1&page=1&page-size=200",

  CURLOPT_RETURNTRANSFER => true,

  CURLOPT_ENCODING => "",

  CURLOPT_MAXREDIRS => 10,

  CURLOPT_TIMEOUT => 30,

  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

  CURLOPT_CUSTOMREQUEST => "GET",

  CURLOPT_HTTPHEADER => array(

    "cache-control: no-cache",

    "content-type: application/json",

    "x-auth-token: e087f80be7add78cea126174f474ad33",

    "x-auth-type: 4",

     

  ),

));

 

$response = curl_exec($curl);

$err = curl_error($curl);

 

curl_close($curl);

 

if ($err) {

  echo "cURL Error #:" . $err;

} else {

  echo $response;

}

Python

import http.client

 

conn = http.client.HTTPSConnection("subdomain-msp.env.comodo.com")

 

headers = {

    'content-type': "application/json",

    'x-auth-type': "4",

    'x-auth-token': "e087f80be7add78cea126174f474ad33",

    'cache-control': "no-cache",

     

    }

 

conn.request("GET", "/api/rest/v1/device-group/assigned-profiles-list?id=1&page=1&page-size=200", headers=headers)

 

res = conn.getresponse()

data = res.read()

 

print(data.decode("utf-8"))

Execution

Sample execution can be handled via Postman Application. 

Header part can be handled via Postman Application

Success Output

Error Output