×

Error message

  • Warning: array_merge(): Argument #2 is not an array in superfish_block_view() (line 924 of /var/www/rhizome/data/www/developers.contentglass.com/drupal/sites/all/modules/superfish/superfish.module).
  • Warning: array_merge(): Argument #1 is not an array in superfish_block_view() (line 1035 of /var/www/rhizome/data/www/developers.contentglass.com/drupal/sites/all/modules/superfish/superfish.module).

Delete Server Widget

This operation let you send HTTP request for deleting a widget previously created with Server Widgets API.

Request Parameters: 
  • app_id  - the application Id. Unless you set dedicated application use this value: "server_widgets"  
  • api_key - The API key assigned to service provider.  For trial version use this value:  "demo_developer-prod"
     

Path parameter:

  • widget_id - the Id of the widget to delete
Sample Code: 
<?php

$widgetId = [widget id];
$params = array(
    "app_id" => "[APP ID]",
    "api_key" => "[API KEY]",
);

$serviceUrl = "http://api.contentglass.com/server_api/s1/server_widget/{$widgetId}";

$error = "";
$response = NetUtils::curlDELETE($serviceUrl, $params, $error);


echo "<h1?>>Test Widget Create</h1?>";
echo "<pre?>";
echo $response;
echo "</pre?>";

if (!empty($error)) {
    echo $error;
}
?>
Sample Response: 
{"status":1,"id":"5676869016797"}