Warning

This API is outdated. Visit Ecrion Engage API 12.0 to access the latest version of the Ecrion API.

EOS 10.5 Developer Guide

This documentation describes the Application Programming Interfaces (API v2) for Ecrion Omni System (EOS) version 10.5 (Klink) and later.

Introducing EOS API 2

Using this API, software programmers are able to produce documents in high volumes and manage customer communications, according to the different EOS layers:

Ecrion Develop

Ecrion Converse includes all Ecrion Develop features, plus:

Ecrion Engage includes all Ecrion Develop and Ecrion Converse features, plus:

Ecrion provides the following APIs:

Notes

The communication between these APIs and the EOS server is performed through REST endpoints via HTTP or HTTPS.

  • For Ecrion Develop core-only installations, the ports default to 50100 (HTTP) and 50101 (HTTPS).
  • For Ecrion Develop complete installations, Ecrion Converse, and Ecrion Engage installations, the ports default to 80 (HTTP) and 443 (HTTPS).
  • In the cloud however, only HTTPS access is provided (port 443).

    Getting Started

    Authentication

    EOS uses API keys in order to authenticate requests made by clients. To manage API keys, from your EOS home page, access the Developer module/API Keys. For core-only installations, open the Management Console, and navigate to EOS Publishing Engine/Engine Settings/HTTP Server Configuration/API Key.

    All endpoints require a session token. The token can be obtained using the Authorization service.

    Single Sign-On

    SSO enables users to access all of their enterprise applications by signing in one time for all services. We provide a Security Assertion Markup Language (SAML)-based SSO API that you can use to integrate into your IdP (Identity Provider).

    Read more about EOS SSO here.

    Template management

    EOS uses document templates (.epr files created in Ecrion Design Studio) to merge data points with layout and create personalized documents. This process is called document composition. Within Ecrion Platform, templates are managed in a high-performance repository with versioning capabilities. Use the top-left menu to access your workspaces. For core-only installations, templates are managed in the file system and can be found in the Management Console/Workspace, under the Default workspace.

    Using EOS JavaScript API

    Including the library

    The Javascript API is referenced through Ecrion.EOS.Client.2.0.js. Use https://eos4.ecrion.com as the server name, however for core-only installations, make sure to use the correct server name and port number provided by your system administrator:

    <html>
        <head>
            <script src="https://eos4.ecrion.com/sdk/v2/javascript/Ecrion.EOS.Client.2.0.js"></script>
        </head>
    <body>
        <script>
        // Javascript code that uses the EOS API
        </script>
    </body>
    </html>
    

    Using the API

    The example below uses JavaScript to convert XML to PDF using a template stored on the EOS server. An XML string is sent to the EOS server and a PDF is received back:

    // Wait for the API to initialize
    eosAPI.ready(function(){
        // Authenticate using an API key
        eosAPI.authorize("API:59e80576-19e5-4808-98c0-cf2c9da055ea")
        .catch(function(response){
            // Handle any authentication errors here
            alert("Authentication failure: " + response.statusText);
        })
    });
    // Wait for authorize() to complete
    eosAPI.authorized(function(){
        // Render an xml to pdf using a template
        eosAPI.DirectRender.Render({
            request: {
                InputSettings: {
                    Template: {
                        Workspace: "Default",
                        Path: "Retail/Bookstore Invoice/Invoice.epr"
                    }
                },
                Input: {
                    InputFormat: "xml",
                    Source: '<?xml version="1.0" standalone="yes"?>' +
                        '<root>' +
                            '<Invoices>' +
                                '<Invoice>' +
                                    '<InvoiceProperties>' +
                                        '<number>02116</number>' +
                                        '<date>2016-06-10</date>' +
                                    '</InvoiceProperties>' +
                                    '<CustomerInformation>' +
                                        '<name>Earl Library Co.</name>' +
                                        '<address>1021 South Main Street, Seattle, Washington 92315</address>' +
                                        '<email>sales@earlbook.com</email>' +
                                        '<telephone>(206)321-2345</telephone>' +
                                    '</CustomerInformation>' +
                                    '<Products>' +
                                        '<Product>' +
                                            '<id>1</id>' +
                                            '<name>Rendezvous with Rama by Arthur C. Clarke</name>' +
                                            '<price>15</price>' +
                                            '<quantity>3</quantity>' +
                                            '<total>45</total>' +
                                            '<description>An all-time science fiction classic, Rendezvous with Rama is also one of Clarke\'s best novels--it won the Campbell, Hugo, Jupiter, and Nebula Awards.</description>' +
                                        '</Product>' +
                                    '</Products>' +
                                    '<Comments>' +
                                        '<comments>Contact us with any questions you may have.</comments>' +
                                    '</Comments>' +
                                '</Invoice>' +
                            '</Invoices>' +
                        '</root>'
                },
                PdfOutput: {}
            }
        }, {
            responseContentType: 'application/pdf'
        })
        .then(function(response) {
            // PDF rendered and received. You can use response.data to retrieve the PDF bytes, 
            // however for this sample the previewResponse utility is used 
            // to quickly preview the response bytes in a new window
            eosAPI.Util.previewResponse(response);
        })
        .catch(function(response){
            // Handle any render errors here
            alert("Render error: " + response.obj.Message);
        });
    });
    

    Notes

  • The EOS JavaScript API uses Promises.
  • The response's obj property contains the deserialized response.
  • The response's data property contains the response bytes if it's binary.
  • The response's status property contains the HTTP status code.
  • Before using the API you must wait for it to become ready either by using .ready or .authorized wrappers.
  • If you're getting the sessionToken using your own backend you can use .authorizeWithToken utility instead of authorize.
  • After authorization is complete, the session token is available via eosAPI.sessionToken.
  • Using EOS .NET API

    Downloading the API

    In .NET you need to include a reference to Ecrion.EOS.Client.dll. To download the API, from your EOS home page, access Developer module/Software.

    For core-only installations, use the SDK download page, which by default is located at https://localhost:50101/sdk or http://localhost:50100/sdk.

    Using the API

    In the zip file there is a README.txt file that explains how to use the API.

    You might need to use the https://eos4.ecrion.com as the eosUrl. For core-only installations, you need to make sure to use the correct server name and port number provided by your system administrator:

    The code sample below uses EOS API to convert XML to PDF using a template stored on the EOS server. An XML string is sent to the EOS server and a PDF is received back and downloaded locally.

    string eosUrl = "https://eos4.ecrion.com";
    string apiKey = "API:59e80576-19e5-4808-98c0-cf2c9da055ea";
    string downloadFolder = "C:/Downloads/";
    string fileName = "eos-sample1-xml2pdf.pdf";
    
    try
    {
        AuthorizationService authSvc = new AuthorizationService(eosUrl);
        string sessionToken = authSvc.GetToken(apiKey).AccessToken;
        Console.WriteLine("Your token is: {0}", sessionToken);
    
        // Render XML -> PDF
        // Create a new Render API
        DirectRenderService renderSvc = new DirectRenderService(eosUrl);
    
        // Create a new render request
        RenderRequestEntity request = new RenderRequestEntity()
        {
            InputSettings = new InputSettings()
            {
                Template = new Template()
                {
                    Workspace = "Default",
                    Path = "Retail/Bookstore Invoice/Invoice.epr"
                }
            },
            Input = new Input()
            {
                InputFormat = "xml",
                Source = "<?xml version=\"1.0\" standalone=\"yes\"?>" +
                    "<root>" +
                        "<Invoices>" +
                            "<Invoice>" +
                                "<InvoiceProperties>" +
                                    "<number>02116</number>" +
                                    "<date>2016-06-10</date>" +
                                "</InvoiceProperties>" +
                                "<CustomerInformation>" +
                                    "<name>Earl Library Co.</name>" +
                                    "<address>1021 South Main Street, Seattle, Washington 92315</address>" +
                                    "<email>sales@earlbook.com</email>" +
                                    "<telephone>(206)321-2345</telephone>" +
                                "</CustomerInformation>" +
                                "<Products>" +
                                    "<Product>" +
                                        "<id>1</id>" +
                                        "<name>Rendezvous with Rama by Arthur C. Clarke</name>" +
                                        "<price>15</price>" +
                                        "<quantity>3</quantity>" +
                                        "<total>45</total>" +
                                        "<description>An all-time science fiction classic, Rendezvous with Rama is also one of Clarke's best novels--it won the Campbell, Hugo, Jupiter, and Nebula Awards.</description>" +
                                    "</Product>" +
                                "</Products>" +
                                "<Comments>" +
                                    "<comments>Contact us with any questions you may have.</comments>" +
                                "</Comments>" +
                            "</Invoice>" +
                        "</Invoices>" +
                    "</root>"
            },
            PdfOutput = new PdfOutput()
        };
    
        // Send the request
        Stream response = renderSvc.Render(sessionToken, request);
        Console.WriteLine("XML -> PDF rendered ok");
    
        // Download the PDF locally
        if (!Directory.Exists(downloadFolder))
            Directory.CreateDirectory(downloadFolder);
        using (System.IO.Stream newFile = System.IO.File.OpenWrite(downloadFolder + fileName))
        {
            response.CopyTo(newFile);
        }
    
        Console.WriteLine("Downloaded response file to folder: {0}", downloadFolder + fileName);
    }
    catch (Exception ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
    

    Using EOS Java API

    Downloading the API

    In Java you need to include a reference to Ecrion.EOS.Client.2.0.Java.jar. To download the API, from your EOS home page, access the Developer module/Software.

    For core-only installations, use the SDK download page, which is by default located at https://localhost:50101/sdk or http://localhost:50100/sdk.

    Using the API

    In the zip file there is a README.txt file that explains how to use the API.

    You might need to use the https://eos4.ecrion.com as the eosUrl. For core-only installations, you need to make sure to use the correct server name and port number provided by your system administrator:

    The code snippet below uses EOS API to convert XML to PDF using a template stored on the EOS server. An XML string is sent to the EOS server and a PDF is received back:

    String eosUrl = "https://eos4.ecrion.com";
    String apiKey = "API:59e80576-19e5-4808-98c0-cf2c9da055ea";
    String downloadFolder = "C:/Downloads/";
    String fileName = "eos-sample1-xml2pdf.pdf";
    
    
    AuthorizationService authSvc = new AuthorizationService(eosUrl);
    String sessionToken = authSvc.getToken(apiKey).getAccessToken();
    System.out.format("Your token is: %s%n", sessionToken);
    
    // Create a new render request
    RenderRequestEntity renderRequest = new RenderRequestEntity();
    
    InputSettings inputSettings = new InputSettings();
    Template template = new Template();
    template.setWorkspace("Default");
    template.setPath("Retail/Bookstore Invoice/Invoice.epr");
    inputSettings.setTemplate(template);
    renderRequest.setInputSettings(inputSettings);
    
    Input input = new Input();
    input.setInputFormat("xml");
    input.setSource("<?xml version=\"1.0\" standalone=\"yes\"?>" +
            "<root>" +
                "<Invoices>" +
                    "<Invoice>" +
                        "<InvoiceProperties>" +
                            "<number>02116</number>" +
                            "<date>2016-06-10</date>" +
                        "</InvoiceProperties>" +
                        "<CustomerInformation>" +
                            "<name>Earl Library Co.</name>" +
                            "<address>1021 South Main Street, Seattle, Washington 92315</address>" +
                            "<email>sales@earlbook.com</email>" +
                            "<telephone>(206)321-2345</telephone>" +
                        "</CustomerInformation>" +
                        "<Products>" +
                            "<Product>" +
                                "<id>1</id>" +
                                "<name>Rendezvous with Rama by Arthur C. Clarke</name>" +
                                "<price>15</price>" +
                                "<quantity>3</quantity>" +
                                "<total>45</total>" +
                                "<description>An all-time science fiction classic, Rendezvous with Rama is also one of Clarke's best novels--it won the Campbell, Hugo, Jupiter, and Nebula Awards.</description>" +
                            "</Product>" +
                        "</Products>" +
                        "<Comments>" +
                            "<comments>Contact us with any questions you may have.</comments>" +
                        "</Comments>" +
                    "</Invoice>" +
                "</Invoices>" +
            "</root>");
    renderRequest.setInput(input);
    
    renderRequest.setPdfOutput(new PdfOutput());
    
    DirectRenderService renderSvc = new DirectRenderService(eosUrl);
    
    // Send the Request
    java.io.InputStream response = renderSvc.render(sessionToken, renderRequest);
    
    // Download the PDF locally
    FileOutputStream outputFile = new FileOutputStream(downloadFolder + fileName);
    byte[] buffer = new byte[1024];
    int bytesRead = -1;
    
    java.io.BufferedInputStream bufferedReader = new java.io.BufferedInputStream(response);
    
    while ((bytesRead = bufferedReader.read(buffer, 0, 1024)) != -1) 
    outputFile.write(buffer, 0, bytesRead);
    
    response.close();
    outputFile.close();
    System.out.format("File %s downloaded ok%n", downloadFolder + fileName);
    

    Java SDK Notes

    The API Reference documents entities and methods using a simplified model. You will need to use setters and getters when woking with the entities, just like it's used in the above example.

    General Notes

    Error handling

    Each API method can throw error and attempts to return appropriate HTTP status codes. Additional info is included in the body of the response, JSON-formatted.

    Example:

    //400 BadRequest
    {
        "Message": "Required parameter 'Path' not found."
    }
    
    Code Text Description
    200 OK Success!
    201 Created Resource created. Usually, the response body represents the newly created resource.
    204 No Content Request processed. Response is intentionally blank e.g. DELETE operations.
    400 Bad Request The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
    401 Unauthorized Missing or incorrect credentials.
    403 Forbidden The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. This is usually because of the current authenticated user not having permission to manage the resource.
    404 Not Found The URI requested is invalid or the resource requested, such as a user, does not exist.
    410 Gone This resource is gone. Used to indicate that an API endpoint has been turned off.
    415 Unsupported Media Type The payload is in a format not supported by this method on the target resource. The format problem might be due to the request's indicated Content-Type or Content-Encoding, or as a result of inspecting the data directly.
    500 Internal Server Error Something is broken. Additional explanation is included in the response body.

    Dates and durations

    All dates in the API are strings in the ISO 8601 DateTime format:

    "2017-01-26T11:29:35Z"
    

    All durations in the API are string in the ISO 8601 Duration format:

    "PT1.52S"
    

    API Reference

    This Enteprise API reference is organized by services and resource type. Each service groups similar resources together and has one or more methods that changes these resources (create, read, update, delete, etc.). All HTTP routes are relative to Enterprise Website base URI, e.g. api/v2/token refers to https://eos4.ecrion.com/api/v2/token.

    Authorization

    GetToken

    Generates a session token. Ecrion Develop Ecrion Converse Ecrion Engage

    GET api/v2/token

    To generate a session token, call this method and supply the user credentials (case sensitive). The preferred way of authenticating is to use an API key. For more information about API keys, see Authentication.

    The response contains a session token that needs to be passed via Authorization header using Basic <sessionTokenInbase64> format in order to authorize a generic endpoint. If you're using our Javascript, .NET or Java client API this process is simplified (examples below).

    Parameters

    Returns TokenEntity

    The session token has temporary purposes. Don't forget to delete it after you finish using the API by using DeleteToken endpoint.

    Examples

    Javascript

    If you're running Javascript inside a browser, you should avoid typing the credentials in plain text because the .js sources are available to the client. Instead, it is preferred to store the API Key on your server and do the authentication in a secure backend, passing only a sessionToken to the client, using authorizeWithToken utility.

    eosAPI.ready(function(){
        var sessionToken = obtainTokenFromMyBackend();
        eosAPI.authorizeWithToken(sessionToken);
        //all subsequent eosAPI calls will use the sessionToken
    })
    

    However, if you're using Javascript in a server-side environment or the credentials are provided by the client user, the authorize utility method is available. Internally, it calls Authorization.GetToken and uses the returned session token for all subsequent calls through the eosAPI global instance:

    var apiKey = "API:dee401eb-d3e5-4523-9f90-c19a573e7e0a";
    eosAPI.authorize(apiKey)
    .catch(function(response){
        // Handle any authentication errors here
        alert("Authentication failure: " + err.statusText);
    });
    eosAPI.authorized(function(){
        //all eosAPI calls will use the sessionToken obtained based on the apiKey
    });
    

    The authorize method supports passing two arguments, i.e. eosAPI.authorize(username, password) if you want to use a username/password combination.

    .NET

    string apiKey = "API:dee401eb-d3e5-4523-9f90-c19a573e7e0a";
    AuthorizationService authSvc = new AuthorizationService("https://eos4.ecrion.com/");
    string sessionToken = authSvc.GetToken(apiKey).AccessToken;
    

    Alternatively, it's possible to use a username/password combination to authenticate: authSvc.GetToken(username + ":" + password)

    Java

    String apiKey = "API:dee401eb-d3e5-4523-9f90-c19a573e7e0a";
    AuthorizationService authSvc = new AuthorizationService("https://eos4.ecrion.com/");
    String sessionToken = authSvc.getToken(apiKey);
    

    Alternatively, it's possible to use a username/password combination to authenticate: authSvc.getToken(username + ":" + password)

    HTTP

    curl -u "API:dee401eb-d3e5-4523-9f90-c19a573e7e0a:" "https://eos4.ecrion.com/api/v2/token"
    

    Alternatively, it's possible to use a username/password combination to authenticate. Replace -u apiKey: with -u username:password

    __

    DeleteToken

    Delete a specific session token. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.4 or later

    DELETE api/v2/token

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Authorization.DeleteToken({
        accessToken: "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80"
    })
    .then(function(response) {
        var status = response.status;
    });
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    AuthorizationService authSvc = new AuthorizationService("https://eos4.ecrion.com/");
    authSvc.DeleteToken(token);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    AuthorizationService authSvc = new AuthorizationService("https://eos4.ecrion.com/");
    authSvc.deleteToken(token);
    

    HTTP

    curl -X DELETE "https://eos4.ecrion.com/api/v2/token?accessToken=TOKEN:c87ca566-2587-4480-8a7a-27531f04af80"
    

    __

    GetTokenWindows

    Generates a session token using Windows Authentication. Ecrion Develop Ecrion Converse Ecrion Engage

    GET api/v2/token/windows

    To generate an EOS access token, call this method and supply the environment name.

    Parameters

    Returns

    This method applies for core-only installations if Enterprise login with Active Directory is enabled.

    If AD user store synchronization is enabled, an EOS user will automatically be created if the current AD user does not have an EOS user synced yet. If synchronization is disabled and an EOS user does not exist the authentication will fail.

    This method is available only in .NET SDK.

    Examples

    .NET

    string environment = "testEnvironment";
    AuthorizationService authSvc = new AuthorizationService("https://eos4.ecrion.com/");
    string sessionToken = authSvc.GetTokenWindows(environment).AccessToken;
    

    __

    GetTokenSSO

    Generates a session token based on a SAML assertion or WS Federation Message Ecrion Develop Ecrion Converse Ecrion Engage

    POST /api/v2/token/sso

    Parameters are sent using form data:

    You must provide SAMLResponse or wresult.

    Returns

    __

    SAML Assertion Consumer

    Consumes a SAML Assertion Response. Also known as Assertion Consumer Service (ACS) Ecrion Develop Ecrion Converse Ecrion Engage

    POST /Security/ConsumeSAMLToken

    When configuring IdPs, use an absolute path, pointing to the right domain and port of the EOS Enterprise Website. This endpoint does not have a SDK method associated.

    Parameters are sent using form data:

    You must provide SAMLResponse or wresult.

    Returns

    Examples

    Salesforce as IdP

    This fills the ACS URL field in the Salesforce configuration: http://eos4.ecrion.com/Security/ConsumeSAMLToken {!docs/10.5/Direct Data.md!}


    DirectRender

    Render

    Render input into a variety of output formats including PDF, Word, etc. Ecrion Develop Ecrion Converse Ecrion Engage

    POST api/v2/render

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.DirectRender.Render({
        request: {
            InputSettings: {
                Template: {
                    Workspace: "Default",
                    Path: "Retail/Bookstore Invoice/Invoice.epr"
                }
            },
            Input: {
                InputFormat: "xml",
                Source: "<?xml version=\"1.0\" standalone=\"yes\"?><root><Invoices><Invoice><InvoiceProperties><number>02116</number><date>2016-06-10</date></InvoiceProperties><CustomerInformation><name>Earl Library Co.</name><address>1021 South Main Street, Seattle, Washington 92315</address><email>sales@earlbook.com</email><telephone>(206)321-2345</telephone></CustomerInformation><Products><Product><id>1</id><name>Rendezvous with Rama by Arthur C. Clarke</name><price>15</price><quantity>3</quantity><total>45</total><description>An all-time science fiction classic, Rendezvous with Rama is also one of Clarke's best novels--it won the Campbell, Hugo, Jupiter, and Nebula Awards.</description></Product></Products><Comments><comments>Contact us with any questions you may have.</comments></Comments></Invoice></Invoices></root>"
            },
            TxtOutput: {}
        }
    })
    .then(function(response) {
        var content = response.data;
    })
    

    .NET

    DirectRenderService renderSvc = new DirectRenderService("https://eos4.ecrion.com/");
    
    // Create a new request
    RenderRequestEntity request = new RenderRequestEntity();
    
    request.InputSettings = new InputSettings();
    request.InputSettings.Template = new Template();
    request.InputSettings.Template.Workspace = "Default";
    request.InputSettings.Template.Path = "Retail/Bookstore Invoice/Invoice.epr";
    
    request.Input = new Input();
    request.Input.InputFormat = "xml";
    request.Input.Source = "<?xml version=\"1.0\" standalone=\"yes\"?><root><Invoices><Invoice><InvoiceProperties><number>02116</number><date>2016-06-10</date></InvoiceProperties><CustomerInformation><name>Earl Library Co.</name><address>1021 South Main Street, Seattle, Washington 92315</address><email>sales@earlbook.com</email><telephone>(206)321-2345</telephone></CustomerInformation><Products><Product><id>1</id><name>Rendezvous with Rama by Arthur C. Clarke</name><price>15</price><quantity>3</quantity><total>45</total><description>An all-time science fiction classic, Rendezvous with Rama is also one of Clarke's best novels--it won the Campbell, Hugo, Jupiter, and Nebula Awards.</description></Product></Products><Comments><comments>Contact us with any questions you may have.</comments></Comments></Invoice></Invoices></root>";
    
    request.TxtOutput = new TxtOutput();
    
    // Send the request
    Stream content = renderSvc.Render(sessionToken, request);
    

    Java

    DirectRenderService renderSvc = new DirectRenderService("https://eos4.ecrion.com/");
    
    // Create a new request
    RenderRequestEntity request = new RenderRequestEntity();
    
    InputSettings inputSettings = new InputSettings();
    Template template = new Template();
    template.setWorkspace("Default");
    template.setPath("Retail/Bookstore Invoice/Invoice.epr");
    inputSettings.setTemplate(template);
    request.setInputSettings(inputSettings);
    
    Input input = new Input();
    input.setInputFormat("xml");
    input.setSource("<?xml version=\"1.0\" standalone=\"yes\"?><root><Invoices><Invoice><InvoiceProperties><number>02116</number><date>2016-06-10</date></InvoiceProperties><CustomerInformation><name>Earl Library Co.</name><address>1021 South Main Street, Seattle, Washington 92315</address><email>sales@earlbook.com</email><telephone>(206)321-2345</telephone></CustomerInformation><Products><Product><id>1</id><name>Rendezvous with Rama by Arthur C. Clarke</name><price>15</price><quantity>3</quantity><total>45</total><description>An all-time science fiction classic, Rendezvous with Rama is also one of Clarke's best novels--it won the Campbell, Hugo, Jupiter, and Nebula Awards.</description></Product></Products><Comments><comments>Contact us with any questions you may have.</comments></Comments></Invoice></Invoices></root>");
    request.setInput(input);
    
    request.setTxtOutput(new TxtOutput());
    
    // Send the request
    java.io.InputStream response = renderSvc.render(sessionToken, request);
    

    HTTP

    curl -H "Content-Type: application/json" -X POST -u "TOKEN:7a6961b5-5be4-4318-b82e-4631659efa38" -d "{ 'Input' : {  'Source' : '<?xml version=\"1.0\" standalone=\"yes\"?><root></root>' }, 'InputSettings' : {  'Template' : {   'Workspace' : 'Default',   'Path' : 'Retail/Bookstore Invoice/Invoice.epr'  } }, 'TxtOutput' : {}}" "https://eos4.ecrion.com/api/v2/render"
    

    Repository

    EOS stores all assets involved in document production (images, templates, stylesheets, etc.) in a file repository. The Ecrion core-only installation provides a basic level of functionality, while the complete installation comes with a high performance repository capable of sustaining 1000s of read/write operations per second, versioning and dependency tracking.

    Methods:

    Entities:

    DownloadFile

    Download a file from EOS repository. Ecrion Develop Ecrion Converse Ecrion Engage

    GET api/v2/files/content

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.DownloadFile({
        workspace: "Default",
        path: "Retail/Bookstore Invoice/Main.wk4"
    })
    .then(function(response) {
        var content = response.data;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    Stream content = repo.DownloadFile(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    java.io.InputStream content = repo.downloadFile(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
    

    HTTP

    curl -u "TOKEN:7a6961b5-5be4-4318-b82e-4631659efa38" "https://eos4.ecrion.com/api/v2/files/content?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4"
    

    __

    UploadFile

    Upload a file to EOS repository. Ecrion Develop Ecrion Converse Ecrion Engage

    POST api/v2/files/content

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.UploadFile({
        workspace: "Default",
        path: "Retail/Bookstore Invoice/Sample.xml",
        file: new File(['<?xml version=\"1.0\" standalone=\"yes\"?><root></root>'], "Sample.xml", {type: "text/xml"})
    })
    .then(function(response) {
        var file = response.obj;
    });
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    using (FileStream fsSource = new FileStream(@"C:\Sample.xml", FileMode.Open, FileAccess.Read))
    {
        RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
        FileEntity fileResponse = repo.UploadFile(token, "Default", "Retail/Bookstore Invoice/Sample.xml", fsSource);
    }
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    java.io.InputStream fsSource = new FileInputStream("C:\\Sample.xml");       
    repo.uploadFile(token, "Default", "Retail/Bookstore Invoice/Sample.xml", fsSource);
    

    HTTP

    curl -X POST -F "file=@C:\Sample.xml" -u "TOKEN:7a6961b5-5be4-4318-b82e-4631659efa38" "https://eos4.ecrion.com/api/v2/files/content?workspace=Default&path=Retail/Bookstore%20Invoice/Sample.xml"
    

    __

    GetFiles

    Returns a list of files from the EOS repository. Ecrion Develop Ecrion Converse Ecrion Engage

    GET api/v2/files

    Parameters

    Notes

    1. If the path is a file the result will contain a list of one file metadata from the specified file path.

    2. To search files after a tag you need to specify both tagName and tagValue.

    Returns FileEntity[]

    Examples

    Javascript

    // List all files in Bookstore Invoice folder
    eosAPI.Repository.GetFiles({
        workspace: "Default",
        path: "Retail/Bookstore Invoice"
    })
    .then(function(response) {
        var files = response.obj;
    })
    

    .NET

    // List all files in Bookstore Invoice folder
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    List<FileEntity> files = repo.GetFiles(token, "Default", "Retail/Bookstore Invoice");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    java.util.List<FileEntity> files = repo.getFiles(token, "Default", "Retail/Bookstore Invoice", null, 0, 10, null, null);
    

    HTTP

    curl -u "TOKEN:7a6961b5-5be4-4318-b82e-4631659efa38" "https://eos4.ecrion.com/api/v2/files?workspace=Default&path=Retail/Bookstore%20Invoice"
    

    __

    UpdateFile

    Rename, copy or move a file Ecrion Develop Ecrion Converse Ecrion Engage

    PUT /api/v2/files

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.UpdateFile({
        workspace: "Default",
        path: "/Design/Invoice/Invoice.epr",
        fileOperation:{
            path: "/Design/Invoice/Invoice2.epr",
            action: "copy"
        }
    })
    .then(function(response) {
        var status = response.status;
    });
    

    .NET

    //duplicate Invoice.epr as Invoice2.epr
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    repo.UpdateFile(token, "Default", "Retail/Bookstore Invoice/Invoice.epr",
        new FileOperationEntity()
        {
            Path = "Retail/Bookstore Invoice/Invoice2.epr",
            Action = "copy"
        });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    FileOperationEntity op = new FileOperationEntity();
    op.setPath("Retail/Bookstore Invoice/Invoice2.epr");
    op.setAction("copy");
    op.setOverwrite(true);
    repo.updateFile(token, "Default", "Retail/Bookstore Invoice/Invoice.epr", op);
    

    HTTP

    curl -H "Content-Type: application/json" -X PUT -d "{ 'Path':'Retail/Bookstore Invoice/Invoice2.epr', Action:'copy' }" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/files?workspace=Default&path=Retail/Bookstore%20Invoice/Invoice.epr"
    

    __

    DeleteFile

    Delete a file from EOS repository Ecrion Develop Ecrion Converse Ecrion Engage

    DELETE /api/v2/files

    Parameters

    Returns

    Examples

    Javascript

    
    eosAPI.Repository.DeleteFile({
        workspace: "Default",
        path: "Retail/Bookstore Invoice/Main.wk4",
    })
    .then(function(response) {
        var status = response.status;
    });
    
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    repo.DeleteFile(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    repo.deleteFile(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
    

    HTTP

    curl -X DELETE -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/files?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4"
    

    __

    GetFileVersions

    Return a list of file versions from specified file path and workspace. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/files/versions

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.GetFileVersions({
        workspace: "Default",
        path: "Retail/Bookstore Invoice/Main.wk4"
    })
    .then(function(response) {
        var versions = response.obj;
    });
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    List<FileEntity> versions = repo.GetFileVersions(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    List<FileEntity> versions = repo.getFileVersions(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/files/versions?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4"
    

    __

    RestoreFileVersion

    Restore a file version Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations).

    POST /api/v2/files/versions

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.RestoreFileVersion({
        workspace: "Default",
        path: "Retail/Bookstore Invoice/Main.wk4",
        request: {
            version: 1
        }
    })
    .then(function(response) {
        var status = response.status;
    });
    

    .NET

    // Restore Main.wk4 file to version 1
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    RestoreVersionRequestEntity versToRestore = new RestoreVersionRequestEntity();
    versToRestore.Version = 1;
    repo.RestoreFileVersion(token, "Default", "Retail/Bookstore Invoice/Main.wk4", versToRestore);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    RestoreVersionRequestEntity versToRestore = new RestoreVersionRequestEntity();
    versToRestore.setVersion(1);
    repo.restoreFileVersion(token, "Default", "Retail/Bookstore Invoice/Main.wk4", versToRestore);
    

    HTTP

    curl -H "Content-Type: application/json" -X POST -d "{ 'Version':1 }" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/files/versions?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4"
    

    __

    ExportFolder

    Download a zip file of a folder from EOS repository. Ecrion Develop Ecrion Converse Ecrion Engage

    GET api/v2/folders/content

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.ExportFolder({
        workspace: "Default",
        path: "Retail/Bookstore Invoice"
    })
    .then(function(response) {
        // zip is a blob
        var zip = response.data;
    });
    

    .NET

    // Export Bookstore Invoice folder
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    Stream zip = repo.ExportFolder(token, "Default", "Retail/Bookstore Invoice");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    java.io.InputStream zip  = repo.exportFolder(token, "Default", "Retail/Bookstore Invoice");
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/folders/content?workspace=Default&path=Retail/Bookstore%20Invoice"
    

    __

    ImportFolder

    Decompress an archive and uploads its content to EOS repository. Ecrion Develop Ecrion Converse Ecrion Engage

    POST api/v2/folders/content

    Parameters

    Returns

    Examples

    Javascript

    //Upload generated .zip file
    eosAPI.Repository.ImportFolder({
        workspace: "Default",
        path: "Retail/Bookstore Invoice",
        file: new File([/*content*/ ], "myFolder.zip")
    })
    .then(function(response) {
         var folder = response.obj;
    })
    
    

    .NET

    // Import 'myFolder' to Bookstore Invoice folder
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    using (FileStream fsSource = new FileStream(@"C:\myFolder.zip", FileMode.Open, FileAccess.Read))
    {
        RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
        FolderEntity folder = repo.ImportFolder(token, "Default", "Retail/Bookstore Invoice", false, fsSource);
    }
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    java.io.InputStream fsSource = new FileInputStream("C:\\myFolder.zip");
    repo.importFolder(token, "Default", "Retail/Bookstore Invoice", false, fsSource);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" -F filedata=@"C:\myFolder.zip" "http://eos4.ecrion.com/api/v2/folders/content?workspace=Default&path=Retail/Bookstore%20Invoice"
    

    __

    CreateFolder

    Create new folder Ecrion Develop Ecrion Converse Ecrion Engage

    POST /api/v2/folders

    Parameters

    Returns FolderEntity

    Examples

    Javascript

    eosAPI.Repository.CreateFolder({
        workspace: "Default",
        path: "NewFolder"
    })
    .then(function(response) {
        var folder = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    FolderEntity folder = repo.CreateFolder(token, "Default", "NewFolder");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    FolderEntity folder = repo.createFolder(token, "Default", "NewFolder");
    

    HTTP

    curl -X POST -d "{'path' : 'NewFolder'}" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/folders?workspace=Default&path=NewFolder"
    

    __

    GetFolders

    Returns a list of folders in the specified parent path and workspace. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/folders

    Parameters

    Returns

    Examples

    Javascript

    // List all folders from a workspace
    eosAPI.Repository.GetFolders({
        workspace: "Default",
        path: "Retail/Bookstore Invoice"
    })
    .then(function(response) {
        var folders = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    List<FolderEntity> folders = repo.GetFolders(token, "Default", "Retail/Bookstore Invoice");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    java.util.List<FolderEntity> folders =  repo.getFolders(token, "Default", "Retail/Bookstore Invoice", 0, 10);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/folders?workspace=Default&path=Retail/Bookstore%20Invoice"
    

    __

    UpdateFolder

    Rename, copy or move folder Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    PUT /api/v2/folders

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.UpdateFolder({
        workspace: "Default",
        path: "Retail/Bookstore Invoice",
        folderOperation: {
            Path: "Retail/Bookstore Invoice2",
            Action: "copy"
        }
    })
    .then(function(response) {
        var status = response.status;
    })
    

    .NET

    //duplicate Bookstore Invoice as Bookstore Invoice2
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    repo.UpdateFolder(token, "Default", "Retail/Bookstore Invoice",
        new FileOperationEntity()
        {
            Path = "Retail/Bookstore Invoice2",
            Action = "copy"
        });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    FolderOperationEntity op = new FolderOperationEntity();
    op.setPath("Retail/Bookstore Invoice2");
    op.setAction("copy");
    repo.updateFolder(token, "Default", "Retail/Bookstore Invoice", op);
    

    HTTP

    curl -X PUT -H "Content-Type: application/json" -d "{ 'Path':'Retail/Bookstore Invoice2', 'Action':'copy' }" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/folders?workspace=Default&path=Retail/Bookstore%20Invoice"
    

    __

    DeleteFolder

    Delete folder Ecrion Develop Ecrion Converse Ecrion Engage

    DELETE /api/v2/folders

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.DeleteFolder({
        workspace: "Default",
        path: "Retail/Bookstore Invoice"
    })
    .then(function(response) {
        var status = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    repo.DeleteFolder(token, "Default", "Retail/Bookstore Invoice");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    repo.deleteFolder(token, "Default", "Retail/Bookstore Invoice");
    

    HTTP

    curl -X DELETE -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/folders?workspace=Default&path=Retail/Bookstore%20Invoice"
    

    __

    GetTags

    Get tags associated with a repository item. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations).

    GET /api/v2/files/tags

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.GetTags({
        workspace: "Default",
        path: "Retail/Bookstore Invoice/Main.wk4"
    })
    .then(function(response) {
        var tags = response.obj;
    });
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    List<TagEntity> tags = repo.GetTags(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    List<TagEntity> tags  = repo.getTags(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
    

    HTTP

    curl -X GET -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/files/tags?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4"
    

    __

    AddTag

    Add a tag to the list of repository item tags. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    POST /api/v2/files/tags

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.AddTag({
        workspace: "Default",
        path: "Retail/Bookstore Invoice/Main.wk4",
        tag:{
            Name: "Priority",
            Value: "High"
        }
    })
    .then(function(response) {
        var status = response.status;
    });
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    TagEntity tag = new TagEntity();
    tag.Name = "Priority";
    tag.Value = "High";
    repo.AddTag(token, "Default", "Retail/Bookstore Invoice/Main.wk4", tag);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    TagEntity tag = new TagEntity();
    tag.setName("Priority");
    tag.setValue("High");
    repo.addTag(token, "Default", "Retail/Bookstore Invoice/Main.wk4", tag);
    

    HTTP

    curl -H "Content-Type: application/json" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" -X POST -d "{'Name':'Priority', 'Value':'High'}" "http://eos4.ecrion.com/api/v2/files/tags?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4"
    

    __

    RemoveTag

    Removes a tag from the list of repository item tags. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    DELETE /api/v2/files/tags

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Repository.RemoveTag({
        workspace: "Default",
        path: "Retail/Bookstore Invoice/Main.wk4",
        tag:{
            Name: "Priority",
            Value: "High"
        }
    })
    .then(function(response) {
        var status = response.status;
    });
    

    .NET

    // Remove the tag associated with Main.wk4 file which have the specified name and value
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    TagEntity tag = new TagEntity();
    tag.Name = "Priority";
    tag.Value = "High";
    repo.RemoveTag(token, workspace.Name, "Retail/Bookstore Invoice/Main.wk4", tag);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
    TagEntity tag = new TagEntity();
    tag.setName("Priority");
    tag.setValue("High");
    repo.removeTag(token, "Default", "Retail/Bookstore Invoice/Main.wk4", tag);
    

    HTTP

    curl -H "Content-Type: application/json" -X DELETE -d {"Name":"Priority", "Value":"High"} -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/files/tags?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4"
    

    Jobs

    Methods:

    Entities:

    GetJobs

    Returns a list of jobs from the specified workspace. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/jobs

    Parameters

    Notes

    You must provide at least one of these filters: Type, Communication or Workspace. Passing in multiple filters will not get a combined result.

    Returns

    Examples

    Javascript

    // Get latest 10 jobs from Default workspace
    eosAPI.Jobs.GetJobs({
        workspace: "Default",
        count: 10
    })
    .then(function(response) {
        var jobs = response.obj;
    })
    

    .NET

    // Get jobs from Default workspace
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    List<JobEntity> myJobs = jobSvc.GetJobs(token, null, null, "Default", null, null, 0, 10);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    List<JobEntity> myJobs = jobSvc.getJobs(token, null, null, "Default", null, null, 0, 10);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/jobs?workspace=Default"
    

    __

    Lookup

    Returns a list of jobs. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.6 or later

    POST /api/v2/jobs/lookup

    Parameters

    Notes

    You must provide at least one of these filters: Type, Communication or Workspace. Passing in multiple filters will not get a combined result.

    Returns

    Examples

    Javascript

    // Get latest 10 jobs from Default workspace
    eosAPI.Jobs.Lookup({
        request:{
            workspace: "Default",
            Tags: [
                {Name: "MyTagName1", Value: "MyTagValue1"},
                {Name: "MyTagName2", Value: "MyTagValue2"}
            ],
            count: 10
        }
    })
    .then(function(response) {
        var jobs = response.obj;
    })
    

    .NET

    // Get jobs from Default workspace which have the specified tags
    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    
    List<TagEntity> myTags = new List<TagEntity> {
            new TagEntity() { Name = "MyTagName1", Value = "MyTagValue1" },
            new TagEntity() { Name = "MyTagName2", Value = "MyTagValue2" }
    };
    List<JobEntity> jobs = jobSvc.Lookup(token, new LookupJobsRequest()
    {
        Workspace = "Default",
        Tags = myTags
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    TagEntity tag1 = new TagEntity();
    tag1.setName("MyTagName1");
    tag1.setValue("MyTagValue1");
    List<TagEntity> tagsList = new ArrayList<TagEntity>();
    tagsList.add(tag1);
    LookupJobsRequest lookupOp =  new LookupJobsRequest();
    lookupOp.setWorkspace(settings.workspace);
    lookupOp.setTags(tagsList);
    List<JobEntity> myJobs = jobSvc.lookup(token, lookupOp);
    

    HTTP

    curl -H "Content-Type: application/json" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" -X POST -d "{ 'workspace' : 'Default' }" "https://eos4.ecrion.com/api/v2/jobs/lookup"
    

    __

    CreateJob

    Creates a new job in "WaitingForInput" state and returns it. Ecrion Develop Ecrion Converse Ecrion Engage

    POST /api/v2/jobs

    Parameters

    Returns JobEntity

    Examples

    Javascript

    eosAPI.Jobs.CreateJob({
        job:{
            workflow: {
                workspace: "Default",
                path: "Retail/Bookstore Invoice/Main.wk4"
            }
        }
    })
    .then(function(response) {
        var jobEntity = response.obj;
    });
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    JobRequestEntity jobReq = new JobRequestEntity();
    jobReq.Workflow = new WorkflowFileEntity()
    {
        Workspace = "Default",
        Path = "Retail/Bookstore Invoice/Main.wk4"
    };
    JobEntity newJob = jobSvc.CreateJob(token, jobReq);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    JobRequestEntity jobReq = new JobRequestEntity();
    WorkflowFileEntity workflowOp = new WorkflowFileEntity();
    workflowOp.setWorkspace("Default");
    workflowOp.setPath("Retail/Bookstore Invoice/Main.wk4");
    jobReq.setWorkflow(workflowOp);
    JobEntity newJob = jobSvc.createJob(token, jobReq);
    

    HTTP

    curl -H "Content-Type: application/json" -X POST -d "{ 'Workflow': { 'Workspace':'Default', 'Path':'Retail/Bookstore Invoice/Main.wk4'}  }" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/jobs"
    

    __

    RunJob

    Runs a job. The job will transition from "WaitingForInput" state. Ecrion Develop Ecrion Converse Ecrion Engage

    POST /api/v2/jobs/{id}/run

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.RunJob({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var job = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    JobEntity runJob = jobSvc.RunJob(token, jobId, "Default", true);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    JobEntity runJob = jobSvc.runJob(token, jobId, "Default", true);
    

    HTTP

    curl -X POST -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" -d "{workspace: 'Default'}" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/run?workspace=Default"
    

    __

    GetJob

    Finds a job by id. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/jobs/{id}

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.GetJob({
        id: "bd822d4e-2bf0-4010-a6b2-9fbaf1c3671a",
        workspace: "Default"
    })
    .then(function(response) {
        var job = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    JobEntity myJob = jobSvc.GetJob(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    JobEntity myJob = jobSvc.getJob(token, jobId, "Default");
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b?workspace=Default"
    

    __

    DeleteJob

    Deletes a job by id. Ecrion Develop Ecrion Converse Ecrion Engage

    DELETE /api/v2/jobs/{id}

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.DeleteJob({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var statusCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    jobSvc.DeleteJob(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    jobSvc.deleteJob(token, jobId, "Default");
    

    HTTP

    curl -X DELETE -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b?workspace=Default"
    

    __

    GetJobInput

    Gets job's input file. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/jobs/{id}/input

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.GetJobInput({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var file = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    FileEntity jobInputFile = jobSvc.GetJobInput(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    FileEntity jobInputFile = jobSvc.getJobInput(token, jobId, "Default");
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/input?workspace=Default"
    

    __

    DeleteJobInput

    Deletes job's input file. Ecrion Develop Ecrion Converse Ecrion Engage

    DELETE /api/v2/jobs/{id}/input

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.DeleteJobInput({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var statusCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    jobSvc.DeleteJobInput(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    jobSvc.deleteJobInput(token, jobId, "Default");
    

    HTTP

    curl -X DELETE -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/input?workspace=Default"
    

    __

    DownloadJobInput

    Downloads the job's input file. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/jobs/{id}/input/content

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.DownloadJobInput({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var content = response.data;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    Stream content = jobSvc.DownloadJobInput(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    java.io.InputStream content = jobSvc.downloadJobInput(token, jobId, "Default");
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/input/content?workspace=Default"
    

    __

    UploadJobInput

    Uploads the job's input file bytes. Ecrion Develop Ecrion Converse Ecrion Engage

    POST /api/v2/jobs/{id}/input/content

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.UploadJobInput({
        id:"1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default",
        file: new File(['<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <root></root>'], "JobInput.xml")
    })
    .then(function(response) {
        var status = response.status;
    });
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    using (FileStream fsSource = new FileStream(@"C:\JobInput.xml", FileMode.Open, FileAccess.Read))
    {
        JobsService jobs = new JobsService("https://eos4.ecrion.com/");
        jobs.UploadJobInput(token, jobId, "Default", fsSource);
    }
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    java.io.InputStream initialStream = new FileInputStream("C:\\JobInput.xml");
    jobSvc.uploadJobInput(token, jobId, "Default", initialStream);
    

    HTTP

    curl -X POST -F "file=@C:\JobInput.xml" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/input/content?workspace=Default"
    

    __

    GetJobOutput

    Gets job outputs. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/jobs/{id}/output

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.GetJobOutput({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var files = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    List<FileEntity> jobOutputs = jobSvc.GetJobOutput(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    List<FileEntity> jobOutputs = jobSvc.getJobOutput(token, jobId, "Default");
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/output?workspace=Default"
    

    __

    DownloadJobOutput

    Downloads a file zip file that archive a folder EOS repository. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/jobs/{id}/output/content

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.DownloadJobOutput({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var files = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    Stream zipFile = jobSvc.DownloadJobOutput(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    java.io.InputStream zipFile = jobSvc.downloadJobOutput(token, jobId, "Default", true);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/output/content?workspace=Default"
    

    __

    GetJobLogs

    Gets the log messages of a job. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.3 or later

    GET /api/v2/jobs/{id}/logs

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.GetJobLogs({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var logMsgs = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    List<LogMessageEntity> logs = jobSvc.GetJobLogs(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    List<LogMessageEntity> logs = jobSvc.getJobLogs(token, jobId, "Default", 0, 10);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/logs?workspace=Default"
    

    __

    CreateJobLog

    Logs a message for a specific job. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.3 or later

    POST /api/v2/jobs/{id}/logs

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.CreateJobLog({
        id: "bd822d4e-2bf0-4010-a6b2-9fbaf1c3671a",
        workspace: "Default",
        logMessage: {
            Severity: "Information",
            Content: "This message should go to the job log"
        }
    })
    .then(function(response) {
        var httpCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    jobSvc.CreateJobLog(token, jobId, "Default", new LogMessageRequestEntity()
    {
        Severity = "Information",
        Content = "This message should go to the job log",
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    LogMessageRequestEntity log = new LogMessageRequestEntity();
    log.setSeverity("Information");
    log.setContent("This message should go to the job log");
    jobSvc.createJobLog(token, jobId, "Default", log, null);
    

    HTTP

    curl -X POST -H "Content-Type: application/json" -d "{Severity: 'Information', Content: 'This message should go to the job log'}" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/jobs/1c5102d4-55fc-4a22-9136-18627cb7f88b/logs?workspace=Default"
    

    __

    JobStatus

    __

    UnshareJob

    Removes the share for a job with portal/anonymous users. Ecrion Develop Ecrion Converse Ecrion Engage

    DELETE /api/v2/jobs/{id}/share

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Jobs.UnshareJob({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default",
        request: {
            Public: "true",
            PortalUsers: "C011"
        }
    })
    .then(function(response) {
        var statusCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    jobSvc.UnshareJob(token, jobId, "Default", new DeleteFileShareRequest()
    {
        Public = "true",
        PortalUsers = "C011"
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    DeleteFileShareRequest job = new DeleteFileShareRequest();
    job.setPublic("true");
    job.setPortalUsers("C011");
    jobSvc.UnshareJob(token, jobId, "Default", "true", "C011");
    

    HTTP

    curl -H "Content-Type: application/json" -X DELETE -d "{ 'Public':'true', 'PortalUsers': ['C011', 'C012'] }" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "http://eos4.ecrion.com/api/v2/jobs/7dfc3494-6c6e-42dd-ade5-e8d29093015a/share?workspace=Default" 
    

    -

    GetJobShare

    Gets share information from a job. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/jobs/{id}/share

    Parameters

    Returns FileShareResponse

    Examples

    Javascript

    eosAPI.Jobs.GetJobShare({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default"
    })
    .then(function(response) {
        var FileShareResponse = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    FileEntity jobInputFile = jobSvc.GetJobShare(token, jobId, "Default");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    FileEntity jobInputFile = jobSvc.getJobShare(token, jobId, "Default");
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "http://eos4.ecrion.com/api/v2/jobs/7dfc3494-6c6e-42dd-ade5-e8d29093015a/share?workspace=Default"
    

    -

    ShareJob

    Share a folder with portal/anonymous users Ecrion Develop Ecrion Converse Ecrion Engage

    POST api/v2/jobs/{id}/share

    Parameters

    Returns

    Javascript

    eosAPI.Jobs.ShareJob({
        id: "bd822d4e-2bf0-4010-a6b2-9fbaf1c3671a",
        workspace: "Default",
        request: {
            Public: "true",
            PortalUsers: "C011"
        }
    })
    .then(function(response) {
        var FileShareResponse = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    jobSvc.ShareJob(token, jobId, "Default", new FileShareRequest()
    {
        Public = "true";
        PortalUsers = "C011"
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
    FileShareEntity file = new FileShareEntity();
    file.setPublic("true");
    file.setPortalUsers("C011");
    jobSvc.ShareJob(token, jobId, "Default", "true", "c011");
    

    HTTP

    curl -H "Content-Type: application/json" -X POST -d "{ 'Public':'true', 'PortalUsers': ['C011', 'C012'] }" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "http://eos4.ecrion.com/api/v2/jobs/7dfc3494-6c6e-42dd-ade5-e8d29093015a/share?workspace=Default"
    

    -


    Resources

    Methods:

    Entities:

    GetJobResourceToken

    Returns the resource token associated with job. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.9 or later

    GET /api/v2/resources/jobs

    Parameters

    Returns ResourceTokenEntity

    Use case

    The returned AccessToken limits the access to the scope of the specified job. You can pass this limited resource token exactly as you would do with normal tokens. This can be useful in the particular cases of embedding DocumentEditor in external systems.

    Examples

    Javascript

    eosAPI.Resources.GetJobResourceToken({
        id: "1c5102d4-55fc-4a22-9136-18627cb7f88b",
        workspace: "Default",
    })
    .then(function(response) {
        var AccessToken = response.data;
    })
    

    .NET

    string apitoken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    string jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    ResourcesService resSvc = new ResourcesService("https://eos4.ecrion.com/");
    string resourceToken = resSvc.GetJobResourceToken(apitoken, jobId, "Default").AccessToken;
    

    Java

    String apitoken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    String jobId = "1c5102d4-55fc-4a22-9136-18627cb7f88b";
    ResourcesService resSvc = new ResourcesService("https://eos4.ecrion.com/");
    String resourceToken = resSvc.getJobResourceToken(apitoken, jobId, "Default").getAccessToken();
    

    HTTP

    curl -u "TOKEN:83b02efa-9253-413e-896b-d1011e5127fc" "https://eos4.ecrion.com/api/v2/resources/jobs?id=ba1f749d-0dd8-4f1f-9466-01a49204e87b&workspace=Default"
    

    Distribution

    EOS distributes the produced documents on various channels. Using this API you can inspect the email or print communication with your customers.

    GetEmailTickets

    Returns the list of tickets in email queues, optionally filtered by a queue name, ticket status, job status or job id. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/tickets/email

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Distribution.GetEmailTickets()
    .then(function(response) {
        var emailTickets = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    List<EmailTicketEntity> emailTickets = distribution.GetEmailTickets(token);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    List<EmailTicketEntity> emailTickets = distribution.getEmailTickets(token, null, null, null, null, null, 0, 10);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/tickets/email"
    

    __

    GetEmailTicket

    Returns an email ticket by its id. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/tickets/email/{id}

    Parameters

    Returns EmailTicketEntity

    Examples

    Javascript

    eosAPI.Distribution.GetEmailTicket({
        id: 1
    })
    .then(function(response) {
        var emailTicket = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    EmailTicketEntity emailTicket = distribution.GetEmailTicket(token, 1);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    EmailTicketEntity emailTickets = distribution.getEmailTicket(token, 1, null);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/tickets/email/1"
    

    __

    ResendEmailTicket

    Resends failed/bounced/complained/rejected/suspended email ticket with new to, cc, bcc or subject. Ecrion Develop Ecrion Converse Ecrion Engage

    POST /api/v2/tickets/email/{id}/resend

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Distribution.ResendEmailTicket({
        id: 123,
        request: {
            "To": "newaddress@mailserver.com"
        }
    })
    .then(function(response) {
        var httpCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    distribution.ResendEmailTicket(token, 123, new ResendEmailTicketEntity()
    {
        To = "newaddress@mailserver.com"
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    ResendEmailTicketEntity emailTicketEntity = new ResendEmailTicketEntity();
    emailTicketEntity.setTo("newaddress@mailserver.com");
    distribution.resendEmailTicket(token, 123, emailTicketEntity);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" -H "Content-Type: application/json" -X POST -d "{'To': 'newaddress@mailserver.com'}" "http://eos4.ecrion.com/api/v2/tickets/email/123/resend"
    

    __

    GetPrintTickets

    Returns the list of tickets in print queues, optionally filtered by a queue name, ticket status, job status or job id. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/tickets/print

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Distribution.GetPrintTickets()
    .then(function(response) {
        var emailTickets = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    List<PrintTicketEntity> emailTickets = distribution.GetPrintTickets(token);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    List<PrintTicketEntity> emailTickets = distribution.getPrintTickets(token, null, null, null, null, null, 0, 10);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/tickets/print"
    

    __

    GetPrintTicket

    Returns a print ticket by its id. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/tickets/print/{id}

    Parameters

    Returns PrintTicketEntity

    Examples

    Javascript

    eosAPI.Distribution.GetPrintTicket({
        id: 234
    })
    .then(function(response) {
        var emailTicket = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    PrintTicketEntity emailTicket = distribution.GetPrintTicket(token, 234);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    PrintTicketEntity emailTicket = distribution.getPrintTicket(token, 234, null);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/tickets/print/234"
    

    __

    ResendPrintTicket

    Resends failed/suspended print ticket with new printer name. Ecrion Develop Ecrion Converse Ecrion Engage

    POST /api/v2/tickets/print/{id}/resend

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Distribution.ResendPrintTicket({
        id: 234,
        request: {
            "PrinterName": "SV_PRNTR2"
        }
    })
    .then(function(response) {
        var httpCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    distribution.ResendPrintTicket(token, 234, new ResendPrintTicketEntity()
    {
        PrinterName = "SV_PRNTR2"
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    ResendPrintTicketEntity printTicket = new ResendPrintTicketEntity();
    printTicket.setPrinterName("SV_PRNTR2");
    distribution.resendPrintTicket(token, 234, printTicket);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" -H "Content-Type: application/json" -X POST -d "{'PrinterName': 'SV_PRNTR2'}" "http://eos4.ecrion.com/api/v2/tickets/print/234/resend"
    

    __

    GetTicketLogs

    Returns the list of logs in the email or print ticket. Ecrion Develop Ecrion Converse Ecrion Engage

    GET /api/v2/tickets/{id}/logs

    Parameters

    Returns LogMessageEntity[]

    Examples

    Javascript

    eosAPI.Distribution.GetTicketLogs({
        id: 1
    })
    .then(function(response) {
        var logs = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    List<LogMessageEntity> ticketLogs = distribution.GetTicketLogs(token, 1);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    DistributionService distribution = new DistributionService("https://eos4.ecrion.com/");
    List<LogMessageEntity> ticketLogs = distribution.getTicketLogs(token, 1, 0, 10);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "https://eos4.ecrion.com/api/v2/tickets/234/logs"
    

    Security

    EOS has the ability to give multiple users access to the system. Permissions are methods to protect users from each other. The system uses groups as a way to organize users, primarily as a security measure.

    Methods:

    Entities:

    GetUsers

    Returns the list of users from the current environment. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    GET api/v2/users

    Parameters

    Returns

    Examples

    Javascript

    // List all users in the current environment
    eosAPI.Security.GetUsers()
    .then(function(response) {
        var users = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    List<UserEntity> users = security.GetUsers(token);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    List<UserEntity> users = security.getUsers(token, 0, 10);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/users"
    

    __

    CreateUser

    Creates a new user in the current environment. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    POST api/v2/users

    Note: The authenticated user must have permission to manage the environment.

    Parameters

    Returns UserEntity

    Examples

    Javascript

    eosAPI.Security.CreateUser({
        user: {
            Email: "test@test.com"
        }
    })
    .then(function(response) {
        var user = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    UserEntity newUser = security.CreateUser(token, new UserRequestEntity()
    {
        Email = "test@test.com"
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    UserRequestEntity userRequest = new UserRequestEntity();
    userRequest.setEmail("test@test.com");
    UserEntity newUser = security.createUser(token, userRequest);
    

    HTTP

    curl -H "Content-Type: application/json" -X POST -d  "{'Email': 'user@company.com'}" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/users"
    

    __

    GetUser

    Returns a users by its id from the current environment. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    GET api/v2/users/{id}

    Parameters

    Returns

    Examples

    Javascript

    // Get the user with id=123 from the current environment
    eosAPI.Security.GetUser({
        id: 123
    })
    .then(function(response) {
        var user = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    UserEntity user = security.GetUser(token, 123);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    UserEntity user = security.getUser(token, 123);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/users/123"
    

    __

    UpdateUser

    Updates a user with the provided information. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    PUT api/v2/users/{id}

    Note: The authenticated user must have permission to manage the environment.

    Parameters

    Returns

    Examples

    Javascript

    // Change user's password
    eosAPI.Security.UpdateUser({
        id: 75,
        user: {
            Password: "n3wp@$$w0rd"
        }
    })
    .then(function(response) {
        var statusCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    UserEntity user = security.UpdateUser(token, 75, new UserRequestEntity()
    {
        Disabled = true
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    UserRequestEntity userRequest = new UserRequestEntity();
    userRequest.setDisabled(true);
    UserEntity user = security.updateUser(token, 75, userRequest);
    

    HTTP

    curl -H "Content-Type: application/json" -X PUT -d  "{LastName:'My new name'}" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/users/2"
    

    __

    DeleteUser

    Deletes a user by id. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    DELETE api/v2/users/{id}

    Note: The authenticated user must have permission to manage the environment.

    Parameters

    Returns

    Examples

    Javascript

    // Delete the user with id=75
    eosAPI.Security.DeleteUser({
        id: 75
    })
    .then(function(response) {
        var statusCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    security.DeleteUser(token, 75);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    security.deleteUser(token, 75);
    

    HTTP

    curl -X DELETE -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/users/1"
    

    __

    GetGroups

    Returns the list of groups in the current environment. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    GET api/v2/groups

    Parameters

    Returns

    Examples

    Javascript

    // List all groups in the current environment
    eosAPI.Security.GetGroups()
    .then(function(response) {
        var groups = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    List<GroupEntity> groups = security.GetGroups(token);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    List<GroupEntity> groups = security.getGroups(token, 0, 10, null);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/groups"
    

    __

    CreateGroup

    Creates a new group in the current environment. If provided, the permissions and users will be attached to the group. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    POST api/v2/groups

    Note: The authenticated user must have permission to manage the environment.

    Parameters

    Returns GroupEntity

    Examples

    Javascript

    eosAPI.Security.CreateGroup({
        group: {
            Name: "Sales",
            UserIds: [1, 2, 3, 4, 5]
        }
    })
    .then(function(response) {
        var group = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    GroupEntity group = security.CreateGroup(token, new GroupRequestEntity()
    {
        Name = "Sales"
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    GroupRequestEntity groupRequest = new GroupRequestEntity();
    groupRequest.setName("Sales");
    GroupEntity group = security.createGroup(token, groupRequest);
    

    HTTP

    curl -H "Content-Type: application/json" -X POST -d "{'Name':'Sales', 'Users':[1, 2, 3, 4, 5]}" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80" "http://eos4.ecrion.com/api/v2/groups"
    

    __

    GetGroup

    Returns a group by its id from the current environment. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    GET api/v2/groups/{id}

    Parameters

    Returns

    Examples

    Javascript

    // Get the group with id=23 from the current environment
    eosAPI.Security.GetGroup({
        id: 23,
        fields: "users"
    })
    .then(function(response) {
        var group = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    GroupEntity group = security.GetGroup(token, 23, "users");
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    GroupEntity group = security.getGroup(token, 23, "users");
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/groups/23"
    

    __

    UpdateGroup

    Updates a group with the provided information. Can be used to rename the group, change group permissions and add/remove users. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    PUT api/v2/groups/{id}

    Note: The authenticated user must have permission to manage the environment.

    Parameters

    Returns

    Examples

    Javascript

    // Change user's password
    eosAPI.Security.UpdateGroup({
        id: 75,
        group: {
            name: "US Sales"
        }
    })
    .then(function(response) {
        var statusCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    GroupEntity group = security.UpdateGroup(token, 75, new GroupRequestEntity()
    {
        Name = "US Sales"
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    GroupRequestEntity groupRequest = new GroupRequestEntity();
    groupRequest.setName("US Sales");
    GroupEntity group = security.updateGroup(token, 75, groupRequest);
    

    HTTP

    curl -H "Content-Type: application/json" -X PUT -d  "{name: 'US Sales'}" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/groups/75"
    

    __

    DeleteGroup

    Deletes a group by id. Ecrion Develop Ecrion Converse Ecrion Engage (not available in core-only installations)

    DELETE api/v2/groups/{id}

    Note: The authenticated user must have permission to manage the environment.

    Parameters

    Returns

    Examples

    Javascript

    // Delete the group with id=2
    eosAPI.Security.DeleteGroup({
        id: 2
    })
    .then(function(response) {
        var statusCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    security.DeleteGroup(token, 2);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    security.deleteGroup(token, 2);
    

    HTTP

    curl -X DELETE -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/groups/2"
    

    __

    Permissions

    Permissions can be granted to users and groups on both environment and workspace level.

    __

    GetPortalUsers

    Returns the list of portal users from the current environment. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.8 or later

    GET api/v2/portal/users

    Parameters

    Returns

    Examples

    Javascript

    // List all portal users in the current environment
    eosAPI.Security.GetPortalUsers()
    .then(function(response) {
        var portalUsers = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    List<PortalUserEntity> users = security.GetPortalUsers(token);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    List<PortalUserEntity> users = security.getPortalUsers(token, 0, 10);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/portal/users"
    

    __

    CreatePortalUser

    Creates a new portal user in the current environment. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.8 or later

    POST api/v2/portal/users

    Note: The authenticated user must have permission to manage the environment.

    Parameters

    Returns PortalUserEntity

    Examples

    Javascript

    eosAPI.Security.CreatePortalUser({
        user: {
            UserName: "portal.username",
            Password: "p0rt@l.p@$$w0rd"
        }
    })
    .then(function(response) {
        var portalUser = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
     PortalUserEntity newUser = security.CreatePortalUser(token, new PortalUserRequestEntity()
    {
        UserName = "portal.username",
        Password = "p0rt@l.p@$$w0rd"
    });
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    PortalUserRequestEntity portalUser = new PortalUserRequestEntity();
    portalUser.setUserName("portal.username");
    portalUser.setPassword("p0rt@l.p@$$w0rd");
    PortalUserEntity newUser = security.createPortalUser(token, portalUser);
    

    HTTP

    curl -H "Content-Type: application/json" -X POST -d  "{'UserName': 'portal.username', 'Password': 'p0rt@l.p@ssw0rd'}" -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/portal/users"
    

    __

    GetPortalUser

    Returns a portal users by its id from the current environment. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.8 or later

    GET api/v2/portal/users/{id}

    Parameters

    Returns

    Examples

    Javascript

    // Get the portal user with id=123 from the current environment
    eosAPI.Security.GetPortalUser({
        id: 123
    })
    .then(function(response) {
        var portalUser = response.obj;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    PortalUserEntity user = security.GetPortalUser(token, 123);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    PortalUserEntity user = security.getPortalUser(token, 123);
    

    HTTP

    curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/portal/users/123"
    

    __

    DeletePortalUser

    Deletes a portal user by id. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.8 or later

    DELETE api/v2/portal/users/{id}

    Note: The authenticated user must have permission to manage the environment.

    Parameters

    Returns

    Examples

    Javascript

    // Delete the portal user with id=12
    eosAPI.Security.DeletePortalUser({
        id: 12
    })
    .then(function(response) {
        var statusCode = response.status;
    })
    

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    security.DeletePortalUser(token, 12);
    

    Java

    String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    SecurityService security = new SecurityService("https://eos4.ecrion.com/");
    security.deletePortalUser(token, 12);
    

    HTTP

    curl -X DELETE -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "http://eos4.ecrion.com/api/v2/portal/users/12"
    

    Portal API Reference

    Available starting with version 9.1.3

    This Portal API reference is organized by services and resource type. Each service groups similar resources together and has one or more methods that changes these resources. All HTTP routes are relative to Portal Website base URI, e.g. api/v2/token refers to https://eos4portal.ecrion.com/api/v2/token.

    Authorization

    GetToken

    Generates a session token. Ecrion Develop Ecrion Converse Ecrion Engage

    GET api/v2/token

    To generate a session token, call this method and supply the user credentials (case sensitive) and environment name.

    The response contains a session token that needs to be passed via Authorization header using Basic <sessionTokenInbase64> format in order to authorize a generic endpoint. If you're using our Javascript, .NET or Java client API this process is simplified.

    Parameters

    Returns TokenEntity

    The session token has temporary purposes. Don't forget to delete it after you finish using the API by using DeleteToken endpoint.

    Examples

    Javascript

    If you're running Javascript inside a browser, you should avoid typing the credentials in plain text because the .js sources are available to the client. Instead, it is preferred to store the credentials on your server and do the authentication in a secure backend, passing only a sessionToken to the client, using authorizeWithToken utility.

    eosAPI.ready(function(){
        var sessionToken = obtainTokenFromMyBackend();
        eosAPI.authorizeWithToken(sessionToken);
        //all subsequent eosAPI calls will use the sessionToken
    })
    

    However, if you're using Javascript in a server-side environment or the credentials are provided by the client user, the authorize utility method is available. Internally, it calls Authorization.GetToken and uses the returned session token for all subsequent calls through the eosAPI global instance:

    eosAPI.authorize("portaluser", "portalpassword", "testEnvironment")
    .catch(function(response){
      // Handle any authentication errors here
      alert("Authentication failure: " + err.statusText);
    });
    eosAPI.authorized(function(){
      //all eosAPI calls will use the sessionToken obtained based on the credentials
    });
    

    The authorize method supports passing either three arguments, i.e. eosAPI.authorize(username, password, environment), or only one, following the format: eosAPI.authorize("environment#username:password").

    .NET

    string credentials = "portaluser:portalpassword";
    AuthorizationService authSvc = new AuthorizationService("https://eos4portal.ecrion.com/");
    string sessionToken = authSvc.GetToken(credentials, "testEnvironment").AccessToken;
    

    HTTP

    curl -u "portaluser:portalpassword" "https://eos4portal.ecrion.com/api/v2/token?environment=testEnvironment"
    

    __

    DeleteToken

    Delete a specific session token. Ecrion Develop Ecrion Converse Ecrion Engage version 9.1.4 or later

    DELETE api/v2/token

    Parameters

    Returns

    Examples

    Javascript

    eosAPI.Authorization.DeleteToken({
      accessToken: "PORTAL:c87ca566-2587-4480-8a7a-27531f04af80"
    })
    .then(function(response) {
      var status = response.status;
    });
    

    .NET

    AuthorizationService authSvc = new AuthorizationService("https://eos4portal.ecrion.com/");
    string sessionToken = authSvc.GetToken(credentials).AccessToken;
    authSvc.DeleteToken(sessionToken);
    

    HTTP

    curl -X DELETE "https://eos4portal.ecrion.com/api/v2/token?accessToken=PORTAL:c87ca566-2587-4480-8a7a-27531f04af80"
    

    __

    GetTokenSSO

    Generates a session token based on a SAML assertion or WS Federation Message Ecrion Develop Ecrion Converse Ecrion Engage

    POST /api/v2/token/sso

    Parameters are sent using form data:

    You must provide SAMLResponse or wresult.

    Returns

    __

    SAML Assertion Consumer

    Consumes a SAML Assertion Response. Also known as Assertion Consumer Service (ACS) Ecrion Develop Ecrion Converse Ecrion Engage

    POST /Security/ConsumeSAMLToken

    When configuring IdPs, use an absolute path, pointing to the right domain and port of the EOS Portal Website. This endpoint does not have a SDK method associated.

    Parameters are sent using form data:

    You must provide SAMLResponse or wresult.

    Returns

    Examples

    Salesforce as IdP

    This fills the ACS URL field in the Salesforce configuration: http://eos4portal.ecrion.com/Security/ConsumeSAMLToken


    Communications

    RunCommunication

    Runs a communication job. Ecrion Develop Ecrion Converse Ecrion Engage

    POST api/v2/communications

    Parameters

    Returns

    The endpoint will wait for the job to finish and return any rendered files. If the job output consists of more than one file, a ZIP archive will be returned.

    Examples

    Javascript

    eosAPI.Communications.RunCommunication({
      communicationName: "Telephone Invoice",
      file: new File(['<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <root></root>'], "JobInput.xml", {type: "text/xml"})
    })
    .then(function(response) {
      var content = response.data;
    });
    

    .NET

    CommunicationsService commSvc = new CommunicationsService("https://eos4portal.ecrion.com/");
    Stream output = commSvc.RunCommunication(sessionToken, "Request Quote");
    

    HTTP

    curl -X POST -H "Content-Type: multipart/form-data" -F "file=@C:\JobInput.xml" -u "PORTAL:964916ca-7c20-4203-b976-ce4adda50ddd" "https://eos4portal.ecrion.com/api/v2/communications?communicationName=Request%20Quote"
    

    Single Sign-On (SSO)

    This section describes the SAML instance where EOS is the service provider (SP) and uses 3rd party identity providers (IdP).

    Set up

    This set up applies to both Enterprise and Portal Websites.

    To set up EOS service provider SAML with 3rd party IdPs, step through the following process:

    1. Access the Sysadmin Website. Login as a sysadmin and go to Environments and select the environment you want to enable SSO for.
    2. Select SSO or Portal SSO based on which website you want to enable SSO for and click Configure SSO button.
    3. Select SAML 2.0 as SSO Type.
    4. Enter the IdP Login URL to setup IdP (identity provider). Use HTTPS. The Login Url is used when a user attempts to login. EOS triggers a redirect to the URL and expects a POST request with the SAML Assertion Response on the SAML Assertion Consumer endpoint, /Security/ConsumeSAMLToken. In response, the EOS service provider produces an EOS access token for the assertion subject and redirects the now authenticated user to EOS homepage.
    5. Provide the X.509 public key certificate in PEM format from the IdP. This establishes a trust relationship between the SP and the IdP. During runtime EOS uses the certificate to validate that the digital signature originated from the IdP.
    6. Optionally, you can provide a Logout URL.

    Portal

    EOS uses the information asserted in the SAML Assertion to identify the portal user. Additionally, EOS can keep certain parameters up to date, for e.g. updating the last name of the portal user in EOS service provider by reading the SAML Assertion last name attribute received from the IdP.

    To enable this behavior, you can map parameters to be linked with certain EOS portal user fields when you setup SSO.

    Creating EOS Portal Users on the fly

    If the SAML assertion subject is not associated with any EOS portal user then the EOS service provider will create a portal user.

    Using SSO API

    In some scenarios you might not want to use the URL redirection behavior provided by the SAML Assertion Consumer endpoint. For e.g., if you want to use SSO in a backend to backend system to obtain a session token in order to produce documents for a certain user. In this case, use Authorization.GetTokenSSO endpoint and pass the SAML Assertion to get an EOS enterprise/portal session token which can be used throughout the Enterprise/Portal API.

    SSO API Reference