createIndices
Creates indices for passed resource name and tenant id in request header.
/index/indices
Usage and SDK Samples
curl -X POST "https://folio-snapshot.dev.folio.org/search/index/indices"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String xOkapiTenant = xOkapiTenant_example; // String | X-Okapi-Tenant header value
IndexRequestBody indexRequestBody = examples/indexRequestBody.sample; // IndexRequestBody |
try {
folioCreateIndexResponse result = apiInstance.createIndices(xOkapiTenant, indexRequestBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#createIndices");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String xOkapiTenant = xOkapiTenant_example; // String | X-Okapi-Tenant header value
IndexRequestBody indexRequestBody = examples/indexRequestBody.sample; // IndexRequestBody |
try {
folioCreateIndexResponse result = apiInstance.createIndices(xOkapiTenant, indexRequestBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#createIndices");
e.printStackTrace();
}
}
}
String *xOkapiTenant = xOkapiTenant_example; // X-Okapi-Tenant header value (default to null)
IndexRequestBody *indexRequestBody = examples/indexRequestBody.sample; // (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
[apiInstance createIndicesWith:xOkapiTenant
indexRequestBody:indexRequestBody
completionHandler: ^(folioCreateIndexResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SearchApi = require('search_api');
var api = new SearchApi.DefaultApi()
var xOkapiTenant = xOkapiTenant_example; // {String} X-Okapi-Tenant header value
var opts = {
'indexRequestBody': examples/indexRequestBody.sample // {IndexRequestBody}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createIndices(xOkapiTenant, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class createIndicesExample
{
public void main()
{
var apiInstance = new DefaultApi();
var xOkapiTenant = xOkapiTenant_example; // String | X-Okapi-Tenant header value (default to null)
var indexRequestBody = new IndexRequestBody(); // IndexRequestBody | (optional)
try
{
folioCreateIndexResponse result = apiInstance.createIndices(xOkapiTenant, indexRequestBody);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.createIndices: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$xOkapiTenant = xOkapiTenant_example; // String | X-Okapi-Tenant header value
$indexRequestBody = examples/indexRequestBody.sample; // IndexRequestBody |
try {
$result = $api_instance->createIndices($xOkapiTenant, $indexRequestBody);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->createIndices: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $xOkapiTenant = xOkapiTenant_example; # String | X-Okapi-Tenant header value
my $indexRequestBody = WWW::OPenAPIClient::Object::IndexRequestBody->new(); # IndexRequestBody |
eval {
my $result = $api_instance->createIndices(xOkapiTenant => $xOkapiTenant, indexRequestBody => $indexRequestBody);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->createIndices: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = openapi_client.DefaultApi()
xOkapiTenant = xOkapiTenant_example # String | X-Okapi-Tenant header value (default to null)
indexRequestBody = examples/indexRequestBody.sample # IndexRequestBody | (optional)
try:
api_response = api_instance.create_indices(xOkapiTenant, indexRequestBody=indexRequestBody)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->createIndices: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let xOkapiTenant = xOkapiTenant_example; // String
let indexRequestBody = examples/indexRequestBody.sample; // IndexRequestBody
let mut context = DefaultApi::Context::default();
let result = client.createIndices(xOkapiTenant, indexRequestBody, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Header parameters
Name | Description |
---|---|
x-okapi-tenant* |
String
X-Okapi-Tenant header value
Required
|
Body parameters
Name | Description |
---|---|
indexRequestBody |