Easybeam Backend API

Portal

processPortal

Get a chat completion from a portal

This endpoint processes a chat interaction within a specified portal. It can handle both streaming and non-streaming requests based on the input parameters. For demo purposes, use the portal ID "LZS15".


/portal/{id}

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://api.easybeam.ai/v1/portal/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PortalApi;

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

public class PortalApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        PortalApi apiInstance = new PortalApi();
        GetPortalRequest body = {
  "summary" : "Demo request",
  "value" : {
    "variables" : {
      "animal" : "aardvark"
    },
    "chatId" : null,
    "messages" : [ ],
    "stream" : false,
    "userId" : "demo-user-123",
    "consolidateStream" : false
  }
}; // GetPortalRequest | Payload containing the chat details and parameters for processing
        String id = id_example; // String | Unique identifier for the portal. Use "LZS15" for demo testing.
        try {
            GetPortalResponse result = apiInstance.processPortal(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PortalApi#processPortal");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PortalApi;

public class PortalApiExample {

    public static void main(String[] args) {
        PortalApi apiInstance = new PortalApi();
        GetPortalRequest body = {
  "summary" : "Demo request",
  "value" : {
    "variables" : {
      "animal" : "aardvark"
    },
    "chatId" : null,
    "messages" : [ ],
    "stream" : false,
    "userId" : "demo-user-123",
    "consolidateStream" : false
  }
}; // GetPortalRequest | Payload containing the chat details and parameters for processing
        String id = id_example; // String | Unique identifier for the portal. Use "LZS15" for demo testing.
        try {
            GetPortalResponse result = apiInstance.processPortal(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PortalApi#processPortal");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
GetPortalRequest *body = {
  "summary" : "Demo request",
  "value" : {
    "variables" : {
      "animal" : "aardvark"
    },
    "chatId" : null,
    "messages" : [ ],
    "stream" : false,
    "userId" : "demo-user-123",
    "consolidateStream" : false
  }
}; // Payload containing the chat details and parameters for processing
String *id = id_example; // Unique identifier for the portal. Use "LZS15" for demo testing.

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

// Get a chat completion from a portal
[apiInstance processPortalWith:body
    id:id
              completionHandler: ^(GetPortalResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EasybeamBackendApi = require('easybeam_backend_api');
var defaultClient = EasybeamBackendApi.ApiClient.instance;


var api = new EasybeamBackendApi.PortalApi()
var body = {
  "summary" : "Demo request",
  "value" : {
    "variables" : {
      "animal" : "aardvark"
    },
    "chatId" : null,
    "messages" : [ ],
    "stream" : false,
    "userId" : "demo-user-123",
    "consolidateStream" : false
  }
}; // {{GetPortalRequest}} Payload containing the chat details and parameters for processing
var id = id_example; // {{String}} Unique identifier for the portal. Use "LZS15" for demo testing.

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

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


            var apiInstance = new PortalApi();
            var body = new GetPortalRequest(); // GetPortalRequest | Payload containing the chat details and parameters for processing
            var id = id_example;  // String | Unique identifier for the portal. Use "LZS15" for demo testing.

            try
            {
                // Get a chat completion from a portal
                GetPortalResponse result = apiInstance.processPortal(body, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PortalApi.processPortal: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiPortalApi();
$body = {
  "summary" : "Demo request",
  "value" : {
    "variables" : {
      "animal" : "aardvark"
    },
    "chatId" : null,
    "messages" : [ ],
    "stream" : false,
    "userId" : "demo-user-123",
    "consolidateStream" : false
  }
}; // GetPortalRequest | Payload containing the chat details and parameters for processing
$id = id_example; // String | Unique identifier for the portal. Use "LZS15" for demo testing.

try {
    $result = $api_instance->processPortal($body, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PortalApi->processPortal: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PortalApi;


my $api_instance = WWW::SwaggerClient::PortalApi->new();
my $body = WWW::SwaggerClient::Object::GetPortalRequest->new(); # GetPortalRequest | Payload containing the chat details and parameters for processing
my $id = id_example; # String | Unique identifier for the portal. Use "LZS15" for demo testing.

eval { 
    my $result = $api_instance->processPortal(body => $body, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PortalApi->processPortal: $@\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.PortalApi()
body = {
  "summary" : "Demo request",
  "value" : {
    "variables" : {
      "animal" : "aardvark"
    },
    "chatId" : null,
    "messages" : [ ],
    "stream" : false,
    "userId" : "demo-user-123",
    "consolidateStream" : false
  }
} # GetPortalRequest | Payload containing the chat details and parameters for processing
id = id_example # String | Unique identifier for the portal. Use "LZS15" for demo testing.

try: 
    # Get a chat completion from a portal
    api_response = api_instance.process_portal(body, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PortalApi->processPortal: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
Unique identifier for the portal. Use "LZS15" for demo testing.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Portal interaction successful

Status: 400 -

Status: 401 -


Review

submitReview

Submit a review

This endpoint allows users to submit reviews based on their chat interactions. It records the review score and optional textual feedback.


/review

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://api.easybeam.ai/v1/review"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReviewApi;

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

public class ReviewApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        ReviewApi apiInstance = new ReviewApi();
        ReviewRequest body = {
  "summary" : "Sample review submission",
  "value" : {
    "chatId" : "chat-67890",
    "reviewScore" : 4.5,
    "reviewText" : "Great assistance, very helpful!",
    "userId" : "user-54321"
  }
}; // ReviewRequest | Review details submitted by the user
        try {
            SuccessResponse result = apiInstance.submitReview(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReviewApi#submitReview");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReviewApi;

public class ReviewApiExample {

    public static void main(String[] args) {
        ReviewApi apiInstance = new ReviewApi();
        ReviewRequest body = {
  "summary" : "Sample review submission",
  "value" : {
    "chatId" : "chat-67890",
    "reviewScore" : 4.5,
    "reviewText" : "Great assistance, very helpful!",
    "userId" : "user-54321"
  }
}; // ReviewRequest | Review details submitted by the user
        try {
            SuccessResponse result = apiInstance.submitReview(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReviewApi#submitReview");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
ReviewRequest *body = {
  "summary" : "Sample review submission",
  "value" : {
    "chatId" : "chat-67890",
    "reviewScore" : 4.5,
    "reviewText" : "Great assistance, very helpful!",
    "userId" : "user-54321"
  }
}; // Review details submitted by the user

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

// Submit a review
[apiInstance submitReviewWith:body
              completionHandler: ^(SuccessResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EasybeamBackendApi = require('easybeam_backend_api');
var defaultClient = EasybeamBackendApi.ApiClient.instance;


var api = new EasybeamBackendApi.ReviewApi()
var body = {
  "summary" : "Sample review submission",
  "value" : {
    "chatId" : "chat-67890",
    "reviewScore" : 4.5,
    "reviewText" : "Great assistance, very helpful!",
    "userId" : "user-54321"
  }
}; // {{ReviewRequest}} Review details submitted by the user

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

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


            var apiInstance = new ReviewApi();
            var body = new ReviewRequest(); // ReviewRequest | Review details submitted by the user

            try
            {
                // Submit a review
                SuccessResponse result = apiInstance.submitReview(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReviewApi.submitReview: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiReviewApi();
$body = {
  "summary" : "Sample review submission",
  "value" : {
    "chatId" : "chat-67890",
    "reviewScore" : 4.5,
    "reviewText" : "Great assistance, very helpful!",
    "userId" : "user-54321"
  }
}; // ReviewRequest | Review details submitted by the user

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


my $api_instance = WWW::SwaggerClient::ReviewApi->new();
my $body = WWW::SwaggerClient::Object::ReviewRequest->new(); # ReviewRequest | Review details submitted by the user

eval { 
    my $result = $api_instance->submitReview(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReviewApi->submitReview: $@\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.ReviewApi()
body = {
  "summary" : "Sample review submission",
  "value" : {
    "chatId" : "chat-67890",
    "reviewScore" : 4.5,
    "reviewText" : "Great assistance, very helpful!",
    "userId" : "user-54321"
  }
} # ReviewRequest | Review details submitted by the user

try: 
    # Submit a review
    api_response = api_instance.submit_review(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReviewApi->submitReview: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Review submitted successfully

Status: 400 -


Workflow

processWorkflow

Get a chat completion from a workflow

This endpoint processes a chat interaction within a specified workflow. It supports both streaming and non-streaming operations based on the provided parameters.


/workflow/{id}

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://api.easybeam.ai/v1/workflow/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowApi;

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

public class WorkflowApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        WorkflowApi apiInstance = new WorkflowApi();
        GetWorkflowRequest body = {
  "summary" : "Sample request",
  "value" : {
    "variables" : {
      "keyA" : "valueA",
      "keyB" : "valueB"
    },
    "chatId" : "chat-12345",
    "messages" : [ {
      "content" : "Can you help me with this workflow?",
      "role" : "USER",
      "createdAt" : "2024-04-27T13:00:00Z",
      "id" : "msg-3"
    } ],
    "stream" : false,
    "userId" : "user-67890",
    "consolidateStream" : true
  }
}; // GetWorkflowRequest | Payload containing the chat details and parameters for processing the workflow
        String id = id_example; // String | Unique identifier for the workflow
        try {
            GetWorkflowResponse result = apiInstance.processWorkflow(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowApi#processWorkflow");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowApi;

public class WorkflowApiExample {

    public static void main(String[] args) {
        WorkflowApi apiInstance = new WorkflowApi();
        GetWorkflowRequest body = {
  "summary" : "Sample request",
  "value" : {
    "variables" : {
      "keyA" : "valueA",
      "keyB" : "valueB"
    },
    "chatId" : "chat-12345",
    "messages" : [ {
      "content" : "Can you help me with this workflow?",
      "role" : "USER",
      "createdAt" : "2024-04-27T13:00:00Z",
      "id" : "msg-3"
    } ],
    "stream" : false,
    "userId" : "user-67890",
    "consolidateStream" : true
  }
}; // GetWorkflowRequest | Payload containing the chat details and parameters for processing the workflow
        String id = id_example; // String | Unique identifier for the workflow
        try {
            GetWorkflowResponse result = apiInstance.processWorkflow(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowApi#processWorkflow");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
GetWorkflowRequest *body = {
  "summary" : "Sample request",
  "value" : {
    "variables" : {
      "keyA" : "valueA",
      "keyB" : "valueB"
    },
    "chatId" : "chat-12345",
    "messages" : [ {
      "content" : "Can you help me with this workflow?",
      "role" : "USER",
      "createdAt" : "2024-04-27T13:00:00Z",
      "id" : "msg-3"
    } ],
    "stream" : false,
    "userId" : "user-67890",
    "consolidateStream" : true
  }
}; // Payload containing the chat details and parameters for processing the workflow
String *id = id_example; // Unique identifier for the workflow

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

// Get a chat completion from a workflow
[apiInstance processWorkflowWith:body
    id:id
              completionHandler: ^(GetWorkflowResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EasybeamBackendApi = require('easybeam_backend_api');
var defaultClient = EasybeamBackendApi.ApiClient.instance;


var api = new EasybeamBackendApi.WorkflowApi()
var body = {
  "summary" : "Sample request",
  "value" : {
    "variables" : {
      "keyA" : "valueA",
      "keyB" : "valueB"
    },
    "chatId" : "chat-12345",
    "messages" : [ {
      "content" : "Can you help me with this workflow?",
      "role" : "USER",
      "createdAt" : "2024-04-27T13:00:00Z",
      "id" : "msg-3"
    } ],
    "stream" : false,
    "userId" : "user-67890",
    "consolidateStream" : true
  }
}; // {{GetWorkflowRequest}} Payload containing the chat details and parameters for processing the workflow
var id = id_example; // {{String}} Unique identifier for the workflow

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

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


            var apiInstance = new WorkflowApi();
            var body = new GetWorkflowRequest(); // GetWorkflowRequest | Payload containing the chat details and parameters for processing the workflow
            var id = id_example;  // String | Unique identifier for the workflow

            try
            {
                // Get a chat completion from a workflow
                GetWorkflowResponse result = apiInstance.processWorkflow(body, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowApi.processWorkflow: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiWorkflowApi();
$body = {
  "summary" : "Sample request",
  "value" : {
    "variables" : {
      "keyA" : "valueA",
      "keyB" : "valueB"
    },
    "chatId" : "chat-12345",
    "messages" : [ {
      "content" : "Can you help me with this workflow?",
      "role" : "USER",
      "createdAt" : "2024-04-27T13:00:00Z",
      "id" : "msg-3"
    } ],
    "stream" : false,
    "userId" : "user-67890",
    "consolidateStream" : true
  }
}; // GetWorkflowRequest | Payload containing the chat details and parameters for processing the workflow
$id = id_example; // String | Unique identifier for the workflow

try {
    $result = $api_instance->processWorkflow($body, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->processWorkflow: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowApi;


my $api_instance = WWW::SwaggerClient::WorkflowApi->new();
my $body = WWW::SwaggerClient::Object::GetWorkflowRequest->new(); # GetWorkflowRequest | Payload containing the chat details and parameters for processing the workflow
my $id = id_example; # String | Unique identifier for the workflow

eval { 
    my $result = $api_instance->processWorkflow(body => $body, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowApi->processWorkflow: $@\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.WorkflowApi()
body = {
  "summary" : "Sample request",
  "value" : {
    "variables" : {
      "keyA" : "valueA",
      "keyB" : "valueB"
    },
    "chatId" : "chat-12345",
    "messages" : [ {
      "content" : "Can you help me with this workflow?",
      "role" : "USER",
      "createdAt" : "2024-04-27T13:00:00Z",
      "id" : "msg-3"
    } ],
    "stream" : false,
    "userId" : "user-67890",
    "consolidateStream" : true
  }
} # GetWorkflowRequest | Payload containing the chat details and parameters for processing the workflow
id = id_example # String | Unique identifier for the workflow

try: 
    # Get a chat completion from a workflow
    api_response = api_instance.process_workflow(body, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowApi->processWorkflow: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
Unique identifier for the workflow
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Workflow interaction successful

Status: 400 -

Status: 401 -