## API and SDK Documentation

Version: 1.0

The following sequence diagram depicts Certificate Management:

Sequence | Title | Role | Description
| once |  | This interaction happens only one time.
1. | GET /certificate | TBM/HU | The TBM/HU Requests certificate be issued for the given device id. A CSR must already have been POSTed for a certificate to be issued.
2. | signed x509 certificate | Web Service | The FCA IT Web Service respond with X509 certificate in PEM format.

# Certificate Management

# certificateGet

Request that a certificate be issued for the given device id. A CSR must already have been POSTed for a certificate to be issued.

    /certificate

### Usage and SDK Samples

      curl -X get -H "x-api-key: [[apiKey]]"  "https://hostname/dev/certificate?deviceID="

      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) {
            ApiClient defaultClient = Configuration.getDefaultApiClient();

            // Configure API key authorization: api_key
            ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
            api_key.setApiKey("YOUR API KEY");
            // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
            //api_key.setApiKeyPrefix("Token");

            DefaultApi apiInstance = new DefaultApi();
            String deviceID = deviceID_example; // String | unique device id
            try {
                certificate result = apiInstance.certificateGet(deviceID);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DefaultApi#certificateGet");
                e.printStackTrace();
            }
        }
    }

      import .DefaultApi;

    public class DefaultApiExample {

        public static void main(String[] args) {
            DefaultApi apiInstance = new DefaultApi();
            String deviceID = deviceID_example; // String | unique device id
            try {
                certificate result = apiInstance.certificateGet(deviceID);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DefaultApi#certificateGet");
                e.printStackTrace();
            }
        }
    }

      Configuration *apiConfig = [Configuration sharedConfig];

    // Configure API key authorization: (authentication scheme: api_key)
    [apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
    // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    //[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];

    String *deviceID = deviceID_example; // unique device id (optional)

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

    [apiInstance certificateGetWith:deviceID
                  completionHandler: ^(certificate output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

      var  = require('');
    var defaultClient = .ApiClient.instance;

    // Configure API key authorization: api_key
    var api_key = defaultClient.authentications['api_key'];
    api_key.apiKey = "YOUR API KEY"
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //api_key.apiKeyPrefix['x-api-key'] = "Token"

    var api = new .DefaultApi()

    var opts = {
      'deviceID': deviceID_example // {String} unique device id
    };

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

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

    namespace Example
    {
        public class certificateGetExample
        {
            public void main()
            {

                // Configure API key authorization: api_key
                Configuration.Default.ApiKey.Add("x-api-key", "YOUR_API_KEY");
                // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
                // Configuration.Default.ApiKeyPrefix.Add("x-api-key", "Bearer");

                var apiInstance = new DefaultApi();
                var deviceID = deviceID_example;  // String | unique device id (optional)

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

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

    // Configure API key authorization: api_key
    io.swagger.client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
    // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    // io.swagger.client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

    $api_instance = new io.swagger.client\Api\DefaultApi();
    $deviceID = deviceID_example; // String | unique device id

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

## Parameters

Query parameters

Name | Description
--- | ---
deviceID |

## Responses

### Status: 200 - 200 response

### Status: 403 - 403 response

Generated 2017-03-08T16:39:25.715-05:00