Placement Driver API

Default

pdApiV1BalancersGet

Get all PD balancers.


/pd/api/v1/balancers

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/balancers"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            Balancers result = apiInstance.pdApiV1BalancersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1BalancersGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            Balancers result = apiInstance.pdApiV1BalancersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1BalancersGet");
            e.printStackTrace();
        }
    }
}

                                                  



DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1BalancersGetWithCompletionHandler: 
              ^(Balancers output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1BalancersGet(callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1BalancersGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                Balancers result = apiInstance.pdApiV1BalancersGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1BalancersGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();

try {
    $result = $api_instance->pdApiV1BalancersGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1BalancersGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Responses

Status: 200 - A balancers object.

Status: 500 - unexpected error


pdApiV1ConfigGet

Get the PD config.


/pd/api/v1/config

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/config"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            Config result = apiInstance.pdApiV1ConfigGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1ConfigGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            Config result = apiInstance.pdApiV1ConfigGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1ConfigGet");
            e.printStackTrace();
        }
    }
}

                                                  



DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1ConfigGetWithCompletionHandler: 
              ^(Config output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1ConfigGet(callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1ConfigGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                Config result = apiInstance.pdApiV1ConfigGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1ConfigGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();

try {
    $result = $api_instance->pdApiV1ConfigGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1ConfigGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Responses

Status: 200 - A config object.

Status: 500 - Unexpected error


pdApiV1EventsGet

Get all PD events.


/pd/api/v1/events

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/events"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            array[LogEvent] result = apiInstance.pdApiV1EventsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1EventsGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            array[LogEvent] result = apiInstance.pdApiV1EventsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1EventsGet");
            e.printStackTrace();
        }
    }
}

                                                  



DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1EventsGetWithCompletionHandler: 
              ^(array[LogEvent] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1EventsGet(callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1EventsGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                array[LogEvent] result = apiInstance.pdApiV1EventsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1EventsGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();

try {
    $result = $api_instance->pdApiV1EventsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1EventsGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Responses

Status: 200 - An array of event objects.

Status: 500 - unexpected error


pdApiV1LeaderGet

Get the PD leader.


/pd/api/v1/leader

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/leader"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            Leader result = apiInstance.pdApiV1LeaderGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1LeaderGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            Leader result = apiInstance.pdApiV1LeaderGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1LeaderGet");
            e.printStackTrace();
        }
    }
}

                                                  



DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1LeaderGetWithCompletionHandler: 
              ^(Leader output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1LeaderGet(callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1LeaderGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                Leader result = apiInstance.pdApiV1LeaderGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1LeaderGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();

try {
    $result = $api_instance->pdApiV1LeaderGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1LeaderGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Responses

Status: 200 - A leader object.

Status: 500 - Unexpected error


pdApiV1MembersGet

Get all PD members.


/pd/api/v1/members

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/members"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            array[Member] result = apiInstance.pdApiV1MembersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1MembersGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            array[Member] result = apiInstance.pdApiV1MembersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1MembersGet");
            e.printStackTrace();
        }
    }
}

                                                  



DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1MembersGetWithCompletionHandler: 
              ^(array[Member] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1MembersGet(callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1MembersGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                array[Member] result = apiInstance.pdApiV1MembersGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1MembersGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();

try {
    $result = $api_instance->pdApiV1MembersGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1MembersGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Responses

Status: 200 - An array of member objects.

Status: 500 - Unexpected error


pdApiV1MembersNameDelete

Delete a PD member.


/pd/api/v1/members/{name}

Usage and SDK Samples


curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/members/{name}"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String name = name_example; // String | The name of the member to delete.
        try {
            apiInstance.pdApiV1MembersNameDelete(name);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1MembersNameDelete");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String name = name_example; // String | The name of the member to delete.
        try {
            apiInstance.pdApiV1MembersNameDelete(name);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1MembersNameDelete");
            e.printStackTrace();
        }
    }
}

                                                  


String *name = name_example; // The name of the member to delete.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1MembersNameDeleteWith:name
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var name = name_example; // {String} The name of the member to delete.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.pdApiV1MembersNameDelete(name, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1MembersNameDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var name = name_example;  // String | The name of the member to delete.

            try
            {
                apiInstance.pdApiV1MembersNameDelete(name);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1MembersNameDelete: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();
$name = name_example; // String | The name of the member to delete.

try {
    $api_instance->pdApiV1MembersNameDelete($name);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1MembersNameDelete: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
name*

Responses

Status: 200 - Member deleted

Status: 404 - Member not found

Status: 500 - Unexpected error


pdApiV1RegionIdGet

Get a TiKV region.


/pd/api/v1/region/{id}

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/region/{id}"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | The id of the region to get.
        try {
            Region result = apiInstance.pdApiV1RegionIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1RegionIdGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | The id of the region to get.
        try {
            Region result = apiInstance.pdApiV1RegionIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1RegionIdGet");
            e.printStackTrace();
        }
    }
}

                                                  


Integer *id = 56; // The id of the region to get.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1RegionIdGetWith:id
              completionHandler: ^(Region output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var id = 56; // {Integer} The id of the region to get.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1RegionIdGet(id, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1RegionIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var id = 56;  // Integer | The id of the region to get.

            try
            {
                Region result = apiInstance.pdApiV1RegionIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1RegionIdGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();
$id = 56; // Integer | The id of the region to get.

try {
    $result = $api_instance->pdApiV1RegionIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1RegionIdGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
id*

Responses

Status: 200 - A region object.

Status: 500 - unexpected error


pdApiV1RegionsGet

Get all TiKV regions.


/pd/api/v1/regions

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/regions"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            Regions result = apiInstance.pdApiV1RegionsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1RegionsGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            Regions result = apiInstance.pdApiV1RegionsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1RegionsGet");
            e.printStackTrace();
        }
    }
}

                                                  



DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1RegionsGetWithCompletionHandler: 
              ^(Regions output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1RegionsGet(callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1RegionsGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                Regions result = apiInstance.pdApiV1RegionsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1RegionsGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();

try {
    $result = $api_instance->pdApiV1RegionsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1RegionsGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Responses

Status: 200 - A regions object.

Status: 500 - unexpected error


pdApiV1StoreIdDelete

Delete a TiKV store.


/pd/api/v1/store/{id}

Usage and SDK Samples


curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/store/{id}"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | The id of the store to delete.
        try {
            apiInstance.pdApiV1StoreIdDelete(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1StoreIdDelete");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | The id of the store to delete.
        try {
            apiInstance.pdApiV1StoreIdDelete(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1StoreIdDelete");
            e.printStackTrace();
        }
    }
}

                                                  


Integer *id = 56; // The id of the store to delete.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1StoreIdDeleteWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var id = 56; // {Integer} The id of the store to delete.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.pdApiV1StoreIdDelete(id, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1StoreIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var id = 56;  // Integer | The id of the store to delete.

            try
            {
                apiInstance.pdApiV1StoreIdDelete(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1StoreIdDelete: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();
$id = 56; // Integer | The id of the store to delete.

try {
    $api_instance->pdApiV1StoreIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1StoreIdDelete: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
id*

Responses

Status: 200 - Store deleted

Status: 500 - unexpected error


pdApiV1StoreIdGet

Get a TiKV store.


/pd/api/v1/store/{id}

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/store/{id}"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | The id of the store to get.
        try {
            Store result = apiInstance.pdApiV1StoreIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1StoreIdGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | The id of the store to get.
        try {
            Store result = apiInstance.pdApiV1StoreIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1StoreIdGet");
            e.printStackTrace();
        }
    }
}

                                                  


Integer *id = 56; // The id of the store to get.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1StoreIdGetWith:id
              completionHandler: ^(Store output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var id = 56; // {Integer} The id of the store to get.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1StoreIdGet(id, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1StoreIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var id = 56;  // Integer | The id of the store to get.

            try
            {
                Store result = apiInstance.pdApiV1StoreIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1StoreIdGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();
$id = 56; // Integer | The id of the store to get.

try {
    $result = $api_instance->pdApiV1StoreIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1StoreIdGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
id*

Responses

Status: 200 - A store object.

Status: 500 - unexpected error


pdApiV1StoresGet

Get all TiKV stores.


/pd/api/v1/stores

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/stores"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            Stores result = apiInstance.pdApiV1StoresGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1StoresGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            Stores result = apiInstance.pdApiV1StoresGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1StoresGet");
            e.printStackTrace();
        }
    }
}

                                                  



DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1StoresGetWithCompletionHandler: 
              ^(Stores output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1StoresGet(callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1StoresGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                Stores result = apiInstance.pdApiV1StoresGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1StoresGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();

try {
    $result = $api_instance->pdApiV1StoresGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1StoresGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Responses

Status: 200 - A stores object.

Status: 500 - unexpected error


pdApiV1VersionGet

Get the PD version.


/pd/api/v1/version

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost/pd/api/v1/version"



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            Version result = apiInstance.pdApiV1VersionGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1VersionGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            Version result = apiInstance.pdApiV1VersionGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pdApiV1VersionGet");
            e.printStackTrace();
        }
    }
}

                                                  



DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pdApiV1VersionGetWithCompletionHandler: 
              ^(Version output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .DefaultApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pdApiV1VersionGet(callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class pdApiV1VersionGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                Version result = apiInstance.pdApiV1VersionGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pdApiV1VersionGet: " + e.Message );
            }
        }
    }
}

                                                    

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new io.swagger.client\Api\DefaultApi();

try {
    $result = $api_instance->pdApiV1VersionGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pdApiV1VersionGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Responses

Status: 200 - A version object.


Generated 2016-09-14T04:08:53.357Z