createBatch
Create a single batch.
/batch/{id}
Usage and SDK Samples
curl -X POST \
-H "X-API-KEY: [[apiKey]]" \
-H "Authorization: Bearer [[accessToken]]" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"https://tipcertificates.keys.tip.build:16061/api/v1/batch/{id}" \
-d '{
"redirector" : "openwifi.example.com",
"creator" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"notes" : [ {
"note" : "note",
"createdBy" : "createdBy",
"created" : 0
}, {
"note" : "note",
"createdBy" : "createdBy",
"created" : 0
} ],
"description" : "description",
"started" : 1,
"completed" : 5,
"manufacturer" : "manufacturer",
"commonNames" : [ "commonNames", "commonNames" ],
"submitted" : 6,
"jobHistory" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
"name" : "name",
"modified" : 5,
"model" : "model",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"entity" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.BatchesApi;
import java.io.File;
import java.util.*;
public class BatchesApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure Bearer (JWT) access token for authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
// Create an instance of the API class
BatchesApi apiInstance = new BatchesApi();
UUID id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID |
BatchEntry batchEntry = ; // BatchEntry |
try {
apiInstance.createBatch(id, batchEntry);
} catch (ApiException e) {
System.err.println("Exception when calling BatchesApi#createBatch");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.BatchesApi;
public class BatchesApiExample {
public static void main(String[] args) {
BatchesApi apiInstance = new BatchesApi();
UUID id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID |
BatchEntry batchEntry = ; // BatchEntry |
try {
apiInstance.createBatch(id, batchEntry);
} catch (ApiException e) {
System.err.println("Exception when calling BatchesApi#createBatch");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[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"];
// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Create an instance of the API class
BatchesApi *apiInstance = [[BatchesApi alloc] init];
UUID *id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // (default to null)
BatchEntry *batchEntry = ; // (optional)
// Create a single batch.
[apiInstance createBatchWith:id
batchEntry:batchEntry
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CertificateManagementPortal = require('certificate_management_portal');
var defaultClient = CertificateManagementPortal.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-KEY'] = "Token";
// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";
// Create an instance of the API class
var api = new CertificateManagementPortal.BatchesApi()
var id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID}
var opts = {
'batchEntry': // {BatchEntry}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.createBatch(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class createBatchExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
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");
// Configure Bearer (JWT) access token for authorization: bearerAuth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Create an instance of the API class
var apiInstance = new BatchesApi();
var id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | (default to null)
var batchEntry = new BatchEntry(); // BatchEntry | (optional)
try {
// Create a single batch.
apiInstance.createBatch(id, batchEntry);
} catch (Exception e) {
Debug.Print("Exception when calling BatchesApi.createBatch: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\BatchesApi();
$id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID |
$batchEntry = ; // BatchEntry |
try {
$api_instance->createBatch($id, $batchEntry);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->createBatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::BatchesApi;
# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-KEY'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-KEY'} = "Bearer";
# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::BatchesApi->new();
my $id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID |
my $batchEntry = WWW::OPenAPIClient::Object::BatchEntry->new(); # BatchEntry |
eval {
$api_instance->createBatch(id => $id, batchEntry => $batchEntry);
};
if ($@) {
warn "Exception when calling BatchesApi->createBatch: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Create an instance of the API class
api_instance = openapi_client.BatchesApi()
id = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | (default to null)
batchEntry = # BatchEntry | (optional)
try:
# Create a single batch.
api_instance.create_batch(id, batchEntry=batchEntry)
except ApiException as e:
print("Exception when calling BatchesApi->createBatch: %s\n" % e)
extern crate BatchesApi;
pub fn main() {
let id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
let batchEntry = ; // BatchEntry
let mut context = BatchesApi::Context::default();
let result = client.createBatch(id, batchEntry, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| id* |
UUID
(uuid)
Required
|
| Name | Description |
|---|---|
| batchEntry |
Batch details (some fields are ignored during creation) |