createApiKey
createApiKey
Creates a new api key in the active project.
/api/v1/api-keys
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://docstest-1.docstest.root.hwx.site:18121//api/v1/api-keys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.APIKeyOperationsApi;
import java.io.File;
import java.util.*;
public class APIKeyOperationsApiExample {
public static void main(String[] args) {
APIKeyOperationsApi apiInstance = new APIKeyOperationsApi();
ApiKeySyncDto body = ; // ApiKeySyncDto |
String authorization = authorization_example; // String |
String contentType = contentType_example; // String |
try {
ApiKeyDto result = apiInstance.createApiKey(body, authorization, contentType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling APIKeyOperationsApi#createApiKey");
e.printStackTrace();
}
}
}
import io.swagger.client.api.APIKeyOperationsApi;
public class APIKeyOperationsApiExample {
public static void main(String[] args) {
APIKeyOperationsApi apiInstance = new APIKeyOperationsApi();
ApiKeySyncDto body = ; // ApiKeySyncDto |
String authorization = authorization_example; // String |
String contentType = contentType_example; // String |
try {
ApiKeyDto result = apiInstance.createApiKey(body, authorization, contentType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling APIKeyOperationsApi#createApiKey");
e.printStackTrace();
}
}
}
ApiKeySyncDto *body = ; //
String *authorization = authorization_example; // (optional)
String *contentType = contentType_example; // (optional)
APIKeyOperationsApi *apiInstance = [[APIKeyOperationsApi alloc] init];
// createApiKey
[apiInstance createApiKeyWith:body
authorization:authorization
contentType:contentType
completionHandler: ^(ApiKeyDto output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');
var api = new StreamingSqlEngineApi.APIKeyOperationsApi()
var body = ; // {{ApiKeySyncDto}}
var opts = {
'authorization': authorization_example // {{String}}
'contentType': contentType_example // {{String}}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createApiKey(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createApiKeyExample
{
public void main()
{
var apiInstance = new APIKeyOperationsApi();
var body = new ApiKeySyncDto(); // ApiKeySyncDto |
var authorization = authorization_example; // String | (optional)
var contentType = contentType_example; // String | (optional)
try
{
// createApiKey
ApiKeyDto result = apiInstance.createApiKey(body, authorization, contentType);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling APIKeyOperationsApi.createApiKey: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAPIKeyOperationsApi();
$body = ; // ApiKeySyncDto |
$authorization = authorization_example; // String |
$contentType = contentType_example; // String |
try {
$result = $api_instance->createApiKey($body, $authorization, $contentType);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling APIKeyOperationsApi->createApiKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::APIKeyOperationsApi;
my $api_instance = WWW::SwaggerClient::APIKeyOperationsApi->new();
my $body = WWW::SwaggerClient::Object::ApiKeySyncDto->new(); # ApiKeySyncDto |
my $authorization = authorization_example; # String |
my $contentType = contentType_example; # String |
eval {
my $result = $api_instance->createApiKey(body => $body, authorization => $authorization, contentType => $contentType);
print Dumper($result);
};
if ($@) {
warn "Exception when calling APIKeyOperationsApi->createApiKey: $@\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.APIKeyOperationsApi()
body = # ApiKeySyncDto |
authorization = authorization_example # String | (optional)
contentType = contentType_example # String | (optional)
try:
# createApiKey
api_response = api_instance.create_api_key(body, authorization=authorization, contentType=contentType)
pprint(api_response)
except ApiException as e:
print("Exception when calling APIKeyOperationsApi->createApiKey: %s\n" % e)
Parameters
Name | Description |
---|---|
Authorization | |
Content-Type |
String
|
Name | Description |
---|---|
body * |