B2tExcel

Default

b2tXlPost

The request into the API contains the input Excel file, in the body of the request. The output a json object containing the url pointing to the output Excel file from the B2T Engine.


/b2t-xl

Usage and SDK Samples

curl -X POST "https://6ztwqrev0i.execute-api.us-east-1.amazonaws.com/alpha/b2t-xl"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String contentType = contentType_example; // String | text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API.
        String accept = accept_example; // String | Accept is passed on into the backend Engine. This is used for CORS.
        try {
            Empty result = apiInstance.b2tXlPost(contentType, accept);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#b2tXlPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String contentType = contentType_example; // String | text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API.
        String accept = accept_example; // String | Accept is passed on into the backend Engine. This is used for CORS.
        try {
            Empty result = apiInstance.b2tXlPost(contentType, accept);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#b2tXlPost");
            e.printStackTrace();
        }
    }
}
String *contentType = contentType_example; // text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API. (optional)
String *accept = accept_example; // Accept is passed on into the backend Engine. This is used for CORS. (optional)

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

[apiInstance b2tXlPostWith:contentType
    accept:accept
              completionHandler: ^(Empty output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var B2tExcel = require('b2t_excel');

var api = new B2tExcel.DefaultApi()

var opts = { 
  'contentType': contentType_example, // {String} text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API.
  'accept': accept_example // {String} Accept is passed on into the backend Engine. This is used for CORS.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.b2tXlPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class b2tXlPostExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var contentType = contentType_example;  // String | text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API. (optional) 
            var accept = accept_example;  // String | Accept is passed on into the backend Engine. This is used for CORS. (optional) 

            try
            {
                Empty result = apiInstance.b2tXlPost(contentType, accept);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.b2tXlPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DefaultApi();
$contentType = contentType_example; // String | text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API.
$accept = accept_example; // String | Accept is passed on into the backend Engine. This is used for CORS.

try {
    $result = $api_instance->b2tXlPost($contentType, $accept);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->b2tXlPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $contentType = contentType_example; # String | text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API.
my $accept = accept_example; # String | Accept is passed on into the backend Engine. This is used for CORS.

eval { 
    my $result = $api_instance->b2tXlPost(contentType => $contentType, accept => $accept);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->b2tXlPost: $@\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.DefaultApi()
contentType = contentType_example # String | text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API. (optional)
accept = accept_example # String | Accept is passed on into the backend Engine. This is used for CORS. (optional)

try: 
    api_response = api_instance.b2t_xl_post(contentType=contentType, accept=accept)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->b2tXlPost: %s\n" % e)

Parameters

Header parameters
Name Description
Content-Type
String
text/plain. The request body is actually an Excel file. This content type value is chosen, somewhat arbitrarily for its simplicity, to mark the request body as binary. The formal content type for the Excel file is too long, and deemed to be unnecessarily complex for this API.
Accept
String
Accept is passed on into the backend Engine. This is used for CORS.

Responses

Status: 200 - This indicates that the B2T Engine has processed the input file. If there is no error, the url to the output Excel file is passed back. If there are errors, an error message will be passed back in the response json object.

Name Type Format Description
Access-Control-Allow-Origin String This for CORS purposes, return */*.