Apply specific configuration version of Cloud Proxy Manager

This article explains on how to apply a specific configuration version of Cloud Proxy Manager with an API command.
API endpoint: PUT /lpm/apply_conf/
Query parameters:
lpm_token - {TOKEN|CUSTOMER_NAME}, required
Body parameters:
id - conf state id from GET /lpm/apply_conf
Sample Response:
Code: 200
Message: ok
curl -PUT "<PROXY_MANAGER_TOKEN>" -H "Content-Type: application/json" -d '{"id": "6453ae71866cf2e93fd154fa"}'


#!/usr/bin/env node
	method: 'PUT',
	json: {"id": "6453ae71866cf2e93fd154fa"},
	headers: {'Content-Type': 'application/json'},
}).then(function(data){ console.log(data); },
	function(err){ console.error(err); });


package example;

import org.apache.http.HttpHost;
import org.apache.http.client.fluent.*;

public class Example {
  public static void main(String[] args) throws Exception {
String body = "{\"id\":\"6453ae71866cf2e93fd154fa\"}"; String res = Executor.newInstance()

.bodyString(body, ContentType.APPLICATION_JSON))

System.out.println(res) }



using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;

public class Program {
  public static async Task Main() {
    var client = new HttpClient();
    var requestMessage = new HttpRequestMessage {
      Method = HttpMethod.Put,
RequestUri = new Uri("<PROXY_MANAGER_TOKEN>"),
Content = new StringContent(JsonConvert.SerializeObject(new {
id = "6453ae71866cf2e93fd154fa"
}), Encoding.UTF8, "application/json")) }; var response = await client.SendAsync(requestMessage); var responseString = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseString); } }


#!/usr/bin/env python
print('If you get error "ImportError: No module named requests", please install it:\n$ sudo pip install requests');
import requests
import json
data = {'id':'6453ae71866cf2e93fd154fa'} headers = {'Content-Type': 'application/json'} r = requests.put('<PROXY_MANAGER_TOKEN>', data=data, headers=headers) print(r.content)

Was this article helpful?