activateResources
Activate a set of resources
/sites/{sid}/activate
Usage and SDK Samples
curl -X POST "https://portal.mergetb.net/sites/{sid}/activate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String authorization = authorization_example; // String | API access authorization in JWT access token format
String sid = sid_example; // String | site id to update
array[String] resources = ; // array[String] | resources to activate
try {
apiInstance.activateResources(authorization, sid, resources);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#activateResources");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String authorization = authorization_example; // String | API access authorization in JWT access token format
String sid = sid_example; // String | site id to update
array[String] resources = ; // array[String] | resources to activate
try {
apiInstance.activateResources(authorization, sid, resources);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#activateResources");
e.printStackTrace();
}
}
}
String *authorization = authorization_example; // API access authorization in JWT access token format
String *sid = sid_example; // site id to update
array[String] *resources = ; // resources to activate (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Activate a set of resources
[apiInstance activateResourcesWith:authorization
sid:sid
resources:resources
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Mergetb = require('mergetb');
var api = new Mergetb.DefaultApi()
var authorization = authorization_example; // {String} API access authorization in JWT access token format
var sid = sid_example; // {String} site id to update
var opts = {
'resources': // {array[String]} resources to activate
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.activateResources(authorization, sid, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class activateResourcesExample
{
public void main()
{
var apiInstance = new DefaultApi();
var authorization = authorization_example; // String | API access authorization in JWT access token format
var sid = sid_example; // String | site id to update
var resources = new array[String](); // array[String] | resources to activate (optional)
try
{
// Activate a set of resources
apiInstance.activateResources(authorization, sid, resources);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.activateResources: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$authorization = authorization_example; // String | API access authorization in JWT access token format
$sid = sid_example; // String | site id to update
$resources = ; // array[String] | resources to activate
try {
$api_instance->activateResources($authorization, $sid, $resources);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->activateResources: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $authorization = authorization_example; # String | API access authorization in JWT access token format
my $sid = sid_example; # String | site id to update
my $resources = [WWW::SwaggerClient::Object::array[String]->new()]; # array[String] | resources to activate
eval {
$api_instance->activateResources(authorization => $authorization, sid => $sid, resources => $resources);
};
if ($@) {
warn "Exception when calling DefaultApi->activateResources: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
authorization = authorization_example # String | API access authorization in JWT access token format
sid = sid_example # String | site id to update
resources = # array[String] | resources to activate (optional)
try:
# Activate a set of resources
api_instance.activate_resources(authorization, sid, resources=resources)
except ApiException as e:
print("Exception when calling DefaultApi->activateResources: %s\n" % e)
Parameters
Name | Description |
---|---|
sid* |
String
site id to update
Required
|
Name | Description |
---|---|
authorization* |
Name | Description |
---|---|
resources |