NorthStar CCM (EngageCX 14/Ruby) API Guide
This documentation describes the Application Programming Interfaces (API v2) for the NorthStar CCM Platform version R2025 (formerly EngageCX 14/Ruby) and later.
Introducing NorthStar CCM API 2
Using this API, software programmers are able to produce documents in high volumes and manage customer communications, according to the different NorthStar CCM layers.
The following features are matching the MHC NorthStar CCM solution:
- Create Digital Experience Documents (DXD) for mobile devices and desktop computers
- Use interactive drill-down and intelligent analytics features
- Deliver personalized messages and marketing ads
- Track how end-customers are reading their documents
- Control document assembly and automation using workflows.
- Use the online version of the MHC Studio for improved collaboration.
- Create documents interactively by filling out forms.
- Create print streams for high-volume printers (Postscript, PDF or AFP).
- SMS, Email with CID images, PDF-X, HTML5 (responsive/interactive), JPEG.
- Distribute documents to end-customers via print, email, etc.
- Additional data integration (Salesforce, MS Dynamics).
MHC NorthStar CCM provides the following APIs:
JavaScript
for web programmers through the inclusion ofEcrion.EOS.Client.2.0.js
C#
for .NET programmers by adding a reference to theEcrion.EOS.Client.2.0.NET.dll
assemblyJava
for Java programmers through theEcrion.EOS.Client.2.0.Java.jar
package
Notes
The communication between these APIs and the NorthStar CCM server is performed through REST endpoints via HTTP or HTTPS.
80 (HTTP)
and 443 (HTTPS)
.HTTPS (port 443)
access is provided .Live REST API Documentation
The REST API is accompanied by a live documentation page which allows you to send requests in real time and examine the response.
To access the Live REST API Inspector:
- Sign in to the NorthStar CCM Enterprise Home website and access the
Developer
module. - Select the
Software
tile under the Tools group. - Click on the
REST API Inspector
tile and you will be redirected to the Live REST API page.
Getting Started
Authentication
NorthStar CCM uses API keys in order to authenticate requests made by clients. To manage API keys, from your NorthStar CCM home page, access the Developer module/API Keys.
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 NorthStar CCM SSO here.
Template management
NorthStar CCM uses document templates (.epr files created in NorthStar CCM Design Studio) to merge data points with layout and create personalized documents. This process is called document composition. Within NorthStar CCM Platform, templates are managed in a high-performance repository with versioning capabilities. Use the top-left menu to access your workspaces.
Using EngageCX 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:
<html>
<head>
<script src="https://eos4.ecrion.com/sdk/v2/javascript/EngageCX.EOS.Client.2.0.js"></script>
</head>
<body>
<script>
// JavaScript code that uses the EngageCX API
</script>
</body>
</html>
Using the API
The example below uses JavaScript to convert XML to PDF using a template stored on the NorthStar CCM server. An XML string is sent to the NorthStar CCM 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
obj
property contains the deserialized response. data
property contains the response bytes if it's binary. status
property contains the HTTP status code. .ready
or .authorized
wrappers..authorizeWithToken
utility instead of authorize
.eosAPI.sessionToken
.Using EngageCX .NET API
Downloading the API
In .NET you need to include a reference to Ecrion.EOS.Client.dll. To download the API, from your NorthStar CCM home page, access Developer module/Software.
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
,as default, or update this to your server URL
The code sample below uses NorthStar CCM API to convert XML to PDF using a template stored on the NorthStar CCM server. An XML string is sent to the NorthStar CCM 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 EngageCX 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 NorthStar CCM home page, access the Developer module/Software.
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.
The code snippet below uses NorthStar CCM API to convert XML to PDF using a template stored on the NorthStar CCM server. An XML string is sent to the NorthStar CCM 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 Enterprise 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
- Authorization.GetToken
- Authorization.DeleteToken
- Authorization.GetTokenSSO
- Authorization.GetTokenWindows
GetToken
Generates a session token.
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
Authorization
- User credentials (Required):<apiKey>
or<username>:<password>
or<environment>
#<username>
:<password>
If the user is added in multiple environments, the environment name is required; if not specified an error will be thrown.
Returns TokenEntity
AccessToken
- Session token ofstring
type that can be used in Authorization headers.
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.
If credentials are used on multiple environments, the environment name is required, i.e. eosAPI.authorize(username, password, environment)
.
.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.
For example → authSvc.GetToken(username + ":" + password)
If credentials are used on multiple environments, the environment name is required to authenticate.
For example → authSvc.GetToken(environment + "#" + 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
For example → authSvc.getToken(username + ":" + password)
If credentials are used on multiple environments, the environment name is required to authenticate.
For example → authSvc.GetToken(environment + "#" + 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
If credentials are used on multiple environments, the environment name is required to authenticate. Replace -u apiKey:
with -u environment#username:password
__
DeleteToken
Delete a specific session token. DELETE /api/v2/token
Parameters
accessToken
- TheTokenEntity.AccessToken
of typestring
to delete on the server. Required
Returns
204 (No Content)
- HTTP status code
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.
GET /api/v2/token/windows
To generate an access token, call this method and supply the environment name.
Parameters
environment
- The environment name. Required
Returns
This method applies for core-only installations if Enterprise login with Active Directory is enabled.
If AD user store synchronization is enabled, a user will automatically be created if the current AD user does not have an NorthStar CCM user synced yet. If synchronization is disabled and an NorthStar CCM 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.
POST /api/v2/token/sso
Parameters are sent using form data:
SAMLResponse
- Used in SAML 2.0. Contains the SAML xml in base64.wresult
- Used in WS Federation Message.environment
- The environment name. Optional if it can be autodetected. If no value is provided the system tries to obtain the value based on the Request URI, for e.g. if the environment is mapped to a subdomain. This is a query parameter (present in the URI).
You must provide SAMLResponse
or wresult
.
Returns
{!docs/Ruby/Direct Data.md!}
DirectRender
Render
Render input into a variety of output formats including PDF, Word, etc.
POST /api/v2/render
Render Parameters
request
of typeRenderRequestEntity
(Ecrion.EOS.API.V2.RenderRequestEntity)Required
- Input (Ecrion.EOS.API.V2.Input, optional) : Input Settings
- InputSettings (_Ecrion.EOS.API.V2.InputSettings, optional) : Input Settings
- HtmlInput (Ecrion.EOS.Extensions.HtmlInput, optional) : HTML Input
- PdfOutput (Ecrion.EOS.Extensions.PdfOutput, optional) : PDF Output
- AfpOutput (Ecrion.EOS.Extensions.AfpOutput, optional) : Afp Output
- HtmlOutput (Ecrion.EOS.Extensions.HtmlOutput, optional) : HTML Output
- TxtOutput (Ecrion.EOS.Extensions.TxtOutput, optional) : Text Output
- PngOutput (Ecrion.EOS.Extensions.PngOutput, optional) : PNG Output
- JpgOutput (Ecrion.EOS.Extensions.JpgOutput, optional) : JPG Output
- GifOutput (Ecrion.EOS.Extensions.GifOutput, optional) : GIF Output
- PrnOutput (Ecrion.EOS.Extensions.PrnOutput, optional) : PRN Output
- PsOutput (Ecrion.EOS.Extensions.PSOutput, optional) : PS Output
- WordmlOutput (Ecrion.EOS.Extensions.WordmlOutput, optional) : Wordml Output
- PptxOutput (Ecrion.EOS.Extensions.PptxOutput, optional) : Power Point Output
- DocxOutput (Ecrion.EOS.Extensions.DocxOutput, optional) : DOCX Output
- EpubOutput (Ecrion.EOS.Extensions.EpubOutput, optional) : E-PUB Output
- TiffOutput (Ecrion.EOS.Extensions.TiffOutput, optional) : TIFF Output
- IocaOutput (Ecrion.EOS.Extensions.IocaOutput, optional) : IOCA Output
- XpsOutput (Ecrion.EOS.Extensions.XpsOutput, optional) : XPS Output
- DicomOutput (Ecrion.EOS.Extensions.DicomOutput, optional) : DICOM Output
- SMSOutput (Ecrion.EOS.Extensions.SMSOutput, optional) : SMS Output
- ZPLOutput (Ecrion.EOS.Extensions.ZPLOutput, optional) : ZPL Output
Returns
binary data
- the output document, in a format determined by the request output settings.- The response header will return back the render statistics
x-render-stats-page-count
- shows the page count of the generated documentx-render-input-bytes-id
- returns the InputBytesID from the request, if specified
Input
- Ecrion.EOS.API.V2.Input - You can specify either a
Source
or a combination of anWorkspace
andPath
.Required
InputFormat
(string, optional) - Format of the source document- Allowed Values:
pdf
,xslfo
,svg
,xml
,wordml
,docx
,html
,eps
,dal
,das
,xfd
,excel
,json
- Allowed Values:
Source
(string, optional) - String representing the source document. Use BASE64 encoding if the source document is binary.Workspace
(string, optional) - The name of the workspace of your inputPath
(string, optional) - The input file path
Input Settings
- Ecrion.EOS.API.V2.InputSettings
ReferenceResolver
(string, optional) - Specifies the reference resolver behavior. The reference resolver is a separate pre-processing step which solves dynamic fields which are layout-dependent, e.g. page numbers, indexes. It can be set to run before starting to produce pages, in parallel with producing pages, or not at all (in which case some fields may not appear in the document). By default, it will use parallel if available (based on your license) or serial if not.- Allowed Values:
parallel
,serial
,disabled
- Default:
parallel
- Allowed Values:
FontErrors
(string, optional) - Specifies what to do when a font is not found. By default, it will use the default font, but it can also be set to throw an error.ImageErrors
(string, optional) - Specifies what to do when an image is not found or cannot be processed. By default, it will use a stock image, but it can also be set to throw an error or ignore the missing element and not render any placeholder.- Allowed Values:
usestock
,throw
,ignore
- Default:
usestock
- Allowed Values:
InputBytesID
(string, optional) - Helps correlate the request sent to the render in the log file. The value can be any string (e.g. a GUID); afterward you can search for it in the NorthStar CCM logs.- Template (Ecrion.EOS.API.V2.Template, optional) : Template
HTML Input
- Ecrion.EOS.Extensions.HtmlInput - HTML input settings
Encoding
(string, optional) - Specifies the character encoding of the input HTML document- Allowed Values:
utf8
,win1252
- Allowed Values:
PageWidth
(string, optional) - Specifies the page width as a length value or automatic.- Default:
auto
- Default:
PageHeight
(string, optional) - Specifies the page height as a length value or automatic.- Default:
auto
- Default:
PageMarginTop
(string, optional) - Specifies the page top margin as a length value.- Default:
1in
- Default:
PageMarginLeft
(string, optional) - Specifies the page left margin as a length value.- Default:
1in
- Default:
PageMarginRight
(string, optional) - Specifies the page right margin as a length value.- Default:
1in
- Default:
PageMarginBottom
(string, optional) - Specifies the page bottom margin as a length value.- Default:
1in
- Default:
PageHeaderMargin
(string, optional) - Specifies the page header margin as a length value.- Default:
0.5in
- Default:
PageFooterMargin
(string, optional) - Specifies the page footer margin as a length value.- Default:
0.5in
- Default:
ShowPageNumber
(boolean, optional_) - Specifies whether to render page numbers in the output.ShowTitle
(boolean, optional_) - Specifies whether to render page title in the output.
PDF Output
- Ecrion.EOS.Extensions.PdfOutput - Default output if none specified.
PrefixFontSubset
(boolean, optional) - Specifies whether to add prefixes to the names of subsetted fonts in the internal structure of the output PDF.EmbedTTF
(boolean, optional) - Specifies whether to embed TrueType fonts.HideToolbar
(boolean, optional) - Specifies whether to hide the PDF viewer menubar.HideMenubar
(boolean, optional) - Specifies whether to hide the PDF viewer menubar.HideWindowUI
(boolean, optional) - Specifies whether to hide the PDF viewer window UI.FitWindow
(boolean, optional) - Specifies whether the output PDF should fit the window when opened.CenterWindow
(boolean, optional) - Specifies whether the output PDF should center in the window when opened.DisplayDocTitle
(boolean, optional) - Specifies whether to display the title of the output PDF.Conformance
(string, optional) - Specifies the level of PDF conformance.- Allowed Values:
none
,pdfx
,pdfa-1a
,pdfa-1a-accesible
,pdfa-1b
,pdf508
,pdfx4p
,pdfx4
,pdfwcag2.0
,pdfwcag2.1
- Allowed Values:
Version
(string, optional) - Specifies the PDF version.- Allowed Values:
pdf16
,pdf14
,pdf15
,pdf17
- Default:
pdf16
- Allowed Values:
AllowPrinting
(boolean, optional) - If owner-password is set, this can be set to allow printing.AllowModifyContents
(boolean, optional) - If owner-password is set, this can be set to allow editing.AllowCopy
(boolean, optional) - If owner-password is set, this can be set to allow copying.AllowModifyAnnotations
(boolean, optional) - If owner-password is set, this can be set to allow manipulating annotations.AllowFillIn
((boolean, optional) - If owner-password is set, this can be set to allow filling in forms.AllowScreenReaders
(boolean, optional) - If owner-password is set, this can be set to allow screen readers.AllowAssembly
(boolean, optional) - If owner-password is set, this can be set to allow document assembly.AllowDegradedPrinting
(boolean, optional) - If owner-password is set, this can be set to allow degraded printing.ImageCompression
(string, optional) - Specifies the type of image compression.- Allowed Values:
jpeg
,flat
- Default:
jpeg
- Allowed Values:
OwnerPassword
(string, optional) - Set an owner password to a string value. This presents the user with a prompt to enter the password when attempting to edit the document. It is used in conjunction with the encryption-strength field and the allow-* fields to encrypt the document bytes and enable granular permissions on the document (although the password can be read from the document to decrypt the contents).UserPassword
(string, optional) - Set a user password to a string value. This presents the user with a prompt to enter the password when opening the document. It is used in conjunction with the encryption-strength field to encrypt the document bytes.PDFMergeFonts
(string, optional) - Specify the way fonts are generated in the final output. It is useful to reduce the size of the output when merging PDFs.- Allowed Values:
true
- set the font to be embedded,false
- set the font to not be embedded (it is based on the System Fonts from Windows),empty
- takes the font value from the configuration file.
- Allowed Values:
EncryptionsStrength
(integer, optional) - If a password is set, specifies the strength with which to encrypt the document.- Allowed Values:
48
,128
- Default:
48
- Allowed Values:
DigitalSignature
(boolean, optional) - Specifies if the PDF output generated is signed using a Digital Signature Certificate. Note that the Digital Signature needs to be configured in your Sysadmin website.
AFP Output
- Ecrion.EOS.Extensions.AfpOutput - Advanced Function Presentation output, where the formatting of the paper can be controlled by users and used in production variable data printing
CodePage
(string, optional) - Specify the AFP code page.- Allowed Values:
notset
,custom
,t1000808
,t1000892
,t1001250
,t1001252
,t1v10500
- Default:
notset
- Allowed Values:
ImageCompression
(string, optional) - Specify the image compression mode.- Allowed Values:
jpeg
,g4mmr
,ibm-mmr
,none
- Default:
jpeg
- Allowed Values:
ConvertToGrayscale
(boolean, optional) - Specifies whether to convert the document to grayscale.UseNativeRasterFonts
(boolean, optional) - Specifies whether to use native raster fonts.UseNativeOutlineFonts
(boolean, optional) - Specifies whether to use native outline fonts.ConvertToAfpRasterFonts
(boolean, optional) - Specifies whether to convert all fonts into native AFP raster fonts.ConvertToAfpOutineFonts
(boolean, optional) - Specifies whether to convert all fonts into native AFP outline fonts.AutoRotateLandscapePages
(boolean, optional) - Specifies whether to automatically rotate landscape pages.WriteSentinels
(boolean, optional) - Specifies whether to write sentinels.
HTML Output
- Ecrion.EOS.Extensions.HtmlOutput - HTML output that contains a web document
HideStaticContent
(boolean, optional) - Skip rendering of static content elements (headers, footers, etc.) in HTML output.GenerateHtmlDocument
(boolean, optional) - Specifies whether to wrap the generated HTML content to form a full HTML document, i.e. html, head, and body tags.UseFixedBodyWidth
(boolean, optional) - Specifies whether to use a fixed width to approximate a paginated document layout or a fluid layout based on the window size.RenderedImagesBaseUrl
(string, optional) - Specifies where to look for images and other resources linked with relative paths. All relative paths will be resolved relative to this URL. While not required, it is recommended for consistency. Defaults to the current directory.InteractiveWidgets
(boolean, optional) - Specifies whether to render BI widgets as interactive or static.RenderedImagesOutputFolder
(string, optional_) - Specifies the output folder for the rendered images.EmbedImageMode
(string, optional) - specifies how an image should be embedded in an HTML output.- Allowed Values:
base64
- Embeds images as base64 in html output,cid
- Makes zip with html and images,preserveurl
- If the input contains http/https referenced image it will preserve the URL in HTML output. **Note: The image that is embedded in base64 will remain embedded. ** - Default:
base64
- Allowed Values:
TXT Output
- Ecrion.EOS.Extensions.TxtOutput - Text Output that exports data to a text file
Encoding
(string, optional) - Specifies the output file encoding.- Allowed Values:
utf-8
,utf-16
,ascii
- Default:
ascii
- Allowed Values:
FormFeed
(boolean, optional) - Specifies whether to separate pages using the form feed character.IgnoreCssBoxAttributes
(boolean, optional) - Specifies whether to ignore CSS box attributes or perform layout on the document, spacing out the text vertically and horizontally in order to approximate the original layout.TrimPages
(boolean, optional) - Specifies whether to trim whitespace off pages.LineHeight
(number, optional) - Specifies the value in points to assume as the output's line height.- Default:
1.4
- Default:
FontSize
(integer, optional) - Specifies the value in points to assume as the output's font size.- Default:
9
- Default:
FontFamily
(integer, optional) - Specifies the font family to assume will be used in the output.- Default:
Courier New
- Default:
PNG Output
- Ecrion.EOS.Extensions.PngOutput - Portable Network Graphics standard of a lossless file format designed as a more open alternative to Graphics Interchange Format (GIF)
EncoderCompressionType
(string, optional) - Specifies the encoder compression type.- Allowed Values:
ca_none
,ca_ccitt3
,ca_ccitt4
,ca_lzw
,ca_rle
- Default:
ca_none
- Allowed Values:
TextRenderingHint
(string, optional) - Specifies the process used to render text by using the parameter below:SingleBitPerPixelGridFit
- Specifies that a character is drawn using its glyph ClearType bitmap with hintingSingleBitPerPixel
- Specifies that a character is drawn using its glyph bitmap without hintingAntiAliasGridFit
- Specifies that a character is drawn using its antialiased glyph bitmap with hinting. This results in much better quality due to antialiasingAntiAlias
- Specifies that a character is drawn using its antialiased glyph bitmap without hinting. Stem width differences may be noticeable because hinting is turned offClearTypeGridFit
- Specifies that a character is drawn using its glyph ClearType bitmap with hintingNone
- This is the default value. Specifies that a character is drawn using the currently selected system values for backward compatibility (i.e.: selected system font smoothing mode)
SmoothingMode
(string, optional) - Specifies the smoothing mode of the raster output- Allowed Values:
None
,Default
,AntiAlias
- Note: The SmoothingMode parameter works like a package combining together the selected value with an automatic value for the TextRenderingHint parameter in order to set up the rendering quality
- If SmoothingMode is
None
, TextRenderingHint will beSingleBitPerPixelGridFit
- If SmoothingMode is
Default
, TextRenderingHint will beNone
- If SmoothingMode is
AntiAlias
, TextRenderingHint will beAntiAlias
- If SmoothingMode is
- Allowed Values:
Zoom
(integer, optional) - Specifies the zoom level as a percentage.- Default:
100
- Default:
Resolution
(integer, optional) - Specifies the default resolution (DPI). The value 0 means automatic.- Default:
0
- Default:
ScaleWidth
(integer, optional) - Specifies the image width size in pixels.- Default:
-1
- Default:
ScaleHeight
(integer, optional) - Specifies the image height size in pixels.- Default:
-1
- Default:
TransparentBackground
(boolean, optional) - Specifies whether or not to use a transparent background.
JPG Output
- Ecrion.EOS.Extensions.JpgOutput - Joint Photographic Group standard of a lossy graphics file
EncoderCompressionType
(string, optional) - Specifies the encoder compression type.- Allowed Values:
ca_none
,ca_ccitt3
,ca_ccitt4
,ca_lzw
,ca_rle
- Default:
ca_none
- Allowed Values:
TextRenderingHint
(string, optional) - Specifies the process used to render text by using the parameter below:SingleBitPerPixelGridFit
- Specifies that a character is drawn using its glyph ClearType bitmap with hintingSingleBitPerPixel
- Specifies that a character is drawn using its glyph bitmap without hintingAntiAliasGridFit
- Specifies that a character is drawn using its antialiased glyph bitmap with hinting. This results in much better quality due to antialiasingAntiAlias
- Specifies that a character is drawn using its antialiased glyph bitmap without hinting. Stem width differences may be noticeable because hinting is turned offClearTypeGridFit
- Specifies that a character is drawn using its glyph ClearType bitmap with hintingNone
- This is the default value. Specifies that a character is drawn using the currently selected system values for backward compatibility (i.e.: selected system font smoothing mode)
SmoothingMode
(string, optional) - Specifies the smoothing mode of the raster output- Allowed Values:
None
,Default
,AntiAlias
- Note: The SmoothingMode parameter works like a package combining together the selected value with an automatic value for the TextRenderingHint parameter in order to set up the rendering quality
- If SmoothingMode is
None
, TextRenderingHint will beSingleBitPerPixelGridFit
- If SmoothingMode is
Default
, TextRenderingHint will beNone
- If SmoothingMode is
AntiAlias
, TextRenderingHint will beAntiAlias
- If SmoothingMode is
- Allowed Values:
Zoom
(integer, optional) - Specifies the zoom level as a percentage.- Default:
100
- Default:
Resolution
(integer, optional) - Specifies the default resolution (DPI). The value 0 means automatic.- Default:
0
- Default:
ScaleWidth
(integer, optional) - Specifies the image width size in pixels.- Default:
-1
- Default:
ScaleHeight
(integer, optional) - Specifies the image height size in pixels.- Default:
-1
- Default:
TransparentBackground
(boolean, optional) - Specifies whether or not to use a transparent background.EncoderCompressionQuality
(integer, optional) - Specifies an integer value between0
to100
GIF Output
- Ecrion.EOS.Extensions.GifOutput - Graphics Interchange Format output of a bitmap image
EncoderCompressionType
(string, optional) - Specifies the encoder compression type.- Allowed Values:
ca_none
,ca_ccitt3
,ca_ccitt4
,ca_lzw
,ca_rle
- Default:
ca_none
- Allowed Values:
TextRenderingHint
(string, optional) - Specifies the process used to render text by using the parameter below:SingleBitPerPixelGridFit
- Specifies that a character is drawn using its glyph ClearType bitmap with hintingSingleBitPerPixel
- Specifies that a character is drawn using its glyph bitmap without hintingAntiAliasGridFit
- Specifies that a character is drawn using its antialiased glyph bitmap with hinting. This results in much better quality due to antialiasingAntiAlias
- Specifies that a character is drawn using its antialiased glyph bitmap without hinting. Stem width differences may be noticeable because hinting is turned offClearTypeGridFit
- Specifies that a character is drawn using its glyph ClearType bitmap with hintingNone
- This is the default value. Specifies that a character is drawn using the currently selected system values for backward compatibility (i.e.: selected system font smoothing mode)
SmoothingMode
(string, optional) - Specifies the smoothing mode of the raster output- Allowed Values:
None
,Default
,AntiAlias
- Note: The SmoothingMode parameter works like a package combining together the selected value with an automatic value for the TextRenderingHint parameter in order to set up the rendering quality
- If SmoothingMode is
None
, TextRenderingHint will beSingleBitPerPixelGridFit
- If SmoothingMode is
Default
, TextRenderingHint will beNone
- If SmoothingMode is
AntiAlias
, TextRenderingHint will beAntiAlias
- If SmoothingMode is
- Allowed Values:
Zoom
(integer, optional) - Specifies the zoom level as a percentage.- Default:
100
- Default:
Resolution
(integer, optional) - Specifies the default resolution (DPI). The value 0 means automatic.- Default:
0
- Default:
ScaleWidth
(integer, optional) - Specifies the image width size in pixels.- Default:
-1
- Default:
ScaleHeight
(integer, optional) - Specifies the image height size in pixels.- Default:
-1
- Default:
TransparentBackground
(boolean, optional) - Specifies whether or not to use a transparent background.
PRN Output
- Ecrion.EOS.Extensions.PrnOutput - Print Files that can be read by printer devices
PrinterName
(string, optional) - Specifies the printer name.OutputPrintFile
(string, optional) - Specifies the name of the output print file name.PrintJobName
(string, optional) - Specifies the name of the printer job.InputTray
(string, optional) - Specifies the input tray from which the printer selects the paper source.OutputTray
(string, optional) - Specifies the printer output tray.PrintingMode
(string, optional) - Specifies the printing mode.auto
lets the printer decide.- Allowed Values:
auto
,simplex
,duplex
- Default:
auto
- Allowed Values:
ColorMode
(string, optional) - Specifies the color mode.auto
lets the printer decide.- Allowed Values:
auto
,color
,monochrome
- Default:
auto
- Allowed Values:
ManualTray
(boolean, optional) - Specifies whether the input tray is a manually operated tray.CopyCount
(integer, optional) - Specifies how many copies to print.- Default:
1
- Default:
PS Output
- Ecrion.EOS.Extensions.PSOutput - PostScript format output, formatted as a page description language in the electronic publishing and desktop publishing business
Wordml Output
- Ecrion.EOS.Extensions.WordmlOutput - Word Processing Markup Language output
PPTX Output
- Ecrion.EOS.Extensions.PptxOutput - PowerPoint formatted presentation output
DOCX Output
- Ecrion.EOS.Extensions.DocxOutput - Word output format
EPUB Output
- Ecrion.EOS.Extensions.EpubOutput - Online format for creating fluid-content digital books (ebooks)
TIFF Output
- Ecrion.EOS.Extensions.TiffOutput - TIFF files stored in bitmap format that export shaded images
EncoderCompressionType
(string, optional) - Specifies the encoder compression type.- Allowed Values:
ca_none
,ca_ccitt3
,ca_ccitt4
,ca_lzw
,ca_rle
- Default:
ca_none
- Allowed Values:
TextRenderingHint
(string, optional) - Specifies the process used to render text by using the parameter below:SingleBitPerPixelGridFit
- Specifies that a character is drawn using its glyph ClearType bitmap with hintingSingleBitPerPixel
- Specifies that a character is drawn using its glyph bitmap without hintingAntiAliasGridFit
- Specifies that a character is drawn using its antialiased glyph bitmap with hinting. This results in much better quality due to antialiasingAntiAlias
- Specifies that a character is drawn using its antialiased glyph bitmap without hinting. Stem width differences may be noticeable because hinting is turned offClearTypeGridFit
- Specifies that a character is drawn using its glyph ClearType bitmap with hintingNone
- This is the default value. Specifies that a character is drawn using the currently selected system values for backward compatibility (i.e.: selected system font smoothing mode)
SmoothingMode
(string, optional) - Specifies the smoothing mode of the raster output- Allowed Values:
None
,Default
,AntiAlias
- Note: The SmoothingMode parameter works like a package combining together the selected value with an automatic value for the TextRenderingHint parameter in order to set up the rendering quality
- If SmoothingMode is
None
, TextRenderingHint will beSingleBitPerPixelGridFit
- If SmoothingMode is
Default
, TextRenderingHint will beNone
- If SmoothingMode is
AntiAlias
, TextRenderingHint will beAntiAlias
- If SmoothingMode is
- Allowed Values:
Zoom
(integer, optional) - Specifies the zoom level as a percentage.- Default:
100
- Default:
Resolution
(integer, optional) - Specifies the default resolution (DPI). The value 0 means automatic.- Default:
0
- Default:
ScaleWidth
(integer, optional) - Specifies the image width size in pixels.- Default:
-1
- Default:
ScaleHeight
(integer, optional) - Specifies the image height size in pixels.- Default:
-1
- Default:
TransparentBackground
(boolean, optional) - Specifies whether or not to use a transparent background.
IOCA Output
- Ecrion.EOS.Extensions.IocaOutput - Image Object Content Architecture output for representing images, including conventions and directions for processing and interchanging image information
XPS Output
- Ecrion.EOS.Extensions.XpsOutput - Open XML Paper Specification output
DICOM Output
- Ecrion.EOS.Extensions.DicomOutput - Digital Imaging and Communications in Medicine, a standard for handling, storing, printing, and transmitting information in medical imaging
SMS Output
- Ecrion.EOS.Extensions.SMSOutput - Short Messaging Service files that allows bidirectional file synchronization with a phone
Encoding
- Specifies the output file encoding.- Allowed Values:
utf-8
,utf-16
,ascii
- Default:
ascii
- Allowed Values:
ZPL Output
- Ecrion.EOS.Extensions.ZPLOutput - A Zebra Print Label format that can be used by many label printers
zplPrinterDpi
(number, optional) - Specifies the printer resolution.- Allowed Values:
203
,152
,300
,600
- Default:
203
- Allowed Values:
Input Template
- Ecrion.EOS.API.V2.Template
Workspace
(string, optional) - The workspace namePath
(string, optional) - The file pathLanguageId
(string, optional) - Language idPreserveWhitespace
(string, optional) - Specifies if whitespace is preserved in the template.- Allowed Values:
Yes
,No
- Allowed Values:
XSLTEngine
(string, optional) - The XSL Transformation EngineMSXML
- A very fast XSL 1.0 engine; support for JavaScript.DotNet20
- An XSL Engine used to create compiled XSLT Templates.Saxon
- An XSL Engine best for low memory consumption; support for XSL 1.0 and XSL 2.0. No support for Java
UseCompileTemplates
(boolean, optional) - Optimizes the Server Templates by generating a cache with the compiled template and reduces compilation time at every Render step.- Allowed Values:
true
,false
- Allowed Values:
TemplateParameters
(object, optional) - A key-value mapping that sets template parameters.Name
- Template parameter nameValue
- Template parameter value
Page Count
Returns the page count of the result of a render task.
POST /api/v2/pagecount
Parameters
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
NorthStar CCM Repository stores all assets involved in document production (images, templates, stylesheets, etc.) in a file repository. The NorthStar CCM 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:
- Repository.DownloadFile
- Repository.UploadFile
- Repository.GetFiles
- Repository.UpdateFile
- Repository.DeleteFile
- Repository.GetFileVersions
- Repository.RestoreFileVersion
- Repository.ExportFolder
- Repository.ImportFolder
- Repository.CreateFolder
- Repository.GetFolders
- Repository.UpdateFolder
- Repository.LookUpFolder
- Repository.GetFolderPermissions
- Repository.UpdateFolderPermissions
- Repository.DeleteFolder
- Repository.GetTags
- Repository.RemoveTag
- Repository.AddTag
- Repository.UpdateWorkspace
- Repository.DeleteWorkspace
- Repository.CreateWorkspace
- Repository.GetWorkspaces
- Repository.GetWorkspace
- Repository.GetFileDependencies
Entities:
- FileEntity
- FolderEntity
- WorkspaceEntity
- WorkspaceRequestEntity
- FileDependenciesEntity
- FolderPermissionsEntity
GetFileDependencies
Gets the dependencies of a file.
GET /api/v2/files/dependencies
Parameters
workspace
- Workspace name Requiredpath
- File path Requiredrecursive
- If it is set to "true", all the dependencies will be included.fields
- Comma separated types of dependencies to include. By default:includeExisting
. Other accepted:includeMissing
.
Returns FileDependenciesEntity
ExistingDependencies
- List of FileEntity with the existing dependencies of a file.MissingDependencies
- List of FileEntity with the missing dependencies of a file.
Examples
JavaScript
eosAPI.Repository.GetFileDependencies({
workspace: "Default",
path: "Retail/Bookstore Invoice/Main.wk4"
})
.then(function(response) {
var dependencies = response.obj;
})
.NET
string token = "TOKEN:f6592d5d-eb1f-49e2-9884-6dfad30bfd34";
RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
List<FileEntity> dependencies = repo.GetFileDependencies(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
Java
String token = "TOKEN:f6592d5d-eb1f-49e2-9884-6dfad30bfd34";
RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
java.util.List<FileEntity> dependencies = repo.GetFileDependencies(token, "Default", "Retail/Bookstore Invoice/Main.wk4");
HTTP
curl -u "TOKEN:f6592d5d-eb1f-49e2-9884-6dfad30bfd34" "https://eos4.ecrion.com/api/v2/files/dependencies?workspace=Default&path=Retail%2FBookstore%20Invoice%5CMain.wk4&recursive=false"
DownloadFile
Download a file from NorthStar CCM repository.
GET /api/v2/files/content
Parameters
workspace
- Workspace name Requiredpath
- File path Requiredversion
- Specify the version of the file you want to get. If no version is specified, the latest file version available will be returned.
Returns
binary data
- File bytes
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 local file to NorthStar CCM repository.
POST /api/v2/files/content
Parameters
workspace
- Workspace name. Requiredpath
- File path. Requiredfile
- File bytes. Requiredcomments
- The comments of a file.
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 NorthStar CCM repository.
GET /api/v2/files
Parameters
workspace
- Workspace name. Requiredpath
- Path to the folder containing the files or a file path1. Requiredfields
- A comma separated list of additional fields to be included.- Allowed Values:
tags
- Default:
null
- Allowed Values:
tagName
- Name of the tag to search for. If tag is specified2 the endpoint will perform an in depth search of specified folder path.- Default:
null
- Default:
tagValue
- Value of the tag to search for. If tag is specified2 the endpoint will perform an in depth search of specified folder path.- Default:
null
- Default:
start
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
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[]
-
The list of files
Path
- Path to the fileWorkspace
- The workspace name in which the file is locatedAuthor
- The name of the author of the current versionLockedBy
- The name of the user that locked the current fileCreatedDate
- The date when the current version was created (see Date Format)Type
- A friendly file type name (e.g."PDF File"
)Bytes
- The file size in bytesSize
- A human-readable description of the file sizeTags
- List ofTagEntity
file tags IF asked for. Otherwise it'snull
Name
- Name of the tagValue
- Value of the tag
Version
- The 1-based version indexComments
- The comments of the file version
-
TagEntity[]
- The list of tagsName
- Name of the tagValue
- Value of the tag
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
Performs an action on a file: rename, copy or move.
PUT /api/v2/files
Parameters
workspace
- Workspace name. Requiredpath
- Path to the file on which to perform the action. RequiredfileOperation
- of typeFileOperationEntity
. RequiredPath
- The new file path. RequiredAction
- The action to perform on file. Can berename
,copy
ormove
. RequiredOverwrite
- Specifies how to resolve the conflict if the new file path exists- Allowed values:
true
,false
- Default:
false
- Allowed values:
Returns
204 (No Content)
- HTTP status code
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
Deletes a file from NorthStar CCM repository.
DELETE /api/v2/files
Parameters
workspace
- Workspace name Requiredpath
- The path of the file to be deleted Required
Returns
204 (No Content)
- HTTP status code
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.
GET /api/v2/files/versions
Parameters
workspace
- Workspace name. Requiredpath
- NorthStar CCM file path. Required
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. This method creates a new version of the file with the content of the provided file version.
POST /api/v2/files/versions
Parameters
workspace
- Workspace name. Requiredpath
- The file path. Requiredrequest
- The file version to restore. RequiredVersion
- The 1-based version index to restore.
Returns
204 (No Content)
- HTTP status code
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 NorthStar CCM repository.
GET /api/v2/folders/content
Parameters
workspace
- Workspace name. Requiredpath
- Path to the folder to be exported. Required
Returns
binary data
- the zip file
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 at a specific path destination.
POST /api/v2/folders/content
Parameters
workspace
- Workspace name. Requiredpath
- Folder path. RequiredimportTags
- Import the tags folder- Allowed values:
true
,false
.
- Allowed values:
file
- Zip file bytes. Requiredcomments
- The comments of the file.
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"
__
LookupFolder
Returns a list of recursive folders or/and files in the specified ancestor path and workspace.
GET /api/v2/folders/lookup
Parameters
workspace
- Workspace name. Requiredpath
- File or folder path. RequiredincludeFolders
- Include folders in output.includeFiles
- Include files in output.start
- Start index.count
- Number of results.
Returns RepositoryItemEntity[]
Workspace
- The workspace name in which the item is located.Path
- Path to the folder.CreatedDate
- Date when the item was created or modified (see Date Format).Type
- The type of the entity, e.g 'folder' or 'file'.
Examples
JavaScript
eosAPI.Repository.LookupFolders({
workspace: "Default",
path: "Design\Retail"
})
.then(function(response) {
var status = response.status;
})
.NET
string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
List<RepositoryItemEntity> content = repo.LookupFolder(token, "Default", "Design\Retail");
Java
String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
List<RepositoryItemEntity> content = repo.LookupFolder(token, "Default", "Design\Retail");
HTTP
curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/folders/lookup?workspace=Default&path="
GetFolderPermissions
Returns a list of folder permissions for specified path and workspace.
GET /api/v2/folders/permissions
Parameters
workspace
- Workspace name. Requiredpath
- Folder path. Required
Returns FolderPermissionsEntity[]
UserId
- The user id of the person that has permissions to a folder.GroupId
- The group id that the user belongs to.Permissions
- Permissions in an array of strings when the permission(s) were created or modified.
Examples
JavaScript
// List all permissions for a folder
eosAPI.Repository.GetFolderPermissions({
workspace: "Default",
path: "Retail/Bookstore Invoice"
})
.then(function(response) {
var permissions = response.obj;
})
.NET
string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
List<FolderPermissionsEntity> permissions = repo.GetFolderPermissions(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<FolderPermissionsEntity> permissions = repo.getFolderPermissions(token, "Default", "Retail/Bookstore Invoice", 0, 10);
HTTP
curl -u "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80:" "https://eos4.ecrion.com/api/v2/folders/permissions?workspace=Default&path=Retail"
UpdateFolderPermissions
Update folder permissions. Permissions could be: "Folder Read", "Folder Write", "Folder Delete", "File Read", "File Write", "File Delete". If body is empty or is an empty arrary, folder permssions will be reset. UserId and GroupId are mutual exclusive.
POST /api/v2/folders/permissions
Parameters
workspace
- Workspace name. Requiredpath
- Folder path. Requiredpermissions
- Folder permissions in an array model.
Returns
204 (No Content)
- HTTP status code
Examples
JavaScript
eosAPI.Repository.UpdateFolderPermissions({
workspace: "Default",
path: "Retail/Bookstore Invoice",
permissions:
[
{
"UserId": 1,
"Permissions": [
"Delete Folder"
]
}
]
})
.then(function(response) {
var status = response.status;
})
.NET
String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
List<FolderPermissionsEntity> permissions = new ListList<FolderPermissionsEntity>();
List<String> flags = new List<String>
{
"Read Folder",
"Read Files"
};
repo.UpdateFolderPermissions(token, folderEntity.Workspace, folderEntity.Path, permissions);
Java
String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService repo = new RepositoryService("https://eos4.ecrion.com/");
List<FolderPermissionsEntity> permissions = new ListList<FolderPermissionsEntity>();
List<String> flags = new List<String>
{
"Read Folder",
"Read Files"
};
repo.UpdateFolderPermissions(token, folderEntity.Workspace, folderEntity.Path, permissions);
HTTP
curl -H "Content-Type: application/json" -X POST -d "[ GroupId : 2, Permissions: [ "Folder Read", "Folder Write", "Folder Delete" ] ]" -u token: "https://eos4.ecrion.com/api/v2/folders/permissions?workspace=Default&path=Retail"
CreateFolder
Creates and returns the new folder.
POST /api/v2/folders
Parameters
workspace
- Workspace name. Requiredpath
- The path of the folder to be created. Required
Returns FolderEntity
Path
- Path to the folderWorkspace
- Workspace name in which the folder is locatedCreatedDate
- Date when the folder was created (see Date Format)FilesCount
- Total number of files inside the folder (non recursive)FoldersCount
- Total number of folders inside the folder (non recursive)
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.
GET /api/v2/folders
Parameters
workspace
- Workspace name. Requiredpath
- Folder path. Requiredstart
- Start indexcount
- Number of results
Returns
FolderEntity[]
- A list of FolderEntity
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
Performs an action on a folder: rename, copy or move.
PUT /api/v2/folders
Parameters
workspace
- Workspace name. Requiredpath
- Path to the folder on which to perform the action. RequiredfolderOperation
- The operation to be performed on the folder, of typeFolderOperationEntity
. RequiredPath
- The new folder path. RequiredAction
- The action to perform on folder. Can be rename, copy, move. Required
Returns
204 (No Content)
- HTTP status code
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
Removes a folder.
DELETE /api/v2/folders
Parameters
workspace
- Workspace name. Requiredpath
- Folder path. Required
Returns
204 (No Content)
- HTTP status code
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
Returns a list of tags for the specified path.
GET /api/v2/files/tags
Parameters
workspace
- Workspace name. Requiredpath
- File or folder path. Required
Returns
TagEntity[]
- The list of tagsName
- Name of the tagValue
- Value of the tag
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.
POST /api/v2/files/tags
Parameters
workspace
- Workspace name. Requiredpath
- File or folder path. Requiredtag
- The tag of typeTagEntity
to be added. RequiredName
- Name of the tag. RequiredValue
- Value of the tag. Required
Returns
204 (No Content)
- HTTP status code
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.
DELETE /api/v2/files/tags
Parameters
workspace
- Workspace name. Requiredpath
- File or folder path. Requiredtag
- The tag of typeTagEntity
to be removed. RequiredName
- Name of the tag. RequiredValue
- Value of the tag. Required
Returns
204 (No Content)
- HTTP status code
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"
GetWorkspaces
Returns a list of workspaces from the NorthStar CCM repository, available to the current authenticated user.
GET /api/v2/workspaces
Parameters
start
- Enter the starting index after which you want to display the results.- Default:
0
- Default:
count
- Enter the number of results you want to display.- Default:
Int32.MaxValue
- Default:
Returns WorkspaceEntity[]
Name
- The workspace nameDescription
- The workspace description
Examples
JavaScript
// List all workspaces available to the current authenticated user
eosAPI.RepositoryService.GetWorkspaces()
.then(function(response) {
var files = response.obj;
})
.NET
// List all workspaces available to the current authenticated user
string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
List<WorkspaceEntity> workspaces = service.GetWorkspaces(token);
Java
String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
java.util.List<WorkspaceEntity> workspaces = service.getWorkspaces(token);
HTTP
curl -u token "http://eos4.ecrion.com/api/v2/workspaces"
GetWorkspace
Returns the workspace by name.
GET /api/v2/workspaces/{name}
Parameters
name
- Enter the workspace name. Required
Returns WorkspaceEntity
Name
- The workspace nameDescription
- The workspace description
Examples
JavaScript
// Display the workspace requested by name by the current authenticated user
eosAPI.RepositoryService.GetWorkspace("Default")
.then(function(response) {
var workspace = response.obj;
})
.NET
// Display the workspace requested by name by the current authenticated user
string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
WorkspaceEntity workspace = service.GetWorkspace(token, "Default");
Java
String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
java.util.WorkspaceEntity workspace = service.getWorkspace(token, "Default");
HTTP
curl -u token "http://eos4.ecrion.com/api/v2/workspaces?name=Default"
CreateWorkspace
Creates a new workspace in the NorthStar CCM repository and returns the new workspace created.
POST /api/v2/workspaces
Parameters
workspace
of typeWorkspaceRequestEntity
. RequiredName
: Provide a name for the workspace you want to create. RequiredDescription
: Enter a description that highlights the workspace's purpose.
Returns WorkspaceEntity
Name
: Provide a name for the workspace request you want to create. RequiredDescription
: Enter a description that highlights the workspace request purpose.
Examples
JavaScript
eosAPI.RepositoryWorkspaces.CreateWorkspace({
workspace:{
name: "Development",
description: "Custom workspace created with Rest API"
}
})
.then(function(response) {
var folder = response.obj;
})
.NET
string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
service.CreateWorkspace(token,
new WorkspaceRequestEntity()
{
Name = "Development",
Description = "Custom workspace created with Rest API"
});
Java
String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
WorkspaceRequestEntity entity = new WorkspaceRequestEntity();
entity.setName("Development");
entity.setDescription("Custom workspace created with Rest API");
service.createWorkspace(token,entity);
HTTP
curl -H "Content-Type: application/json" -X POST -d "{ 'Name':'Default' , 'Description':'This is the default workspace for your organization.' }" -u token: "http://eos4.ecrion.com/api/v2/workspaces"
__
DeleteWorkspace
Delete a workspace from the NorthStar CCM repository.
DELETE /api/v2/workspaces
Parameters
name
- Enter the workspace name that you want to remove from the NorthStar CCM repository. Required
Returns
204 (No Content)
- HTTP status code
Examples
JavaScript
eosAPI.RepositoryWorkspaces.DeleteWorkspace({
name: "Default"
})
.then(function(response) {
var status = response.status;
})
.NET
string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
service.DeleteWorkspace(token, "Default");
Java
String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
service.deleteWorkspace(token, "Default");
HTTP
curl -X DELETE -u token: "http://eos4.ecrion.com/api/v2/workspaces?name=Default"
__
UpdateWorkspace
Update the name or description of a workspace from the NorthStar CCM Repository.
PUT /api/v2/workspaces
Parameters
name
- Enter the name of the workspace you want to update. Requiredworkspace
- The operation to be performed on the workspace, of typeWorkspaceRequestEntity
. RequiredName
- The new workspace name. RequiredDescription
- The new workspace description.
Returns
204 (No Content)
- HTTP status code
Examples
JavaScript
eosAPI.RepositoryService.UpdateWorkspace({
name: "Default",
workspace: {
Name: "Development",
Description: "This is the Default workspace renamed"
}
})
.then(function(response) {
var status = response.status;
})
.NET
string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
service.UpdateWorkspace(token, "Default",
new WorkspaceRequestEntity()
{
Name = "Development",
Description = "This is the Default workspace renamed"
});
Java
String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
RepositoryService service = new RepositoryService("https://eos4.ecrion.com/");
WorkspaceRequestEntity entity = new WorkspaceRequestEntity();
entity.setName("Development");
entity.setDescription("This is the Default workspace renamed");
service.updateFolder(token, "Default", entity);
HTTP
curl -H "Content-Type: application/json" -X PUT -d "{ 'Name':'Default' , 'Description':'This is the default workspace for your organization.' }" -u token: "http://eos4.ecrion.com/api/v2/workspaces?name=Default"
Jobs
Methods:
- Jobs.GetJobs
- Jobs.Lookup
- Jobs.CreateJob
- Jobs.RunJob
- Jobs.GetJob
- Jobs.DeleteJob
- Jobs.GetJobInput
- Jobs.DeleteJobInput
- Jobs.DownloadJobInput
- Jobs.UploadJobInput
- Jobs.GetJobOutput
- Jobs.DownloadJobOutput
- Jobs.GetJobLogs
- Jobs.CreateJobLog
- Jobs.UnshareJob
- Jobs.GetJobShare
- Jobs.ShareJob
Entities:
GetJobs
Returns a list of jobs from the specified communication type, communication name or workspace.
GET /api/v2/jobs
Parameters
type
- Communication type- Allowed values:
Interactive
,Batch
,OnDemand
- Allowed values:
communication
- Communication nameworkspace
- Workspace namestatus
- Job status- Allowed values:
Starting
,WaitingForInput
,Processing
,WaitingForTask
,FinishedWithErrors
,FinishedOK
,Aborted
- Allowed values:
author
- The user's username which created the job.start
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
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
JobEntity[]
- A list of JobEntity
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.
POST /api/v2/jobs/lookup
Parameters
request
- Lookup jobs request parameters, of typeLookupJobsRequest
. RequiredType
- Communication type- Allowed values:
Interactive
,Batch
,OnDemand
- Allowed values:
Communication
- Communication nameWorkspace
- Workspace nameStatus
- Job status- Allowed values:
Starting
,WaitingForInput
,Processing
,WaitingForTask
,FinishedWithErrors
,FinishedOK
,Aborted
- Allowed values:
Author
- The user's username which created the job.Tags
- Job tags, a list ofTagEntity
.Start
- Start index- Default:
0
- Default:
Count
- Number of results- Default:
Int32.MaxValue
- Default:
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
JobEntity[]
- A list of JobEntity
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 "Starting" state and returns it.
POST /api/v2/jobs
Parameters
job
- Information about the new job, of typeJobRequestEntity
. RequiredWorkflow
- The workflow (.wk4 file) to create a job from. Either aWorkflow
or aCommunication
is required.Workspace
- The workspace name in which the workflow is located.Path
- Workflow path.
Communication
- The communication name to create job from. Either aWorkflow
or aCommunication
is required.Parameters
- A list ofJobParameter
.Name
- Parameter name.Value
- Parameter value.
Tags
- A list ofTagEntity
.
Returns JobEntity
Id
- Job idName
- Job friendly nameAuthor
- The user's username that started the jobStartDate
- Date when job started (see Date Format).EndDate
- Date when job ended (see Date Format).Duration
- Duration of the job (see Duration Format).Progress
- An integer between0
and100
indicating the progress percentage. A value of-1
is returned if something went wrong while determining the progress.Status
- Job current status- Allowed values:
Starting
,WaitingForInput
,Processing
,WaitingForTask
,FinishedWithErrors
,FinishedOK
,Aborted
- Allowed values:
Workflow
- File path of the workflow that was used to generate the job.Workspace
- Job's workspace. Same as workflow's workspace.Communication
- Communication nameType
- Communication typeManualOutcome
- Last manual step outcome executed in the workflow, e.g.Approved
,Rejected
CurrentStep
- The current job step being executed, of typeJobStepEntity
. If the job status isFinishedOK
this isnull
.Id
- Job step idName
- Job step friendly nameType
- The type of the job step. Possible values are:GetData
,Render
,Email
,SMS
,Print
,Custom
,WebRequest
,If
,ReviewDocument
,ReviewSnapshot
,Issue
,Task
,Merge
,Tag
,Archive
,Decompress
,CreateSnapshot
,DeleteSnapshot
,PublishSnapshot
,Group
,Append
,RunWorkflow
,CreateCommunication
,CreateInteractiveDocument
,Maintenance
,ElectronicSignature
,Overlay
,CopyToFTP
,CopyToEOSFolder
,CopyToFolder
,CopyToSharepoint
,CopyToAmazonS3
,PostToSocialMedia
etc.TaskId
- If this is a manual step (e.g.ReviewDocument
,ReviewSnapshot
,Issue
,Task
) it contains the id of the newly created task.
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 into "Processing" state.
POST /api/v2/jobs/{id}/run
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Requiredsync
- Iftrue
, the api will not return until the job is finished
Returns
- JobEntity - The updated job, in
Processing
state.
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.
GET /api/v2/jobs/{id}
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Required
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.
DELETE /api/v2/jobs/{id}
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Required
Returns
204 (No Content)
- HTTP status code
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.
GET /api/v2/jobs/{id}/input
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Required
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.
DELETE /api/v2/jobs/{id}/input
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Required
Returns
204 (No Content)
- HTTP status code
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.
GET /api/v2/jobs/{id}/input/content
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Required
Returns
binary data
- File bytes
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.
POST /api/v2/jobs/{id}/input/content
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. RequiredinputFileName
- The input file name.file
- The file to be uploaded. The parameter accepts other files than XMLs, by specifying the input file name above.comments
- The comments of the file.
Returns
FileEntity[]
- A list of FileEntity
Examples
JavaScript
eosAPI.Jobs.UploadJobInput({
id:"1c5102d4-55fc-4a22-9136-18627cb7f88b",
workspace: "Default",
inputFileName: "MyFileName.xml",
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";
string inputFileName = "MyFileName.xml";
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", "MyFileName.xml", 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", "MyFileName.xml", 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.
GET /api/v2/jobs/{id}/output
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Requiredfields
- A comma separated list of additional fields to be included.- Allowed Values :
tags
- Default: null
- Allowed Values :
Returns
FileEntity[]
- A list of FileEntity
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 zip file that archive a folder from the NorthStar CCM repository.
GET /api/v2/jobs/{id}/output/content
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. RequiredincludeInputs
- Allowed values
true
- The zip will contain all folders.false
- The zip will include only the outputs in a flat folder.
- Default:
true
- Allowed values
Returns
binary data
- the zip file
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.
GET /api/v2/jobs/{id}/logs
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Requiredstart
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
Returns
LogMessageEntity[]
- A list of LogMessageEntity
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.
POST /api/v2/jobs/{id}/logs
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. RequiredstepId
- A job step id to associate the log message with.logMessage
- The log message, of typeLogMessageRequestEntity
. RequiredSeverity
- The severity of the message. Required- Allowed Values:
DiagnosticTrace
,Error
,Information
,None
,Warning
.
- Allowed Values:
Content
- The log message content. Required
Returns
201 (Created)
- HTTP status code
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
WaitingForInput
- job is created and it waits for an input (set by Jobs.CreateJob)Starting
– a created job is queued for execution (set by Jobs.RunJob async)Processing
– a job is executing (set by the job service when it actually starts the execution)WaitingForTask
– a job which is executing is waiting for a task to transitionFinishedOK, FinishedWithErrors
– a job finished executing (set by Jobs.RunJob sync)Aborted
– a job was stopped explicitly by the user or by the service shut down
__
UnshareJob
Removes the share for a job with portal/anonymous users.
DELETE /api/v2/jobs/{id}/share
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Requiredrequest
- Remove access to shared jobs. RequiredPublic
- Remove the access of the shared folder. Iftrue
, the job will no longer be shared.PortalUsers
- Provide a list of Contacts ID. IfNULL
, no user will be able to view the job.
Returns
204 (No Content)
- HTTP status code
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.
GET /api/v2/jobs/{id}/share
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Required
Returns FileShareResponse
PublicUrl
- Url for anonymous accessPublicId
- An unique identifier for the shared resourcePortalUrl
- Url for portal usersPortalUsers
- List of Contacts ID.
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 job with portal/anonymous users
POST api/v2/jobs/{id}/share
Parameters
id
- Job's id. Requiredworkspace
- Job's workspace name. Requiredrequest
- Provide permission for a specific job. RequiredPublic
- Make the job public to other users. Add it only for anonymous usersPortalUsers
- Provides a list of Contacts ID. IfNULL
, the job will be shared with all users.PublicId
- Optional GUIDTitle
- Title of the Portal.Category
- Category from Portal Website- Allowed Values -
Documents
,Forms
,Analytics
.
- Allowed Values -
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/");
FileShareResponse file = new FileShareResponse();
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"
-
DirectJobs
CreateJobs
Run a transient job in an synchronous mode and return the output. Direct Jobs resemble with DirectRender and Jobs. If the workflow is not configured to be run in [transient mode], the request will fail.
POST /api/v2/directjobs
Parameters
job
of typeDirectJobRequestEntity
RequiredWorkflow
- The workflow (.wk4 file) to create a job from. Either aWorkflow
or aCommunication
is required.Workspace
- The workspace name in which the workflow is located.Path
- Workflow path.
Communication
- The communication name to create job from. Either aWorkflow
or aCommunication
is required.Parameters
- A list of JobParameter.Name
- Parameter name.Value
- Parameter value.
Tags
- A list ofTagEntity
Name
- Tag NameValue
- Tag Value
Source
- The input for a job.ArchiveOutput
- Set if output will be archived or not. If multiple outputs are generated, only one file will be returned. By default, it is false.
Returns
binary data
- the output document, in a format determined by the request output settings. If multiple files are generated, an archive will be returned.
Examples
JavaScript
eosAPI.Jobs.CreateJob({
request: {
WorkflowFileEntity{
Workspace : "Default",
Path: "Design\Telephone Invoice\Main.wk4"
}
}
})
.then(function(response)) {
var content = response.data;
})
.NET
JobsService jobSvc = new JobsService("https://eos4.ecrion.com/");
//Create a new request
DirectJobRequestEntity request = new DirectJobRequestEntity();
request.Workflow = new WorkflowFileEntity();
request.WorkflowFileEntity.Workspace = "Default" ;
request.WorkflowFileEntity.Path = "Design\Telephone Invoice\Main.wk4";
//Send the request
Stream content = jobSvc.CreateJob(sessionToken, request);
Java
JobsService jobSvc = new JobsService("https://eos4.ecrion.com");
//Create a new request
DirectJobRequestEntity request = new DirectJobRequestEntity();
WorkflowFileEntity workflow = new WorkflowFileEntity();
workflow.setWorkspace("Default");
workflow.setPath("Design\Telephone Invoice\Main.wk4");
request.setWorkflow(workflow);
//Send the request
java.io.InputStream response = jobSvc.createJob(sessionToken, request);
HTTP
curl -H "Content-Type: application/json" -X POST -d "{ 'Workflow': { 'Workspace':'Default', 'Path':'Design\Telephone Invoice\Main.wk4'} }" -u token: "http://eos4.ecrion.com/api/v2/jobs"
Resources
Methods:
Entities:
GetJobResourceToken
Returns the resource token associated with job.
GET /api/v2/resources/jobs
Parameters
id
- Job id Requiredworkspace
- Workspace name Required
Returns ResourceTokenEntity
AccessToken
- Resource token ofstring
type
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
NorthStar CCM distributes the produced documents on various channels. Using this API you can inspect the email or print communication with your customers.
- Distribution.GetEmailTickets
- Distribution.GetEmailTicket
- Distribution.ResendEmailTicket
- Distribution.GetPrintTickets
- Distribution.GetPrintTicket
- Distribution.ResendPrintTicket
- Distribution.GetTicketLogs
GetEmailTickets
Returns the list of tickets in email queues, optionally filtered by a queue name, ticket status, job status or job id.
GET /api/v2/tickets/email
Parameters
queue
- The queue name. If specified, the results will be filtered after the queue.- Default:
null
- Default:
status
- The ticket status. If specified, the results will be filtered after the ticket status. You can specify multiple values using commas. Case insensitive.- Allowed Values:
Waiting
,Processing
,Failed
,Sent
,Suspended
,Bounced
,Delivered
,Complained
,Rejected
,Read
,Clicked
,Opt-Out
,Suspended
- Default:
null
- Allowed Values:
job
- The job id. If specified, the results will be filtered after the job.- Default:
null
- Default:
jobStatus
- The job status. If specified, the results will be filtered after the job status. Case insensitive.- Allowed Values:
Starting
,WaitingForInput
,Processing
,WaitingForTask
,FinishedWithErrors
,FinishedOK
,Aborted
- Default:
null
- Allowed Values:
fields
- A comma separated list of additional fields to be included.- Allowed Values:
content
,tags
,logs
- Default:
null
- Allowed Values:
start
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
Returns
EmailTicketEntity[]
- A list of EmailTicketEntity
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 from the current environment.
GET /api/v2/tickets/email/{id}
Parameters
id
- The id of the email ticket. Requiredfields
- A comma separated list of additional fields to be included.- Allowed Values:
content
,tags
,logs
- Default:
null
- Allowed Values:
Returns EmailTicketEntity
Id
- A unique id to identify this ticketFrom
- The sender email address.To
- Recipient email address.Cc
- Cc recipient email address.Bcc
- Bcc recipient email address.Subject
- Email subject.Attachments
- List ofEmailAttachmentEntity
Name
- The name of the attachment.Workspace
- The workspace name in which the document is located in EOS repository.Path
- The path to the document in EOS repository.
AttachmentsAsLinks
- If this is true, the body uses links to the files instead of attaching them.Content
- Email content, of typeEmailContentEntity
IF asked forBody
- The HTML email message body or the plain text email message body.IsHTML
- Specifies if the email body is html or not.
Priority
- The delivery priority- Allowed Values:
Now
,High
,Low
, andNormal
.
- Allowed Values:
Status
- The status of the ticket- Allowed Values:
Failed
,Processing
,Delivered
.
- Allowed Values:
StartDate
- The date when the ticket was created (see Date Format).EndDate
- The date when the ticket finished distributing (see Date Format).QueueName
- The name of the queue this ticket is part of.JobId
- The id of the job this ticket was generated from.Tags
- List ofTicketTagEntity
IF asked for. Otherwise it'snull
Name
- Name of the tag.Value
- Value of the tag.
Logs
- List of LogMessageEntity IF asked for. Otherwise it'snull
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.
POST /api/v2/tickets/email/{id}/resend
Parameters
id
- The id of the email ticket. Requiredrequest
- Information about how to resend the ticket, of typeResendEmailTicketEntity
. RequiredTo
- The new recipient email address if specifiedCc
- The new cc recipient email address if specifiedBcc
- The new bcc recipient email address if specifiedSubject
- The new email subject if specified
Returns
204 (No Content)
- HTTP status code
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.
GET /api/v2/tickets/print
Parameters
queue
- The queue name. If specified, the results will be filtered after the queue.- Default:
null
- Default:
status
- The ticket status. If specified, the results will be filtered after the ticket status. You can specify multiple values using commas. Case insensitive.- Allowed Values:
Waiting
,Processing
,Failed
,Sent
,Suspended
- Default:
null
- Allowed Values:
job
- The job id. If specified, the results will be filtered after the job.- Default:
null
- Default:
jobStatus
- The job status. If specified, the results will be filtered after the job status. Case insensitive.- Allowed Values:
Starting
,WaitingForInput
,Processing
,WaitingForTask
,FinishedWithErrors
,FinishedOK
,Aborted
- Default:
null
- Allowed Values:
fields
- A comma separated list of additional fields to be included.- Allowed Values:
tags
,logs
- Default:
null
- Allowed Values:
start
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
Returns
PrintTicketEntity[]
- A list of PrintTicketEntity
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 from the current environment.
GET /api/v2/tickets/print/{id}
Parameters
id
- A unique id to identify this ticket. Requiredfields
- A comma separated list of additional fields to be included.- Allowed Values:
tags
,logs
- Default:
null
- Allowed Values:
Returns PrintTicketEntity
Id
- A unique id to identify this ticket.Workspace
- The workspace name in which the document is located in EOS repository.Path
- The path to the document in EOS repository.PrinterName
- The printer's name.InputTray
- The input tray of the printer.ManualTray
- If true, it uses the manual tray.PrinterMode
- The printer mode * Allowed Values:Auto
,Simplex
orDuplex
.Copies
- The number of copies.ColorMode
- Specify whether printing is in color or in monochrome mode.- Allowed Values:
Auto
,Color
orMonochrome
.
- Allowed Values:
Orientation
- Specify whether documents are printed in portrait or landscape mode- Allowed Values:
Auto
,Portrait
orLandscape
.
- Allowed Values:
Priority
- The delivery priority- Allowed Values:
Now
,High
,Low
, andNormal
.
- Allowed Values:
Status
- The status of the ticket- Allowed Values:
Failed
,Processing
,Delivered
.
- Allowed Values:
StartDate
- The date when the ticket was created (see Date Format).EndDate
- The date when the ticket finished distributing (see Date Format).QueueName
- The name of the queue this ticket is part of.JobId
- The id of the job this ticket was generated from.Tags
- List ofTicketTagEntity
IF asked for. Otherwise it'snull
Name
- Name of the tag.Value
- Value of the tag.
Logs
- List of LogMessageEntity IF asked for. Otherwise it'snull
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 a new printer name.
POST /api/v2/tickets/print/{id}/resend
Parameters
id
- The id of the print ticket. Requiredrequest
- Information about how to resend the ticket of typeResendPrintTicketEntity
. RequiredPrinterName
- The new printer name if specifiedRemotePrinterServer
- The NorthStar CCM remote printer to be defined in the Administration area.
Returns
204 (No Content)
- HTTP status code
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.
GET /api/v2/tickets/{id}/logs
Parameters
id
- The ticket it. Requiredstart
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
Returns LogMessageEntity[]
Severity
- The severity of the message.- Allowed Values:
DiagnosticTrace
,Error
,Information
,None
,Warning
.
- Allowed Values:
Content
- The log message content.CreatedDate
- The date when the message was logged (see Date Format).
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
NorthStar CCM 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:
- Security.GetUsers
- Security.CreateUser
- Security.GetUser
- Security.UpdateUser
- Security.DeleteUser
- Security.GetGroups
- Security.CreateGroup
- Security.GetGroup
- Security.UpdateGroup
- Security.DeleteGroup
- Security.GetPortalUsers
- Security.CreatePortalUser
- Security.GetPortalUser
- Security.DeletePortalUser
Entities:
- UserRequestEntity
- UserEntity
- GroupRequestEntity
- GroupEntity
- PermissionsEntity
- PortalUserRequestEntity
- PortalUserEntity
GetUsers
Returns the list of users from the current environment.
GET /api/v2/users
Parameters
start
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
groupName
- Filter by a group name- Default:
null
- Default:
fields
- A comma separated list of additional fields to be included.- Allowed values:
nogroups
,onlyorkspaceswithpermissions
- Default:
null
- Allowed values:
Returns
UserEntity[]
- A list of UserEntity
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.
POST /api/v2/users
Note: The authenticated user must have permission to manage the environment.
Parameters
user
of typeUserRequestEntity
. RequiredUserName
- The username of the user. This needs to be unique and it is used to log in. If not specified, the email will be used as username.Email
- The user's email address. RequiredPassword
- The user's password. If this is null the server will auto generate a password.FirstName
- The user's first name.LastName
- The user's last name.Job
- Describes user's job title or position.Phone
- The user's phone number.AuthenticationMethod
- Which authentication method the user is using.- Allowed values:
domain
,default
.
- Allowed values:
GroupsIds
- A list of ids of the groups for the user to join. If the current authenticated user can't manage the environment this field is ignored.Permissions
- Permissions explicitly granted to the user (see Permissions). If the current authenticated user can't manage the environment this field is ignored.Disabled
- Iftrue
, the user can't log in the environment.- Allowed values:
true
,false
. - Default:
false
.
- Allowed values:
fields
- A comma separated list of additional fields to be included.- Allowed values:
nogroups
,onlyworkspaceswithpermissions
- Default:
null
- Allowed values:
Returns UserEntity
Id
- The id of the user account. This id is unique.UserName
- The username of the user. This is unique and it is used to log in.FullName
- The user's full name. This is determined based on first and last name.FirstName
- The user's first name.LastName
- The user's last name.Email
- The user's email address.Job
- Describes user's job title or position.Phone
- The user's phone number.LastLogInDate
- The date when the user last logged in (see Date Format) or0001-01-01T00:00:00+00:00
if the user never logged in.AuthenticationMethod
- Which authentication method the user is using.- Allowed values:
domain
,default
.
- Allowed values:
Permissions
- Permissions explicitly granted to the user (see Permissions).Groups
- The groups the user is member of. List ofUserGroupEntity
Id
- The id of the group. This id is unique.Name
- Name of the group.
Disabled
- Iftrue
, the user can't log in the environment.- Allowed values:
true
,false
. - Default:
false
.
- Allowed values:
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.
GET /api/v2/users/{id}
Parameters
id
- The id of the user account. Requiredfields
- A comma separated list of additional fields to be included.- Allowed values:
nogroups
,onlyworkspaceswithpermissions
- Default:
null
- Allowed values:
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.
PUT /api/v2/users/{id}
Note: The authenticated user must have permission to manage the environment.
Parameters
id
- The user's id. Requireduser
- The user information to be updated, of typeUserRequestEntity
. RequiredUserName
- The username of the user. This needs to be unique and it is used to log in. If not specified, the email will be used as username.Email
- The user's email address.Password
- The user's password. If this is null the server will auto generate a password.FirstName
- The user's first name.LastName
- The user's last name.Job
- Describes user's job title or position.Phone
- The user's phone number.AuthenticationMethod
- Which authentication method the user is using.- Allowed values:
domain
,default
.
- Allowed values:
GroupsIds
- A list of ids of the groups for the user to join. If the current authenticated user can't manage the environment this field is ignored.Permissions
- Permissions explicitly granted to the user (see Permissions). If the current authenticated user can't manage the environment this field is ignored.Disabled
- Iftrue
, the user can't log in the environment.- Allowed values:
true
,false
. - Default:
false
.
- Allowed values:
Returns
- UserEntity - The updated user
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.
DELETE /api/v2/users/{id}
Note: The authenticated user must have permission to manage the environment.
Parameters
id
- The user's id. Required
Returns
204 (No Content)
- HTTP status code
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.
GET /api/v2/groups
Parameters
start
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
fields
- A comma separated list of additional fields to be included.- Allowed values:
users
,nouserids
,onlyworkspaceswithpermissions
- Default:
null
- Allowed values:
Returns
GroupEntity[]
- A list of GroupEntity
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.
POST /api/v2/groups
Note: The authenticated user must have permission to manage the environment.
Parameters
group
of typeGroupRequestEntity
. RequiredName
- Name of the group. RequiredPermissions
- Permissions granted to the group. Users part of this group with no explicit permissions defined will inherit these permissions. If the current authenticated user can't manage the environment this field is ignored. (see Permissions)UsersIds
- The users ids which are part of the group. This field is ignored if it'snull
.
fields
- A comma separated list of additional fields to be included.- Allowed values:
users
,nouserids
,onlyworkspaceswithpermissions
- Default:
null
- Allowed values:
Returns GroupEntity
Id
- The id of the group. This id is unique.Name
- The Name of the groupPermissions
- Describes the group's permissions (see Permissions).UsersIds
- The users ids which are part of the groupUsers
- List of UserEntity which are part of this group IF asked for. Otherwise it'snull
.
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.
GET /api/v2/groups/{id}
Parameters
id
- The id of the group. Requiredfields
- A comma separated list of additional fields to be included.- Allowed values:
users
,nouserids
,onlyworkspaceswithpermissions
- Default:
null
- Allowed values:
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.
PUT /api/v2/groups/{id}
Note: The authenticated user must have permission to manage the environment.
Parameters
id
- The user's id. Requiredgroup
- The group information to be updated, of typeGroupRequestEntity
. RequiredName
- Name of the group.Permissions
- Permissions granted to the group. Users part of this group with no explicit permissions defined will inherit these permissions. If the current authenticated user can't manage the environment this field is ignored. (see Permissions)UsersIds
- The users ids which are part of the group. This field is ignored if it'snull
.
Returns
- GroupEntity - The updated group
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.
DELETE /api/v2/groups/{id}
Note: The authenticated user must have permission to manage the environment.
Parameters
id
- The group's id. Required
Returns
204 (No Content)
- HTTP status code
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.
PermissionsEntity
- Permissions explicitly granted to the user or the group. If the user is also part of a group, both group permissions and explicit user permission are considered when authorizing.EnvironmentPermissions
- Describes the user's or group's permissions in the environment, of typeEnvironmentPermissionsEntity
.ManagePortal
- Allowed values
true
- The user or group can manage the Portal Website. This includes changing how the Portal looks and managing Portal users.false
- The permission flag is not set
- Allowed values
ManageEnvironment
- Allowed values
true
- The user or group can manage the current environment. This will override all other permissions totrue
, including workspace permissions.false
- The permission flag is not set
- Allowed values
WorkspacePermissions[]
- Describes the user's or group's permissions in the workspaces, of typeWorkspacePermissionsEntity[]
Workspace
- The current workspace name for which the permissions are enumeratedAccessWorkspace
- Allowed values
true
- The user can access the current workspace.false
- The permission flag is not set
- Allowed values
ManageWorkspace
- Allowed values
true
- The user can manage the current workspace. This also implies access to the workspace.false
- The permission flag is not set.
- Allowed values
__
GetPortalUsers
Returns the list of portal users from the current environment.
GET /api/v2/portal/users
Parameters
start
- Start index- Default:
0
- Default:
count
- Number of results- Default:
Int32.MaxValue
- Default:
Returns
PortalUserEntity[]
- A list of PortalUserEntity
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.
POST /api/v2/portal/users
Note: The authenticated user must have permission to manage the environment.
Parameters
user
of typePortalUserRequestEntity
. RequiredUserName
- The username of the portal user. This needs to be unique and it is used to log in. RequiredPassword
- The user's password. RequiredContactSynchronizationId
- Unique identifier of this contact in an external system used for synchronization purposes. For example, if EOS is synchronized with Salesforce, this field would be the contact or lead id.ContactProperties
- Additional properties to set on the contact that is automatically created and associated with the portal user.
Returns PortalUserEntity
Id
- The id of the portal user account. This id is unique.UserName
- The username of the portal user. This is used to log in.Email
- The email of the portal user. This is computed based on the associated contact.DisplayName
- The display name of the portal user. This is computed based on the associated contact.Contact
- The contact associated with the portal user, of typeContactEntity
Id
- The id of the contact. This id is unique.SynchronizationId
- Unique identifier of this contact in an external system used for synchronization purposes. For example, if EOS is synchronized with Salesforce, this field would be the contact or lead id.Properties
- The properties of the contact.
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.
GET /api/v2/portal/users/{id}
Parameters
id
- The id of the portal user account. Required
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.
DELETE /api/v2/portal/users/{id}
Note: The authenticated user must have permission to manage the environment.
Parameters
id
- The portal user's id. Required
Returns
204 (No Content)
- HTTP status code
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.
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
Authorization
- User credentials (<portalusername>:<password>
). Requiredenvironment
- Environment name. Required
Returns TokenEntity
AccessToken
- Session token ofstring
type
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.
DELETE /api/v2/token
Parameters
accessToken
- TheTokenEntity.AccessToken
of typestring
to delete on the server. Required
Returns
204 (No Content)
- HTTP status code
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.
POST /api/v2/token/sso
Parameters are sent using form data:
SAMLResponse
- Used in SAML 2.0. Contains the SAML xml in base64.wresult
- Used in WS Federation Message.environment
- The environment name. Optional if it can be autodetected. If no value is provided the system tries to obtain the value based on the Request URI, for e.g. if the environment is mapped to a subdomain. This is a query parameter (present in the URI).
You must provide SAMLResponse
or wresult
.
Returns
__
SAML Assertion Consumer
Consumes a SAML Assertion Response. Also known as Assertion Consumer Service (ACS).
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:
SAMLResponse
- Used in SAML 2.0. Contains the SAML xml in base64.wresult
- Used in WS Federation Messageenvironment
- The environment name. Optional if it can be autodetected. If no value is provided the system tries to obtain the value based on the Request URI, for e.g. if the environment is mapped to a subdomain. This is a query parameter (present in the URI).
You must provide SAMLResponse
or wresult
.
Returns
- Redirects the authenticated user to the Portal homepage.
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.
POST /api/v2/communications
Parameters
communicationName
- Communication name; must be shared with the user. Requiredfile
- File bytes.
Returns
binary data
- The communication job output
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 NorthStar CCM is the service provider (SP) and uses 3rd party identity providers (IdP).
Set up
Set up SAML
This set up applies to both Enterprise and Portal Websites.
To set up NorthStar CCM service provider SAML with 3rd party IdPs, step through the following process:
- Access the Enterprise Website. Login as an enterprise user and go to the
Admin
Settings page and access theSSO
under Sysinternals. - Select
Setup Enterprise SSO
orSetup Portal SSO
based on which website you want to enable SSO for. - Select
SAML 2.0
as SSO Type.- Enter the IdP Login URL to setup IdP (identity provider). Use HTTPS. The Login Url is used when a user attempts to login. NorthStar CCM 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 NorthStar CCM service provider produces an NorthStar CCM access token for the assertion subject and redirects the now authenticated user to NorthStar CCM homepage. - Optionally, you can provide a Logout URL.
- 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 NorthStar CCM uses the certificate to validate that the digital signature originated from the IdP.
- Enter the IdP Login URL to setup IdP (identity provider). Use HTTPS. The Login Url is used when a user attempts to login. NorthStar CCM triggers a redirect to the URL and expects a POST request with the SAML Assertion Response on the SAML Assertion Consumer endpoint,
- Once ready, select
Next
to proceed with the Users Mapping configuration. SelectAdd new mapping
to map fields within NorthStar CCM.- Select the available user profile fields from the drop-down list and then,
- Enter in the related empty field, the correspondent Identity Provider attribute issued for mapping.
- Once ready, select
Save and continue
. In the last step, a notification will inform you about the SSO connection if it was successful or not. To ensure that the Single Sign-On is set correctly, select theLogin now using SSO
button. You will be redirected to the Identity Provider sign in page. Log in to the IdP website. - Once ready, in the SSO Wizard, select
Finish
to save the changes.
Set up WS-Federation
To set up NorthStar CCM service provider WS-Federation with 3rd party IdPs, step through the following process:
- Access the Enterprise Website. Login as an enterprise user and go to the
Admin
Settings page and access the SSO under Sysinternals. - Select
Setup Enterprise SSO
orSetup Portal SSO
based on which website you want to enable SSO for. - Select
WS-Federation
as SSO Type and proceed with the SSO Configuration Wizard:IdP Login URL
: Enter the URL associated with logging in to the Identity Provider address. Login URL is used when a user attempts to login with SSO. NorthStar CCM triggers a redirect to the URL and expects a POST request. In response, the NorthStar CCM Platform produces an NorthStar CCM access token for the assertion subject and redirects the now authenticated user to the NorthStar CCM Homepage.IdP Logout URL
: Optionally, you can provide a logout URL from your Identity Provider. This will validate the request to the IdP.
- Once ready, select
Next
to proceed with the Users Mapping configuration. SelectAdd new mapping
to map fields within NorthStar CCM.- Select the available user profile fields from the drop-down list and then,
- Enter in the related empty field, the correspondent Identity Provider attribute issued for mapping.
- Once ready, select
Save and continue
. In the last step, a notification will inform you about the SSO connection if it was successful or not. To ensure that the Single Sign-On is set correctly, select theLogin now using SSO
button. You will be redirected to the Identity Provider sign in page. Log in to the IdP website. - Once ready, in the SSO Wizard, select
Finish
to save the changes.
Portal
NorthStar CCM uses the information asserted in the SAML Assertion to identify the portal user. Additionally, NorthStar CCM can keep certain parameters up to date, for e.g. updating the last name of the portal user in NorthStar CCM 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 NorthStar CCM portal user fields when you setup SSO.
Creating NorthStar CCM Portal Users on the fly
If the SAML assertion subject is not associated with any NorthStar CCM portal user then the NorthStar CCM 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 NorthStar CCM enterprise/portal session token which can be used throughout the Enterprise/Portal API.
SSO API Reference
- Enterprise
- Portal
Domain Tracking
This section describes the etracker.js
JavaScript library and how to integrate it to your website in order to enable and use the Domain Tracking feature, that helps you measure how the users interact with your website.
Set Up
To enable tracking on your websites, please follow the steps below:
- Starting from the Enterprise Website Home screen, select
Admin
. - Go to the
Domains
tab in the Administrator Settings. - Identify the Domain Tracker you want to integrate with your website, then select
Get Tracker Code
. - Select
Copy to Clipboard
. - Next, access the code of your site's templates on which you want to start tracking and paste the script code as the first item into each page that you want to track. The code should be added near the top of the tag and before any other script or CSS tags. Note that every time you create a new tracker, you have to do this copy-paste operation in the pages on which you are interested in monitoring your visitors.
Using Tracking
Under the Tracking Code dialog, you will find a JavaScript tracking snippet which looks like below:
<!-- NorthStar CCM Tracking -->
<script>
window.etracker=window.etracker||function(){(etracker.q=etracker.q||[]).push(arguments)};
etracker('send','pageview');
<script>
<script async src='htpp://EngageCXServer:EngageCXPortNumber/track/js?tid=T-Y-XXXXX'></script>
<!-- End NorthStar CCM Tracking -->
The above code needs to be added to your websites on which you want to enable tracking. It does the following:
- Creates a < script > element that starts asynchronously downloading the etracker.js JavaScript library from htpp://localhost:64230/track/js.
- Initializes a global etracker function that allows you to schedule commands to be run once the etracker.js library is loaded and ready to go.
- Adds another command to the etracker() command queue to send a pageview to NorthStar CCM for the current page.
Almost everything you need to track with etracker.js can be done using the etracker() command queue. The first parameter of the etracker() function, the command
, is a string that identifies a particular etracker.js method. The available commands are: config
and send
.
How to make configurations
The config command is used to make some configurations like settings ids, names, etc.
For example, to set a string value for a contactId, you can use the following command:
etracker('config','contactId',134)
Multiple values need to be added into quotation marks and separated with a comma, like in the example below:
etracker('config', {server: 'https://engage.ecrion.com', trackerId: 'T-1-12345', contactId: 134, clientId: '35009a79-1a05-49d7-b876-2b884d0f825b'})
Note
Sending data to NorthStar CCM
The send command is used to transmit data to NorthStar CCM which analyzes data and triggers the tracking events. The syntax looks like this:
etracker('send', [eventType], [fieldsObject]);
Calls to the send command must specify an eventType and, depending on the type specified, other additional parameters may be specified as well, for example:
* etracker('send', 'pageview');
* etracker('send', 'sign_in');
* etracker('send', 'code_sample_run', { sample_name: 'fo2pdf'});
The eventType supported by NorthStar CCM are pageview
and custom_events
detailed in the below sections. However, the simplest way to use the same format for the send command is to pass all fields using the fieldsObject parameter. For example:
* etracker('send', { 'event': 'pageview'});
* etracker('send', { 'event': 'sign_in', sample_name: 'fo2pdf'});
Getting Tracker Data
Getting and setting field data on a tracker sometimes requires having a reference to the tracker object itself. Since commands added to the etracker() command queue execute asynchronously
and do not return a value, getting a reference to a tracker object requires waiting until the etracker.js library has been fully loaded. You can do this via the ready callback
.
The ready callback is a function that you can add to the etracker() command queue. The function will be invoked as soon as the etracker.js library is fully loaded, and all previous configurations commands added to the queue have been executed.
For example, the code below shows how to access the default tracker object and log it to the console.
etracker(function(etracker){
console.log("etracker library has been fully loaded. Now you can use getters and setters");
var contactId = etracker.get('contactId');
})
Once the etracker.js library has been loaded, you can use its get method to access the value of any field currently stored on the tracker. In the above code we retrieved the contactId value.
Page Tracking
Page tracking allows you to measure the number of views you have for a particular page on your website. Pages often correspond to an entire HTML document, but they can also represent dynamically loaded content (this is known as virtual pageviews
).
Whenever a send command is executed, NorthStar CCM uses the title
and location
data, retrieved from the browsing context, to show the pages visited by your users.
For example, the function below sends a pageview event to NorthStar CCM:
etracker('send',{event:'pageview'})
Additionally, you can send several additional parameters:
etracker('send',{event:'pageview, url:'fullurlhere'});
Notes
Many websites today load content dynamically via AJAX without requiring a full page load for each page. Such sites are commonly referred to as Single Page Applications (SPAs). If your website loads page content dynamically and updates the document's URL, you'll usually want to send additional pageviews to track these virtual pageviews.
Event Tracking
Events are user interactions with content that can be tracked independently from a web page or a screen load. Downloads, mobile ad clicks, gadgets, Flash elements, AJAX embedded elements, and video plays are all examples of actions you might want to track as Events. Event hits can be sent using the send command and along with a custom eventType.
For example, the command below sends an event to NorthStar CCM indicating that a user has signed in with the username 'test' :
etracker('send','Sign In', {username:'test'});
Note that as with all send commands, the fields passed within the convenience parameters may also be specified in the fieldsObject. The above command could be rewritten as:
etracker('send', {event:'Sign In', username:'test'});
Notes
The send command uses an image transport to overcome the XHR limitations to the origin domain. Thus it means that all request made to NorthStar CCM, ask for an image from the server.
Tracking mechanism
Each request made by the tracking code includes a clientId
. This id is the same during subsequent visits, as long as the person does not empty local storage (or clear cache). It is used to identify the returning visitors. However, the visitor is treated as an anonymous person until the tracker knows who the person is (i.e. the exact ContactId or LeadId passed as contactId). If such an authenticated
contactId is configured on etracker, all the following requests will also send contactId. For example, you can use etracker('config', 'contactId', 1234)
.
Using this, the NorthStar CCM software will know how to associate all the activity
between the clientId and contactId.
Inserting the code in a website will automatically track every page someone visits.
To create a custom event, the etracker API
needs to be used:
etracker('send', 'sign_in'); etracker ('send', 'sign_up_form_complete'); etracking ('send', 'code_sample_run', {'name' : 'fo2pdf'});
Cookies and User Identification
To track users, the NorthStar CCM Platform uses the local storage. In addition, NorthStar CCM will try to use cookies whenever available.
Notes
Every time a hit is sent to NorthStar CCM, the cookie expiration time is updated to be the current time plus the value of the cookieExpires field. This means that if you use the default cookieExpires time of 30 days, and a user visits your website every month, their cookie will never expire.
If you set the cookieExpires time to 0 (zero) seconds, the cookie turns into a session based cookie and expires once the current browser session ends.
For example, to set the cookie expiration date to 15 days (1296000 seconds)
etracker('config', 'cookieExpires', 1296000)
Notes
The default value for a certain tracker can be set from the Admin Domain under Enterprise website. If the value is never, then the cookie expiration date will be set to the maximum allowed value (2 years).
Using NorthStar CCM Forms
One way to authenticate can be made by filling in an NorthStar CCM form. The Sign In
form is obtained by sharing a Communication and inserting the obtained link into a web page.
Note that you need to add a new query string parameter trackContact=true
to work with etracker. Usually, this is used in combination with Lead/Contact Generation Forms. Setting this parameter makes the form wait for the workflow to generate the Contact and respond back with the EOS Contact Id. This id is then used to configure the etracker to convert the anonymous user to the Contact, by using the etracker API according to the configurations section: etracker('config', 'contactId', 134)
.