Skip to content

Enterprise 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://nsccm.example.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). 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 of string 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(err){
    // Handle any authentication errors here
    alert("Authorization error: " + err.response.status + " " + err.response.statusText + " - " + err.response.obj.Message);
});
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 apiUrl = "https://nsccm.example.com";
string apiKey = "API:dee401eb-d3e5-4523-9f90-c19a573e7e0a";

Configuration configuration = new Configuration() { BasePath = apiUrl };
configuration.DefaultHeaders.Add("Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes(apiKey))}");

AuthorizationApi authorizationApi = new AuthorizationApi(configuration);
string sessionToken = authorizationApi.GetToken().AccessToken;

Alternatively, it's possible to use a username/password combination to authenticate.

For example → string apiKey = username + ":" + password

If credentials are used on multiple environments, the environment name is required to authenticate.

For example → string apiKey = environment + "#" + username + ":" + password

Java

string apiUrl = "https://nsccm.example.com";
string apiKey = "API:dee401eb-d3e5-4523-9f90-c19a573e7e0a";

ApiClient apiClient = new ApiClient();
apiClient.setBasePath(apiUrl);
apiClient.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(apiKey.getBytes()));

AuthorizationApi authorizationApi = new AuthorizationApi(apiClient);
String sessionToken = authorizationApi.getToken().getAccessToken();

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://nsccm.example.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 - The TokenEntity.AccessToken of type string 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";

Configuration configuration = new Configuration() { BasePath = apiUrl };
AuthorizationApi authorizationApi = new AuthorizationApi(configuration);
authorizationApi.DeleteToken(sessionToken);

Java

String token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient apiClient = new ApiClient();
apiClient.setBasePath(apiUrl);

AuthorizationApi authorizationApi = new AuthorizationApi(apiClient);
authorizationApi.deleteToken(token);

HTTP

curl -X DELETE "https://nsccm.example.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";
Configuration configuration = new Configuration() { BasePath = apiUrl };
AuthorizationApi authorizationApi = new AuthorizationApi(configuration);

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


Direct Data

The Direct Data API call uses diagrams as inputs, built in Modeler.

Data

Process a data model diagram and return the output data as a stream.

POST /api/v2/data

Parameters

  • request of type DataRequestEntity Required
    • InputSettings of type DataInputSettings
      • Diagram
        • Workspace - The workspace name
        • Path - The file path
        • DiagramParameters - A list with string triplets that can be used to overwrite some attributes in the data processing such as a connection string, parameter value, etc.
          • Id - Specifies the id of the XML element on which this property should be applied.
          • Name - Specifies the name of the property of which value you intend to modify (e.g. XML attribute's name, not the "name" attribute for an element).
          • Value - Specifies the new value for the attribute that will be overwritten.
        • Diagram Connections - Provides the ability to pass dynamically the connection string.
          • Name - Specifies the connection name you want to override
          • Value - Specifies the connection string, such as "ConnectionString=….;ProviderType=….."

Returns

  • binary data - the output data stream, in a format determined by the input diagram.

Notes

If the diagram format is .edx, then the output will be an XML or JSON file.

If the diagram format is .edm, then the output will be an IMDB File.

If the diagram format is .edd, then the output will be a Database Output file.

Examples

JavaScript

eosAPI.DirectData.Data({}, {
    responseContentType: 'text/xml',
    requestBody: {
        InputSettings: {
            Diagram: {
                Workspace: "Default",
                Path: "Retail/Bookstore Invoice/Invoice.edx"
            }
        }
    }
})
.then(function(response) {
    var content = response.data;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration directDataApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Data API
DirectDataApi dataApi = new DirectDataApi(directDataApiConfig);

DataRequestEntity request = new DataRequestEntity()
{
    InputSettings = new DataInputSettings()
    {
        Diagram = new Diagram()
        {
            Workspace = "Default",
            Path = "Retail/Bookstore Invoice/Invoice.edx"
        }
    }
};

// Send the request
using(Stream response = dataApi.Data(request))
{
    //processing
}

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Data API
DirectDataApi dataApi = new DirectDataApi(client);

// Create a new request
DataRequestEntity request = new DataRequestEntity();

DataInputSettings inputSettings = new DataInputSettings ();
Diagram diagram = new Diagram ();
diagram.setWorkspace("Default");
diagram.setPath("Retail/Bookstore Invoice/Invoice.edx");
inputSettings.setDiagram(diagram);
request.setInputSettings(inputSettings);

// Send the request
File response = dataApi.data(request);

HTTP

curl -H "Content-Type: application/json" -X POST -d "{ 'InputSettings' : {  'Diagram' : {   'Workspace' : 'Default',   'Path' : 'Retail/Bookstore Invoice/Invoice.edx'  } }" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/data"

Direct Render

The Direct Render API call allows you to configure what type of output you would like to produce, what template to use and other variables that will drive this to production. In this section, you will have access to the different configuration options for each output type.

Render

Render input into a variety of output formats including PDF, Word, PPTX, HTML, AFP etc.

POST /api/v2/render

Render Parameters

  • request of type RenderRequestEntity (Model.RenderRequestEntity) Required
    • Input (Model.Input, optional) : Input configuration
    • InputSettings (Model.InputSettings, optional) : Input settings
    • HtmlInput (Model.HtmlInput, optional) : HTML Input
    • PdfOutput (Model.PdfOutput, optional) : PDF Output
    • AfpOutput (Model.AfpOutput, optional) : Afp Output
    • HtmlOutput (Model.HtmlOutput, optional) : HTML Output
    • TxtOutput (Model.TxtOutput, optional) : Text Output
    • PngOutput (Model.PngOutput, optional) : PNG Output
    • JpgOutput (Model.JpgOutput, optional) : JPG Output
    • GifOutput (Model.GifOutput, optional) : GIF Output
    • PrnOutput (Model.PrnOutput, optional) : PRN Output
    • PsOutput (Model.PSOutput, optional) : PS Output
    • WordmlOutput (Model.WordmlOutput, optional) : Wordml Output
    • PptxOutput (Model.PptxOutput, optional) : Pixel-perfect Power Point Output
    • EditablePptxOutput (Model.EditablePptxOutput, optional) : Editable Power Point Output
    • DocxOutput (Model.DocxOutput, optional) : DOCX Output
    • EpubOutput (Model.EpubOutput, optional) : E-PUB Output
    • TiffOutput (Model.IocaOutput, optional) : IOCA Output
    • XpsOutput (Model.XpsOutput, optional) : XPS Output
    • DicomOutput (Model.DicomOutput, optional) : DICOM Output
    • SMSOutput (Model.SMSOutput, optional) : SMS Output
    • ZPLOutput (Model.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 - returns the page count of the generated document
    • x-render-input-bytes-id - returns the InputBytesID from the request, if specified

Input
  • Model.Input - You can specify either a Source or a combination of an Workspace and Path. Required
    • InputFormat (string, optional) - Format of the source document
      • Allowed Values: pdf, xslfo, svg, xml, wordml, docx, html, dal, das, xfd, excel, json
    • Source (string, optional) - String representing the source document. Text-based formats (XML, JSON, XSL-FO, HTML, etc.) can be passed as text, but binary formats (DocX, PDF, etc.) must be Base64 encoded. We recommend Base64 encoding the source rather than passing text by using the following format data:<media-type>;base64,<data>, e.g.data:application/json;base64,eyJyb290IjogIkhlbGxvV29ybGQhIn0=. For large content, provide a Base64 encoded zip archive using data:application/zip;base64,<data> format.
    • Workspace (string, optional) - The name of the workspace of your input
    • Path (string, optional) - The input file path

Input Settings
  • Model.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
    • 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.
      • Allowed Values: usedefault, throw
      • Default: usedefault
    • 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
    • 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 (Model.Template, optional) : Specifies the document template

HTML Input
  • Model.HtmlInput - HTML input settings
    • Encoding (string, optional) - Specifies the character encoding of the input HTML document
      • Allowed Values: utf8, win1252
      • Default: utf8
    • PageWidth (string, optional) - Specifies the page width as a length value or automatic.
      • Default: auto
    • PageHeight (string, optional) - Specifies the page height as a length value or automatic.
      • Default: auto
    • PageMarginTop (string, optional) - Specifies the page top margin as a length value.
      • Default: 1in
    • PageMarginLeft (string, optional) - Specifies the page left margin as a length value.
      • Default: 1in
    • PageMarginRight (string, optional) - Specifies the page right margin as a length value.
      • Default: 1in
    • PageMarginBottom (string, optional) - Specifies the page bottom margin as a length value.
      • Default: 1in
    • PageHeaderMargin (string, optional) - Specifies the page header margin as a length value.
      • Default: 0.5in
    • PageFooterMargin (string, optional) - Specifies the page footer margin as a length value.
      • Default: 0.5in
    • ShowPageNumber (boolean, optional) - Specifies whether to render page numbers in the output.
      • Default: true
    • ShowTitle (boolean, optional) - Specifies whether to render page title in the output.
      • Default: true

PDF Output
  • Model.PdfOutput - PDF is the 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, deprecated) - Specifies the level of PDF conformance. This parameter is deprecated and should no longer be used. Instead, use DocumentConformance to define the PDF conformance standard and DocumentAccessibility to specify the desired accessibility level.
      • Allowed Values: none, pdfx, pdfa-1a, pdfa-1a-accesible, pdfa-1b, pdf508, pdfx4p, pdfx4, pdfwcag2.0, pdfwcag2.1
    • DocumentConformance (string, optional) Specifies the level of PDF conformance.
      • Allowed Values: pdf-a-1a, pdf-a-1b, pdf-a-2a, pdf-a-2b, pdf-a-2u, pdf-a-3a, pdf-a-3b, pdf-a-3u, pdf-a-4, pdf-a-4f, pdf-x-1, pdf-x-2, pdf-x-3, pdf-x-4, pdf-x-4p, pdf-ua-1, pdf-ua-2
    • DocumentAccessibility (string, optional) Specifies the level of PDF accessibility.
      • Allowed Values: pdf-ua-1, pdf-ua-2, pdf-wcag-20-a, pdf-wcag-20-aa, pdf-wcag-20-aaa, pdf-wcag-21-a, pdf-wcag-21-aa, pdf-wcag-21-aaa, pdf-wcag-22-a, pdf-wcag-22-aa, pdf-wcag-22-aaa
    • Version (string, optional) - Specifies the PDF version.
      • Allowed Values: pdf16, pdf14, pdf15, pdf17, pdf20
      • Default: pdf16
    • WritePDFA3Source (string, optional) Specifies whether the input file should be embedded in the generated PDF when PDF/A-3 conformance is enabled.
      • Allowed Values: auto, input. By default, the input embedding is disabled.
    • WritePDFA3SourceXpath (string, optional) Specifies the XPath expression used to identify the portion of the input file that should be embedded in the generated PDF when PDF/A-3 conformance is enabled.
    • 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
    • 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.
    • EncryptionsStrength (integer, optional) - If a password is set, specifies the strength with which to encrypt the document.
      • Allowed Values: 48, 128
      • Default: 48
    • 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
  • Model.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
    • ImageCompression (string, optional) - Specify the image compression mode.
      • Allowed Values: jpeg, g4mmr, ibm-mmr, none
      • Default: jpeg
    • 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
  • Model.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

TXT Output
  • Model.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
    • 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
    • FontSize (integer, optional) - Specifies the value in points to assume as the output's font size.
      • Default: 9
    • FontFamily (integer, optional) - Specifies the font family to assume will be used in the output.
      • Default: Courier New

PNG Output
  • Model.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
    • 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 hinting
      • SingleBitPerPixel - Specifies that a character is drawn using its glyph bitmap without hinting
      • AntiAliasGridFit - Specifies that a character is drawn using its antialiased glyph bitmap with hinting. This results in much better quality due to antialiasing
      • AntiAlias - Specifies that a character is drawn using its antialiased glyph bitmap without hinting. Stem width differences may be noticeable because hinting is turned off
      • ClearTypeGridFit - Specifies that a character is drawn using its glyph ClearType bitmap with hinting
      • None - 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 be SingleBitPerPixelGridFit
        • If SmoothingMode is Default, TextRenderingHint will be None
        • If SmoothingMode is AntiAlias, TextRenderingHint will be AntiAlias
    • Zoom (integer, optional) - Specifies the zoom level as a percentage.
      • Default: 100
    • Resolution (integer, optional) - Specifies the default resolution (DPI). The value 0 means automatic.
      • Default: 0
    • ScaleWidth (integer, optional) - Specifies the image width size in pixels.
      • Default: -1
    • ScaleHeight (integer, optional) - Specifies the image height size in pixels.
      • Default: -1
    • TransparentBackground (boolean, optional) - Specifies whether or not to use a transparent background.

JPG Output
  • Model.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
    • 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 hinting
      • SingleBitPerPixel - Specifies that a character is drawn using its glyph bitmap without hinting
      • AntiAliasGridFit - Specifies that a character is drawn using its antialiased glyph bitmap with hinting. This results in much better quality due to antialiasing
      • AntiAlias - Specifies that a character is drawn using its antialiased glyph bitmap without hinting. Stem width differences may be noticeable because hinting is turned off
      • ClearTypeGridFit - Specifies that a character is drawn using its glyph ClearType bitmap with hinting
      • None - 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 be SingleBitPerPixelGridFit
        • If SmoothingMode is Default, TextRenderingHint will be None
        • If SmoothingMode is AntiAlias, TextRenderingHint will be AntiAlias
    • Zoom (integer, optional) - Specifies the zoom level as a percentage.
      • Default: 100
    • Resolution (integer, optional) - Specifies the default resolution (DPI). The value 0 means automatic.
      • Default: 0
    • ScaleWidth (integer, optional) - Specifies the image width size in pixels.
      • Default: -1
    • ScaleHeight (integer, optional) - Specifies the image height size in pixels.
      • Default: -1
    • TransparentBackground (boolean, optional) - Specifies whether or not to use a transparent background.
    • EncoderCompressionQuality (integer, optional) - Specifies an integer value between 0 to 100

GIF Output
  • Model.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
    • 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 hinting
      • SingleBitPerPixel - Specifies that a character is drawn using its glyph bitmap without hinting
      • AntiAliasGridFit - Specifies that a character is drawn using its antialiased glyph bitmap with hinting. This results in much better quality due to antialiasing
      • AntiAlias - Specifies that a character is drawn using its antialiased glyph bitmap without hinting. Stem width differences may be noticeable because hinting is turned off
      • ClearTypeGridFit - Specifies that a character is drawn using its glyph ClearType bitmap with hinting
      • None - 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 be SingleBitPerPixelGridFit
        • If SmoothingMode is Default, TextRenderingHint will be None
        • If SmoothingMode is AntiAlias, TextRenderingHint will be AntiAlias
    • Zoom (integer, optional) - Specifies the zoom level as a percentage.
      • Default: 100
    • Resolution (integer, optional) - Specifies the default resolution (DPI). The value 0 means automatic.
      • Default: 0
    • ScaleWidth (integer, optional) - Specifies the image width size in pixels.
      • Default: -1
    • ScaleHeight (integer, optional) - Specifies the image height size in pixels.
      • Default: -1
    • TransparentBackground (boolean, optional) - Specifies whether or not to use a transparent background.

PRN Output
  • Model.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
    • ColorMode (string, optional) - Specifies the color mode. auto lets the printer decide.
      • Allowed Values: auto, color, monochrome
      • Default: auto
    • ManualTray (boolean, optional) - Specifies whether the input tray is a manually operated tray.
    • CopyCount (integer, optional) - Specifies how many copies to print.
      • Default: 1

PS Output
  • Model.PSOutput - PostScript format output, formatted as a page description language in the electronic publishing and desktop publishing business

Wordml Output
  • Model.WordmlOutput - Word Processing Markup Language output

PPTX Output
  • Model.PptxOutput - Pixel-perfect PowerPoint formatted presentation output

Editable PPTX Output
  • Model.EditablePptxOutput - Editable PowerPoint formatted presentation output

DOCX Output
  • Model.DocxOutput - Word output format

EPUB Output
  • Model.EpubOutput - Online format for creating fluid-content digital books (ebooks)

TIFF Output
  • Model.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
    • 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 hinting
      • SingleBitPerPixel - Specifies that a character is drawn using its glyph bitmap without hinting
      • AntiAliasGridFit - Specifies that a character is drawn using its antialiased glyph bitmap with hinting. This results in much better quality due to antialiasing
      • AntiAlias - Specifies that a character is drawn using its antialiased glyph bitmap without hinting. Stem width differences may be noticeable because hinting is turned off
      • ClearTypeGridFit - Specifies that a character is drawn using its glyph ClearType bitmap with hinting
      • None - 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 be SingleBitPerPixelGridFit
        • If SmoothingMode is Default, TextRenderingHint will be None
        • If SmoothingMode is AntiAlias, TextRenderingHint will be AntiAlias
    • Zoom (integer, optional) - Specifies the zoom level as a percentage.
      • Default: 100
    • Resolution (integer, optional) - Specifies the default resolution (DPI). The value 0 means automatic.
      • Default: 0
    • ScaleWidth (integer, optional) - Specifies the image width size in pixels.
      • Default: -1
    • ScaleHeight (integer, optional) - Specifies the image height size in pixels.
      • Default: -1
    • TransparentBackground (boolean, optional) - Specifies whether or not to use a transparent background.

IOCA Output
  • Model.IocaOutput - Image Object Content Architecture output for representing images, including conventions and directions for processing and interchanging image information

XPS Output
  • Model.XpsOutput - Open XML Paper Specification output

DICOM Output
  • Model.DicomOutput - Digital Imaging and Communications in Medicine, a standard for handling, storing, printing, and transmitting information in medical imaging

SMS Output
  • Model.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

ZPL Output
  • Model.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

Input Template
  • Model.Template
    • Workspace (string, optional) - The workspace name
    • Path (string, optional) - The file path
    • LanguageId (string, optional) - Language id
    • PreserveWhitespace (string, optional) - Specifies if whitespace is preserved in the template.
      • Allowed Values: Yes, No
    • XSLTEngine (string, optional) - The XSL Transformation Engine
      • MSXML - 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
      • Internal - Use built-in libXslt engine.
    • 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
    • TemplateParameters (object, optional) - A key-value mapping that sets template parameters.
      • Name - Template parameter name
      • Value - 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({}, {
    responseContentType: 'application/pdf',
    requestBody: {
        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: {}
    }
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration directRenderApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { 
        { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } 
    }
};

// Create a new Render API
DirectRenderApi renderApi = new DirectRenderApi(directRenderApiConfig);

// Create a new 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
using(Stream response = renderApi.Render(request))
{
    //processing
}

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Render API
DirectRenderApi renderApi = new DirectRenderApi(client);

// 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.setPdfOutput(new PdfOutput()); 

// Send the request
File response = renderApi.render(request);

HTTP

curl -H "Content-Type: application/json" -X POST -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" -d "{ 'Input' : {  'Source' : '<?xml version=\"1.0\" standalone=\"yes\"?><root></root>' }, 'InputSettings' : {  'Template' : {   'Workspace' : 'Default',   'Path' : 'Retail/Bookstore Invoice/Invoice.epr'  } }, 'TxtOutput' : {}}" "https://nsccm.example.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:

Entities:

DownloadFile

Download a file from NorthStar CCM repository.

GET /api/v2/files/content

Parameters

  • workspace - Workspace name Required
  • path - File path Required
  • version - 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 apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
Stream response = repositoryApi.DownloadFile("Default", "Retail/Bookstore Invoice/Main.wk4");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
File response = repositoryApi.downloadFile("Default", "Retail/Bookstore Invoice/Main.wk4", -1);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - File path. Required
  • file - File bytes. Required
  • comments - The comments of a file.

Returns

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

using (Stream stmSource = File.OpenRead(@"C:\Sample.xml"))
{
    // Send the request
    FileEntity response = repositoryApi.UploadFile(token, "Default", "Retail/Bookstore Invoice/Sample.xml", stmSource, "New file uploaded.");
}

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

File fileSource = new File("C:\\Sample.xml");   

// Send the request 
FileEntity response = repositoryApi.uploadFile(token, "Default", "Retail/Bookstore Invoice/Sample.xml", fileSource, "New file uploaded.");

HTTP

curl -X POST -F "file=@C:\Sample.xml" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - Path to the folder containing the files or a file path1. Required
  • fields - A comma separated list of additional fields to be included.
    • Allowed Values: tags
    • Default: null
  • 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
  • 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
  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue

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 file
    • Workspace - The workspace name in which the file is located
    • Author - The name of the author of the current version
    • LockedBy - The name of the user that locked the current file
    • CreatedDate - 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 bytes
    • Size - A human-readable description of the file size
    • Tags - List of RepositoryTagEntity file tags IF asked for. Otherwise it's null
      • Name - Name of the tag
      • Value - Value of the tag
    • Version - The 1-based version index
    • Comments - The comments of the file version
  • RepositoryTagEntity[] - The list of tags

    • Name - Name of the tag
    • Value - 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

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request 
List<FileEntity> files = repositoryApi.GetFiles("Default", "Retail/Bookstore Invoice");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request 
List<FileEntity> files = repositoryApi.getFiles("Default", "Retail/Bookstore Invoice", null, 0, 10, null, null);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - Path to the file on which to perform the action. Required
  • fileOperation - of type FileOperationEntity. Required
    • Path - The new file path. Required
    • Action - The action to perform on file. Can be rename, copy or move. Required
    • Overwrite - Specifies how to resolve the conflict if the new file path exists
      • Allowed values: true, false
      • Default: false

Returns

  • 204 (No Content) - HTTP status code

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.UpdateFile("Default", "Retail/Bookstore Invoice/Invoice.epr",
    new FileOperationEntity()
    {
        Path = "Retail/Bookstore Invoice/Invoice2.epr",
        Action = "copy"
    });

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

FileOperationEntity op = new FileOperationEntity();
op.setPath("Retail/Bookstore Invoice/Invoice2.epr");
op.setAction("copy");
op.setOverwrite(true);

// Send the request
repositoryApi.updateFile("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' }" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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 Required
  • path - 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 apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.DeleteFile("Default", "Retail/Bookstore Invoice/Main.wk4");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
repositoryApi.deleteFile("Default", "Retail/Bookstore Invoice/Main.wk4");

HTTP

curl -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - 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 apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
List<FileEntity> versions = repositoryApi.GetFileVersions("Default", "Retail/Bookstore Invoice/Main.wk4");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
List<FileEntity> versions = repositoryApi.getFileVersions("Default", "Retail/Bookstore Invoice/Main.wk4");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - The file path. Required
  • request - The file version to restore. Required
    • Version - 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"}, {
    requestBody: {
        version: 1
    }
})
.then(function(response) {
    var status = response.status;
});

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.RestoreFileVersion("Default", "Retail/Bookstore Invoice/Main.wk4", new RestoreVersionRequestEntity()
{
    VarVersion = 1
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

RestoreVersionRequestEntity versToRestore = new RestoreVersionRequestEntity();
versToRestore.setVersion(1);

// Send the request
repositoryApi.restoreFileVersion("Default", "Retail/Bookstore Invoice/Main.wk4", versToRestore);

HTTP

curl -H "Content-Type: application/json" -X POST -d "{ 'Version':1 }" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/files/versions?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4"

__

GetFileDependencies

Gets the dependencies of a file.

GET /api/v2/files/dependencies

Parameters

  • workspace - Workspace name Required
  • path - File path Required
  • recursive - 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 apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
List<FileEntity> dependencies = repositoryApi.GetFileDependencies("Default", "Retail/Bookstore Invoice/Main.wk4");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
List<FileEntity> dependencies = repositoryApi.GetFileDependencies("Default", "Retail/Bookstore Invoice/Main.wk4");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/files/dependencies?workspace=Default&path=Retail%2FBookstore%20Invoice%5CMain.wk4&recursive=false"

ExportFolder

Download a zip file of a folder from NorthStar CCM repository.

GET /api/v2/folders/content

Parameters

  • workspace - Workspace name. Required
  • path - 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

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
Stream zip = repositoryApi.ExportFolder( "Default", "Retail/Bookstore Invoice");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
File zip  = repositoryApi.exportFolder("Default", "Retail/Bookstore Invoice");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - Folder path. Required
  • importTags - Import the tags folder
    • Allowed values: true, false.
  • file - Zip file bytes. Required
  • comments - The comments of the file.

Returns

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

using (Stream zipFile = File.OpenRead(@"C:\Sample.zip"))
{
    // Send the request
    FolderEntity folder = repositoryApi.ImportFolder("Default", "Retail/Bookstore Invoice", false, zipFile, "Import Sample.zip.");
}

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

File zipFile = new File("C:\\Sample.zip");

// Send the request
repositoryApi.importFolder("Default", "Retail/Bookstore Invoice", zipFile, false, "Import Sample.zip.");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" -F filedata=@"C:\myFolder.zip" "https://nsccm.example.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. Required
  • path - File or folder path. Required
  • includeFolders - 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: "Retail/Bookstore Invoice"
})
.then(function(response) {
    var status = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
List<RepositoryItemEntity> content = repositoryApi.LookupFolder("Default", "Retail/Bookstore Invoice");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
List<RepositoryItemEntity> content  = repositoryApi.LookupFolder("Default", "Retail/Bookstore Invoice");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/folders/lookup?workspace=Default&path=Retail/Bookstore%20Invoice"

GetFolderPermissions

Returns a list of folder permissions for specified path and workspace.

GET /api/v2/folders/permissions

Parameters

  • workspace - Workspace name. Required
  • path - 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 apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
List<FolderPermissionsEntity> permissions = repositoryApi.GetFolderPermissions("Default", "Retail/Bookstore Invoice");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
List<FolderPermissionsEntity> permissions =  repositoryApi.getFolderPermissions("Default", "Retail/Bookstore Invoice");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/folders/permissions?workspace=Default&path=Retail/Bookstore%20Invoice"

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 array, folder permissions will be reset. UserId and GroupId are mutually exclusive.

POST /api/v2/folders/permissions

Parameters

  • workspace - Workspace name. Required
  • path - Folder path. Required
  • permissions - Folder permissions in an array model.

Returns

  • 204 (No Content) - HTTP status code

Examples

JavaScript

eosAPI.Repository.UpdateFolderPermissions({
    workspace: "Default",
    path: "Retail/Bookstore Invoice"
    }, {
    requestBody: [
            {
                "UserId": 1,
                "Permissions": [                    
                    "Read Folder",
                    "Read Files",
                    "Delete Folder"
                ]
            }
        ]
})
.then(function(response) {
    var status = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

List<FolderPermissionsEntity> permissions = new List<FolderPermissionsEntity>() 
{
    new FolderPermissionsEntity()
    {
        UserId = 1,
        Permissions = new List<String>
        {
        "Read Folder",
        "Read Files",
        "Delete Folder"
        }
    }
};

// Send the request
repositoryApi.UpdateFolderPermissions("Default", "Retail/Bookstore Invoice", permissions);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

FolderPermissionsEntity permission = new FolderPermissionsEntity();
permission.setUserId(1);
permission.setPermissions(List.of(
    "Read Folder",
    "Read Files",
    "Delete Folder"
));

List<FolderPermissionsEntity> permissions = new ArrayList<>();
permissions.add(permission);

// Send the request
repositoryApi.updateFolderPermissions("Default","Retail/Bookstore Invoice",permissions);

HTTP

curl -H "Content-Type: application/json" -X POST -d "[ GroupId : 2, Permissions: [ "Read Folder", "Read Files", "Delete Folder" ] ]" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/folders/permissions?workspace=Default&path=Retail/Bookstore%20Invoice"

CreateFolder

Creates and returns the new folder.

POST /api/v2/folders

Parameters

  • workspace - Workspace name. Required
  • path - The path of the folder to be created. Required

Returns FolderEntity

  • Path - Path to the folder
  • Workspace - Workspace name in which the folder is located
  • CreatedDate - 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: "Retail/Bookstore Invoice/NewFolder"
})
.then(function(response) {
    var folder = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
FolderEntity folder = repositoryApi.CreateFolder("Default", "Retail/Bookstore Invoice/NewFolder");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
FolderEntity folder = repositoryApi.createFolder("Default",  "Retail/Bookstore Invoice/NewFolder");

HTTP

curl -X POST -d "{'path' : 'NewFolder'}" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/folders?workspace=Default&path=Retail/Bookstore%20Invoice/NewFolder"
__

GetFolders

Returns a list of folders in the specified parent path and workspace.

GET /api/v2/folders

Parameters

  • workspace - Workspace name. Required
  • path - Folder path. Required
  • start - Start index
  • count - Number of results

Returns

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
List<FolderEntity> folders = repositoryApi.GetFolders("Default", "Retail/Bookstore Invoice");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
List<FolderEntity> folders =  repositoryApi.getFolders("Default", "Retail/Bookstore Invoice", 0, 100);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - Path to the folder on which to perform the action. Required
  • folderOperation - The operation to be performed on the folder, of type FolderOperationEntity. Required
    • Path - The new folder path. Required
    • Action - 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"},{
    requestBody: {
        Path: "Retail/Bookstore Invoice2",
        Action: "copy"
    }
})
.then(function(response) {
    var status = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.UpdateFolder("Default", "Retail/Bookstore Invoice",
    new FolderOperationEntity()
    {
        Path = "Retail/Bookstore Invoice2",
        Action = "copy"
    });

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

FolderOperationEntity op = new FolderOperationEntity();
op.setPath("Retail/Bookstore Invoice2");
op.setAction("copy");

// Send the request
repositoryApi.updateFolder("Default", "Retail/Bookstore Invoice", op);

HTTP

curl -X PUT -H "Content-Type: application/json" -d "{ 'Path':'Retail/Bookstore Invoice2', 'Action':'copy' }" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/folders?workspace=Default&path=Retail/Bookstore%20Invoice"
__

DeleteFolder

Removes a folder.

DELETE /api/v2/folders

Parameters

  • workspace - Workspace name. Required
  • path - 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 apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.DeleteFolder("Default", "Retail/Bookstore Invoice");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
repositoryApi.deleteFolder("Default", "Retail/Bookstore Invoice");

HTTP

curl -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - File or folder path. Required

Returns

  • RepositoryTagEntity[] - The list of tags
    • Name - Name of the tag
    • Value - 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 apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
List<RepositoryTagEntity> tags = repositoryApi.GetTags("Default", "Retail/Bookstore Invoice/Main.wk4");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
List<RepositoryTagEntity> tags  = repositoryApi.getTags("Default", "Retail/Bookstore Invoice/Main.wk4");

HTTP

curl -X GET -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • path - File or folder path. Required
  • tag - The tag of type TagEntity to be added. Required
    • Name - Name of the tag. Required
    • Value - 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"},{
    requestBody:{
        Name: "Priority",
        Value: "High"
    }
})
.then(function(response) {
    var status = response.status;
});

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.AddTag("Default", "Retail/Bookstore Invoice/Main.wk4", new RepositoryTagEntity()
{
    Name = "Priority",
    Value = "High"
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

RepositoryTagEntity tag = new RepositoryTagEntity();
tag.setName("Priority");
tag.setValue("High");

// Send the request
repositoryApi.addTag("Default", "Retail/Bookstore Invoice/Main.wk4", tag);

HTTP

curl -H "Content-Type: application/json" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" -X POST -d "{'Name':'Priority', 'Value':'High'}" "https://nsccm.example.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. Required
  • path - File or folder path. Required
  • tag - The tag of type TagEntity to be removed. Required
    • Name - Name of the tag. Required
    • Value - 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",
    tagName: "Priority",
    tagValue: "High"    
})
.then(function(response) {
    var status = response.status;
});

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.RemoveTag("Default", "Retail/Bookstore Invoice/Main.wk4", "Priority", "High");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
repositoryApi.removeTag("Default", "Retail/Bookstore Invoice/Main.wk4", "Priority", "High");

HTTP

curl -H "Content-Type: application/json" -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/files/tags?workspace=Default&path=Retail/Bookstore%20Invoice/Main.wk4&tagName=Priority&tagValue=High"

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
  • count - Enter the number of results you want to display.
    • Default: Int32.MaxValue

Returns WorkspaceEntity[]

  • Name - The workspace name
  • Description - The workspace description

Examples

JavaScript

// List all workspaces available to the current authenticated user
eosAPI.Repository.GetWorkspaces()
.then(function(response) {
    var files = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
List<WorkspaceEntity> workspaces = repositoryApi.GetWorkspaces();

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
List<WorkspaceEntity> workspaces = repositoryApi.getWorkspaces(0,100);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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 name
  • Description - The workspace description

Examples

JavaScript

// Display the workspace requested by name by the current authenticated user
eosAPI.Repository.GetWorkspace({
  name: "Default"
})
.then(function(response) {
    var workspace = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
WorkspaceEntity workspace = repositoryApi.GetWorkspace("Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
WorkspaceEntity workspace = repositoryApi.getWorkspace("Default");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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 type WorkspaceRequestEntity. Required
    • Name: Provide a name for the workspace you want to create. Required
    • Description: Enter a description that highlights the workspace's purpose.

Returns WorkspaceEntity

  • Name: Provide a name for the workspace request you want to create. Required
  • Description: Enter a description that highlights the workspace request purpose.

Examples

JavaScript

eosAPI.Repository.CreateWorkspace({},{
    requestBody:{
        name: "Development",
        description: "Custom workspace created with Rest API"
    }
})
.then(function(response) {
    var folder = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
WorkspaceEntity workspace = repositoryApi.CreateWorkspace( new WorkspaceRequestEntity()
{
    Name = "Development",
    Description = "Custom workspace created with Rest API"
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

WorkspaceRequestEntity entity = new WorkspaceRequestEntity();
entity.setName("Development");
entity.setDescription("Custom workspace created with Rest API"); 

// Send the request
WorkspaceEntity workspace = repositoryApi.createWorkspace(entity);

HTTP

curl -H "Content-Type: application/json" -X POST -d "{ 'Name':'Default' , 'Description':'This is the default workspace for your organization.' }" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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.Repository.DeleteWorkspace({
    name: "Development"
})
.then(function(response) {
    var status = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.DeleteWorkspace("Development");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

// Send the request
repositoryApi.deleteWorkspace("Development");

HTTP

curl -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • workspace - The operation to be performed on the workspace, of type WorkspaceRequestEntity. Required
    • Name - The new workspace name. Required
    • Description - The new workspace description.

Returns

  • 204 (No Content) - HTTP status code

Examples

JavaScript

eosAPI.Repository.UpdateWorkspace({
    name: "Default"},{
    requestBody: {
        Name: "Development",
        Description: "This is the Default workspace renamed!"
    }
})
.then(function(response) {
    var status = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration repositoryApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(repositoryApiConfig);

// Send the request
repositoryApi.UpdateWorkspace("Default",
    new WorkspaceRequestEntity()
    {
        Name = "Development",
        Description = "This is the Default workspace renamed"
    });

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Repository API
RepositoryApi repositoryApi = new RepositoryApi(client);

WorkspaceRequestEntity entity = new WorkspaceRequestEntity();
entity.setName("Development");
entity.setDescription("This is the Default workspace renamed");

// Send the request
repositoryApi.updateWorkspace("Default", entity);

HTTP

curl -H "Content-Type: application/json" -X PUT -d "{ 'Name':'Default' , 'Description':'This is the default workspace for your organization.' }" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/workspaces?name=Default"

Jobs

Methods:

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
  • communication - Communication name
  • workspace - Workspace name
  • status - Job status
    • Allowed values: Starting, WaitingForInput, Processing, WaitingForTask, FinishedWithErrors, FinishedOK, Aborted
  • author - The user's username which created the job.
  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue

Notes

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

Returns

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
List<JobEntity> myJobs = jobsApi.GetJobs(null, null, "Default", null, null, 0, 10);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
List<JobEntity> myJobs = jobsApi.getJobs(null, null, "Default", null, null, 0, 10);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "http://nsccm.example.com/api/v2/jobs?Workspace=Default"

__

Lookup

Returns a list of jobs.

POST /api/v2/jobs/lookup

Parameters

  • request - Lookup jobs request parameters, of type LookupJobsRequest. Required
    • Type - Communication type
      • Allowed values: Interactive, Batch, OnDemand
    • Communication - Communication name
    • Workspace - Workspace name
    • Status - Job status
      • Allowed values: Starting, WaitingForInput, Processing, WaitingForTask, FinishedWithErrors, FinishedOK, Aborted
    • Author - The user's username which created the job.
    • Tags - Job tags, a list of TagEntity.
    • Start - Start index
      • Default: 0
    • Count - Number of results
      • Default: Int32.MaxValue

Notes

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

Returns

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
List<JobEntity> jobs = jobsApi.Lookup(new LookupJobsRequest()
{
    Workspace = "Default",
    Tags = new List<TagEntity> {
        new TagEntity() { Name = "MyTagName1", Value = "MyTagValue1" },
        new TagEntity() { Name = "MyTagName2", Value = "MyTagValue2" }
    }
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

TagEntity tag = new TagEntity();
tag.setName("MyTagName1");
tag.setValue("MyTagValue1");
List<TagEntity> tagsList = new ArrayList<TagEntity>();
tagsList.add(tag);
LookupJobsRequest lookupOp =  new LookupJobsRequest();
lookupOp.setWorkspace("Default");
lookupOp.setTags(tagsList);

// Send the request
List<JobEntity> myJobs = jobsApi.lookup(lookupOp);

HTTP

curl -H "Content-Type: application/json" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" -X POST -d "{"Workspace": "Default", "Tags": [ {"Name": "MyTagName1", "Value": "MyTagValue1" }, { "Name": "MyTagName2", "Value": "MyTagValue2" }] }" "https://nsccm.example.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 type JobRequestEntity. Required
    • Workflow - The workflow (.wk4 file) to create a job from. Either a Workflow or a Communication is required.
      • Workspace - The workspace name in which the workflow is located.
      • Path - Workflow path.
    • Communication - The communication name to create job from. Either a Workflow or a Communication is required.
    • Parameters - A list of JobParameter.
      • Name - Parameter name.
      • Value - Parameter value.
    • Tags - A list of TagEntity.

Returns JobEntity

  • Id - Job id
  • Name - Job friendly name
  • Author - The user's username that started the job
  • StartDate - 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 between 0 and 100 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
  • Workflow - File path of the workflow that was used to generate the job.
  • Workspace - Job's workspace. Same as workflow's workspace.
  • Communication - Communication name
  • Type - Communication type
  • ManualOutcome - Last manual step outcome executed in the workflow, e.g. Approved, Rejected
  • CurrentStep - The current job step being executed, of type JobStepEntity. If the job status is FinishedOK this is null.
    • Id - Job step id
    • Name - Job step friendly name
    • Type - 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.

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 transition
  • FinishedOK, 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

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

JobRequestEntity jobReq = new JobRequestEntity();
jobReq.Workflow = new WorkflowFileEntity()
{
    Workspace = "Default",
    Path = "Retail/Bookstore Invoice/Main.wk4"
};

// Send the request
JobEntity newJob = jobsApi.CreateJob(jobReq);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

JobRequestEntity jobReq = new JobRequestEntity();
WorkflowFileEntity workflowOp = new WorkflowFileEntity();
workflowOp.setWorkspace("Default");
workflowOp.setPath("Retail/Bookstore Invoice/Main.wk4");
jobReq.setWorkflow(workflowOp);

// Send the request
JobEntity newJob = jobsApi.createJob(jobReq);

HTTP

curl -H "Content-Type: application/json" -X POST -d "{ 'Workflow': { 'Workspace':'Default', 'Path':'Retail/Bookstore Invoice/Main.wk4'}  }" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • workspace - Job's workspace name. Required
  • sync - If true, the api will not return until the job is finished

Returns

  • JobEntity - The updated job, in Processing state.

Examples

JavaScript

eosAPI.Jobs.RunJob({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var job = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
JobEntity runJob = jobsApi.RunJob("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", true);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
JobEntity runJob = jobsApi.runJob("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", true);

HTTP

curl -X POST -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://api.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/run?workspace=Default"
__

GetJob

Finds a job by id.

GET /api/v2/jobs/{id}

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required

Returns

Examples

JavaScript

eosAPI.Jobs.GetJob({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var job = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
JobEntity myJob = jobsApi.GetJob("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
JobEntity myJob = jobsApi.getJob("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95?workspace=Default"
__

DeleteJob

Deletes a job by id.

DELETE /api/v2/jobs/{id}

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required

Returns

  • 204 (No Content) - HTTP status code

Examples

JavaScript

eosAPI.Jobs.DeleteJob({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var statusCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
jobsApi.DeleteJob("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
jobsApi.deleteJob( "008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

HTTP

curl -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95?workspace=Default"
__

GetJobInput

Gets job's input file.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required

Returns

Examples

JavaScript

eosAPI.Jobs.GetJobInput({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var file = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
FileEntity jobInputFile = jobsApi.GetJobInput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
FileEntity jobInputFile = jobsApi.getJobInput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/input?workspace=Default"
__

DeleteJobInput

Deletes job's input file.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required

Returns

  • 204 (No Content) - HTTP status code

Examples

JavaScript

eosAPI.Jobs.DeleteJobInput({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var statusCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
jobsApi.DeleteJobInput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
jobsApi.deleteJobInput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

HTTP

curl -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/input?workspace=Default"
__

DownloadJobInput

Downloads the job's input file.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required

Returns

  • binary data - File bytes

Examples

JavaScript

eosAPI.Jobs.DownloadJobInput({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var content = response.data;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
Stream content = jobsApi.DownloadJobInput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
File content = jobsApi.downloadJobInput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/input/content?workspace=Default"
__

UploadJobInput

Uploads the job's input file bytes.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required
  • inputFileName - 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

Examples

JavaScript

eosAPI.Jobs.UploadJobInput({
    id:"008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default",
    inputFileName: "MyFileName.xml" },{
    requestBody: {
        file: new File(['<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <root></root>'], "JobInput.xml"),
        comments: "Uploade job input!"
    }
})
.then(function(response) {
    var status = response.status;
});

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

using (Stream inputStm = File.OpenRead(@"C:\JobInput.xml"))
{
    // Send the request
    FileEntity input = jobsApi.UploadJobInput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", inputStm, "MyFileName.xml", "Upload job input!");
}

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

File inputFile = new File("C:\\JobInput.xml");

// Send the request
FileEntity  input = jobsApi.uploadJobInput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", inputFile, "MyFileName.xml", "Upload job input!");

HTTP

curl -X POST -F "file=@C:\JobInput.xml;type=text/xml" -F 'comments=Upload job input!' -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/input/content?workspace=Default&inputFileName=sample.xml"
__

GetJobOutput

Gets job outputs.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required
  • fields - A comma separated list of additional fields to be included.
    • Allowed Values : tags
    • Default: null

Returns

Examples

JavaScript

eosAPI.Jobs.GetJobOutput({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var files = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
List<FileEntity> jobOutputs = jobsApi.GetJobOutput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
List<FileEntity> jobOutputs = jobsApi.getJobOutput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", null);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/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. Required
  • workspace - Job's workspace name. Required
  • includeInputs
    • Allowed values
      • true - The zip will contain all folders.
      • false - The zip will include only the outputs in a flat folder.
    • Default: true

Returns

  • binary data - the zip file

Examples

JavaScript

eosAPI.Jobs.DownloadJobOutput({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default",
    includeInputs: true
})
.then(function(response) {
    var files = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
Stream zipFile = jobsApi.DownloadJobOutput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", true);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
File zipFile = jobsApi.downloadJobOutput("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", true);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/output/content?workspace=Default&includeInputs=true"
__

GetJobLogs

Gets the log messages of a job.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required
  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue

Returns

Examples

JavaScript

eosAPI.Jobs.GetJobLogs({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var logMsgs = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
List<LogMessageEntity> logs = jobsApi.GetJobLogs("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
List<LogMessageEntity> logs = jobsApi.getJobLogs("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", 0, 100);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/logs?workspace=Default"
__

CreateJobLog

Logs a message for a specific job.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required
  • stepId - A job step id to associate the log message with.
  • logMessage - The log message, of type LogMessageRequestEntity. Required
    • Severity - The severity of the message. Required
      • Allowed Values: DiagnosticTrace, Error, Information, None, Warning.
    • Content - The log message content. Required

Returns

  • 201 (Created) - HTTP status code

Examples

JavaScript

eosAPI.Jobs.CreateJobLog({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default" }, {
    requestBody: {
        Severity: "Information",
        Content: "This message should go to the job log"
    }
})
.then(function(response) {
    var httpCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
jobsApi.CreateJobLog("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", new LogMessageRequestEntity()
{
    Severity = "Information",
    Content = "This message should go to the job log",
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

LogMessageRequestEntity log = new LogMessageRequestEntity();
log.setSeverity("Information");
log.setContent("This message should go to the job log");

// Send the request
jobsApi.createJobLog("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", log, null);

HTTP

curl -X POST -H "Content-Type: application/json" -d "{Severity: 'Information', Content: 'This message should go to the job log'}" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/logs?workspace=Default"
__

ShareJob

Share a job with portal/anonymous users

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required
  • request - Provide permission for a specific job. Required
    • Public - Make the job public to other users. Add it only for anonymous users
    • PortalUsers - Provides a list of Contacts ID. If NULL, the job will be shared with all users.
    • PublicId - Optional GUID
    • Title - Title of the Portal.
    • Category - Category from Portal Website
      • Allowed Values - Documents, Forms, Analytics.

Returns

JavaScript

eosAPI.Jobs.ShareJob({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default" }, {
    requestBody: {
        Public: "true",
        PortalUsers: ["C011", "C012"],  
        Category: "Forms",
        Title: "Code sample test"
    }
})
.then(function(response) {
    var FileShareResponse = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
FileShareResponse shareResponse = jobsApi.ShareJob("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", new FileShareRequest()
{
    Public = true,
    PortalUsers = new List<string> {"C011", "C012"} 
    Category: "Forms",
    Title: "Code sample test"
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

List<String> portalUsers = new ArrayList<String>();
portalUsers.add("C011");
portalUsers.add("C012");

FileShareRequest fileShareRequest = new FileShareRequest();
fileShareRequest.setPublic(true);
fileShareRequest.setPortalUsers(portalUsers);
fileShareRequest.setCategory("Forms");
fileShareRequest.setTitle("Code sample test");

// Send the request
FileShareResponse shareResponse = jobsApi.shareJob("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", fileShareRequest);

HTTP

curl -H "Content-Type: application/json" -X POST -d "{ 'Public':'true', 'PortalUsers': ['C011', 'C012'], 'Catergory':'Forms', 'Title':'Code Sample Test'}" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/share?workspace=Default"

__

GetJobShare

Gets share information from a job.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required

Returns FileShareResponse

  • PublicUrl - Url for anonymous access
  • PublicId - An unique identifier for the shared resource
  • PortalUrl - Url for portal users
  • PortalUsers - List of Contacts ID.

Examples

JavaScript

eosAPI.Jobs.GetJobShare({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default"
})
.then(function(response) {
    var FileShareResponse = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
FileShareResponse shareResponse = jobsApi.GetJobShare("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

// Send the request
FileShareResponse shareResponse = jobsApi.getJobShare("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/share?workspace=Default"
__

UnshareJob

Removes the share for a job with portal/anonymous users.

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

Parameters

  • id - Job's id. Required
  • workspace - Job's workspace name. Required
  • request - Remove access to shared jobs. Required
    • Public - Remove the access of the shared folder. If true, the job will no longer be shared.
    • PortalUsers - Provide a list of Contacts ID. If NULL, no user will be able to view the job.

Returns

  • 204 (No Content) - HTTP status code

Examples

JavaScript

eosAPI.Jobs.UnshareJob({
    id: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default",
    isPublic: "true",
    PortalUsers: ["C011", "C012"]
})
.then(function(response) {
    var statusCode = response.status;
})

.NET

```csharp
String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration jobsApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(jobsApiConfig);

// Send the request
jobsApi.UnshareJob("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default", new List<string> { "C011", "C012" }, true);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Jobs API
JobsApi jobsApi = new JobsApi(client);

List<String> portalUsers = new ArrayList<String>();
portalUsers.add("C011");
portalUsers.add("C012");

// Send the request
jobsApi.unshareJob("3aa09713-dc29-4a6d-8749-09635ee77cb8", "Default", portalUsers, true);

HTTP

curl -H "Content-Type: application/json" -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://api.example.com/api/v2/jobs/008a5d3b-f414-4ee3-bc24-6e9021fccf95/share?workspace=Default&portalUsers=C011&portalUsers=C012&isPublic=true"
__


Resources

Methods:

Entities:

GetJobResourceToken

Returns the resource token associated with job.

GET /api/v2/resources/jobs

Parameters

  • id - Job id Required
  • workspace - Workspace name Required

Returns ResourceTokenEntity

  • AccessToken - Resource token of string 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: "008a5d3b-f414-4ee3-bc24-6e9021fccf95",
    workspace: "Default",
})
.then(function(response) {
    var resourceToken = response.data;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration resourcesApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Resources API
ResourcesApi resourcesApi = new ResourcesApi(resourcesApiConfig);

// Send the request
string resourceToken = resourcesApi.GetJobResourceToken("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default").AccessToken;

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Resources API
ResourcesApi resourcesApi = new ResourcesApi(client);

// Send the request
String resourceToken = resourcesApi.getJobResourceToken("008a5d3b-f414-4ee3-bc24-6e9021fccf95", "Default").getAccessToken();

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://eos4.ecrion.com/api/v2/resources/jobs?id=008a5d3b-f414-4ee3-bc24-6e9021fccf95&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.

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
  • 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
  • job - The job id. If specified, the results will be filtered after the job.
    • Default: null
  • 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
  • fields - A comma separated list of additional fields to be included.
    • Allowed Values: content, tags, logs
    • Default: null
  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue

Returns

Examples

JavaScript

 eosAPI.Distribution.GetEmailTickets({
    start:0,
    count:100
  })
.then(function(response) {
    var emailTickets = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration distributionApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(distributionApiConfig);

// Send the request
List<EmailTicketEntity> emailTickets = distributionApi.GetEmailTickets(null, null, null, null, null, 0, 100);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(client);

// Send the request
List<EmailTicketEntity> emailTickets = distributionApi.getEmailTickets(null, null, null, null, null, 0, 100);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/tickets/email?start=0&count=100"
__

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. Required
  • fields - A comma separated list of additional fields to be included.
    • Allowed Values: content, tags, logs
    • Default: null

Returns EmailTicketEntity

  • Id - A unique id to identify this ticket
  • From - The sender email address.
  • To - Recipient email address.
  • Cc - Cc recipient email address.
  • Bcc - Bcc recipient email address.
  • Subject - Email subject.
  • Attachments - List of EmailAttachmentEntity
    • 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 type EmailContentEntity IF asked for
    • Body - 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, and Normal.
  • Status - The status of the ticket
    • Allowed Values: Failed, Processing, Delivered.
  • 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 of TicketTagEntity IF asked for. Otherwise it's null
    • Name - Name of the tag.
    • Value - Value of the tag.
  • Logs - List of LogMessageEntity IF asked for. Otherwise it's null

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration distributionApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(distributionApiConfig);

// Send the request
EmailTicketEntity emailTicket = distributionApi.GetEmailTicket(100, null);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(client);

// Send the request
EmailTicketEntity emailTicket = distributionApi.getEmailTicket(100, null);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3"" "https://nsccm.example.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. Required
  • request - Information about how to resend the ticket, of type ResendEmailTicketEntity. Required
    • To - The new recipient email address if specified
    • Cc - The new cc recipient email address if specified
    • Bcc - The new bcc recipient email address if specified
    • Subject - The new email subject if specified

Returns

  • 204 (No Content) - HTTP status code

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration distributionApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(distributionApiConfig);

// Send the request
distributionApi.ResendEmailTicket(100, new ResendEmailTicketEntity()
{
    To = "newaddress@mailserver.com"
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(client);

ResendEmailTicketEntity emailTicketEntity = new ResendEmailTicketEntity();
emailTicketEntity.setTo("newaddress@mailserver.com");

// Send the request
distributionApi.resendEmailTicket(100, emailTicketEntity);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" -H "Content-Type: application/json" -X POST -d "{'To': 'newaddress@mailserver.com'}" "https://nsccm.example.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
  • 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
  • job - The job id. If specified, the results will be filtered after the job.
    • Default: null
  • 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
  • fields - A comma separated list of additional fields to be included.
    • Allowed Values: tags, logs
    • Default: null
  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue

Returns

Examples

JavaScript

eosAPI.Distribution.GetPrintTickets({
    start:0,
    count:100
  })
.then(function(response) {
    var emailTickets = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration distributionApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(distributionApiConfig);

// Send the request
List<PrintTicketEntity> printTickets = distributionApi.GetPrintTickets(null, null, null, null, null, 0, 100);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(client);

// Send the request
List<PrintTicketEntity> printTickets = distributionApi.getPrintTickets(null, null, null, null, null, 0, 100);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • fields - A comma separated list of additional fields to be included.
    • Allowed Values: tags, logs
    • Default: null

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 or Duplex.
  • Copies - The number of copies.
  • ColorMode - Specify whether printing is in color or in monochrome mode.
    • Allowed Values: Auto, Color or Monochrome.
  • Orientation - Specify whether documents are printed in portrait or landscape mode
    • Allowed Values: Auto, Portrait or Landscape.
  • Priority - The delivery priority
    • Allowed Values: Now, High, Low, and Normal.
  • Status - The status of the ticket
    • Allowed Values: Failed, Processing, Delivered.
  • 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 of TicketTagEntity IF asked for. Otherwise it's null
    • Name - Name of the tag.
    • Value - Value of the tag.
  • Logs - List of LogMessageEntity IF asked for. Otherwise it's null

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration distributionApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(distributionApiConfig);

// Send the request
PrintTicketEntity emailTicket = distributionApi.GetPrintTicket(100, null);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(client);

// Send the request
PrintTicketEntity emailTicket = distributionApi.getPrintTicket(100, null);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/tickets/print/100"
__

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. Required
  • request - Information about how to resend the ticket of type ResendPrintTicketEntity. Required
    • PrinterName - The new printer name if specified
    • RemotePrinterServer - 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: 100 }, {
    requestBody: {
        "PrinterName": "SV_PRNTR2"
    }
})
.then(function(response) {
    var httpCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration distributionApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(distributionApiConfig);

// Send the request
distributionApi.ResendPrintTicket(100, new ResendPrintTicketEntity()
{
    PrinterName = "SV_PRNTR2"
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(client);

ResendPrintTicketEntity printTicket = new ResendPrintTicketEntity();
printTicket.setPrinterName("SV_PRNTR2");

// Send the request
distributionApi.resendPrintTicket(100, printTicket);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" -H "Content-Type: application/json" -X POST -d "{'PrinterName': 'SV_PRNTR2'}" "https://nsccm.example.com/api/v2/tickets/print/100/resend"

__

GetTicketLogs

Returns the list of logs in the email or print ticket.

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

Parameters

  • id - The ticket it. Required
  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue

Returns LogMessageEntity[]

  • Severity - The severity of the message.
    • Allowed Values: DiagnosticTrace, Error, Information, None, Warning.
  • Content - The log message content.
  • CreatedDate - The date when the message was logged (see Date Format).

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration distributionApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(distributionApiConfig);

// Send the request
List<LogMessageEntity> ticketLogs = distributionApi.GetTicketLogs(100, 0, 10);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Distribution API
DistributionApi distributionApi = new DistributionApi(client);

// Send the request
List<LogMessageEntity> ticketLogs = distributionApi.getTicketLogs(100, 0, 10);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/tickets/100/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:

Entities:

GetUsers

Returns the list of users from the current environment.

GET /api/v2/users

Parameters

  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue
  • groupName - Filter by a group name
    • Default: null
  • fields - A comma separated list of additional fields to be included.
    • Allowed values: nogroups, onlyorkspaceswithpermissions
    • Default: null

Returns

Examples

JavaScript

// List all users in the current environment
eosAPI.Security.GetUsers({
      start: 0,
      count: 100
    })
.then(function(response) {
    var users = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
List<UserEntity> users = securityApi.GetUsers(0, 100, null, null);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
List<UserEntity> users = securityApi.getUsers(0, 100, null, null);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/users?start=0&count=100"

__

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 type UserRequestEntity. Required
    • UserName - 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. Required
    • 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.
    • 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 - If true, the user can't log in the environment.
      • Allowed values: true, false.
      • Default: false.
  • fields - A comma separated list of additional fields to be included.
    • Allowed values: nogroups, onlyworkspaceswithpermissions
    • Default: null

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) or 0001-01-01T00:00:00+00:00 if the user never logged in.
  • AuthenticationMethod - Which authentication method the user is using.
    • Allowed values: domain, default.
  • Permissions - Permissions explicitly granted to the user (see Permissions).
  • Groups - The groups the user is member of. List of UserGroupEntity
    • Id - The id of the group. This id is unique.
    • Name - Name of the group.
  • Disabled - If true, the user can't log in the environment.
    • Allowed values: true, false.
    • Default: false.

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
UserEntity newUser = securityApi.CreateUser(null, new CreateUserRequestEntity()
{
    UserName = "test@test.com",
    Email = "test@test.com"
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

CreateUserRequestEntity userRequest = new CreateUserRequestEntity();
userRequest.setUserName("test@test.com");
userRequest.setEmail("test@test.com");

// Send the request
UserEntity newUser = securityApi.createUser(null, userRequest);

HTTP

curl -H "Content-Type: application/json" -X POST -d  "{'Username': 'test@test.com', 'Email': 'test@test.com'}" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • fields - A comma separated list of additional fields to be included.
    • Allowed values: nogroups, onlyworkspaceswithpermissions
    • Default: null

Returns

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
UserEntity user = securityApi.GetUser(100, null);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
UserEntity user = securityApi.getUser(100, null);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/users/100"
__

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. Required
  • user - The user information to be updated, of type UserRequestEntity. Required
    • UserName - 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.
    • 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 - If true, the user can't log in the environment.
      • Allowed values: true, false.
      • Default: false.

Returns

Examples

JavaScript

// Update user
eosAPI.Security.UpdateUser({
    id: 100 }, {
    requestBody: {
        Disabled: true
    }
})
.then(function(response) {
    var statusCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
UserEntity user = securityApi.UpdateUser(100, new UpdateUserRequestEntity()
{
    Disabled = true
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

UpdateUserRequestEntity userRequest = new UpdateUserRequestEntity();
userRequest.setDisabled(true);

// Send the request
UserEntity user = securityApi.updateUser(100, userRequest);

HTTP

curl -H "Content-Type: application/json" -X PUT -d  "{ 'Disabled':'true'}" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/users/100"

__

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
eosAPI.Security.DeleteUser({
    id: 100
})
.then(function(response) {
    var statusCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
securityApi.DeleteUser(100);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
securityApi.deleteUser(100);

HTTP

curl -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/users/100"

__

GetGroups

Returns the list of groups in the current environment.

GET /api/v2/groups

Parameters

  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue
  • fields - A comma separated list of additional fields to be included.
    • Allowed values: users, nouserids, onlyworkspaceswithpermissions
    • Default: null

Returns

Examples

JavaScript

// List all groups in the current environment
eosAPI.Security.GetGroups({
    start: 0,
    count: 100
})
.then(function(response) {
    var groups = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
List<GroupEntity> groups = securityApi.GetGroups(0, 100, null);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
List<GroupEntity> groups = securityApi.getGroups(0, 100, null);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/groups?start=0&count=100"

__

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 type GroupRequestEntity. Required
    • Name - Name of the group. Required
    • 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's null.
  • fields - A comma separated list of additional fields to be included.
    • Allowed values: users, nouserids, onlyworkspaceswithpermissions
    • Default: null

Returns GroupEntity

  • Id - The id of the group. This id is unique.
  • Name - The Name of the group
  • Permissions - Describes the group's permissions (see Permissions).
  • UsersIds - The users ids which are part of the group
  • Users - List of UserEntity which are part of this group IF asked for. Otherwise it's null.

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
GroupEntity group = securityApi.CreateGroup(null,  new GroupRequestEntity()
{
    Name = "Sales",
    UsersIds = new List<int> { 1, 2 }
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

List<Integer> userIds = new ArrayList<Integer>();
userIds.add(1);
userIds.add(2);

GroupRequestEntity groupRequest = new GroupRequestEntity();
groupRequest.setName("Sales");
groupRequest.setUsersIds(userIds);

// Send the request
GroupEntity group = securityApi.createGroup(null, groupRequest);

HTTP

curl -H "Content-Type: application/json" -X POST -d "{'Name':'Sales', 'Users':[1, 2]}" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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. Required
  • fields - A comma separated list of additional fields to be included.
    • Allowed values: users, nouserids, onlyworkspaceswithpermissions
    • Default: null

Returns

Examples

JavaScript

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

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
GroupEntity group = securityApi.GetGroup(100, "users");

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
GroupEntity group = securityApi.getGroup(100, "users");

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/groups/100"

__

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. Required
  • group - The group information to be updated, of type GroupRequestEntity. Required
    • Name - 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's null.

Returns

Examples

JavaScript

// Update group name
eosAPI.Security.UpdateGroup({
    id: 100 }, {
    requestBody: {
        name: "US Sales"
    }
})
.then(function(response) {
    var statusCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
GroupEntity group = securityApi.UpdateGroup(100, new GroupRequestEntity()
{
    Name = "US Sales"
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

GroupRequestEntity groupRequest = new GroupRequestEntity();
groupRequest.setName("US Sales");

// Send the request
GroupEntity group = securityApi.updateGroup(100, groupRequest);

HTTP

curl -H "Content-Type: application/json" -X PUT -d  "{name: 'US Sales'}" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/groups/100"

__

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
eosAPI.Security.DeleteGroup({
    id: 100
})
.then(function(response) {
    var statusCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
securityApi.DeleteGroup(100);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
securityApi.deleteGroup(100);

HTTP

curl -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/groups/100"

__

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 type EnvironmentPermissionsEntity.
      • 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
      • ManageEnvironment
        • Allowed values
          • true - The user or group can manage the current environment. This will override all other permissions to true, including workspace permissions.
          • false - The permission flag is not set
    • WorkspacePermissions[] - Describes the user's or group's permissions in the workspaces, of type WorkspacePermissionsEntity[]
      • Workspace - The current workspace name for which the permissions are enumerated
      • AccessWorkspace
        • Allowed values
          • true - The user can access the current workspace.
          • false - The permission flag is not set
      • 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.

__

GetPortalUsers

Returns the list of portal users from the current environment.

GET /api/v2/portal/users

Parameters

  • start - Start index
    • Default: 0
  • count - Number of results
    • Default: Int32.MaxValue

Returns

Examples

JavaScript

// List portal users in the current environment
eosAPI.Security.GetPortalUsers({
  start: 0,
  count: 100
})
.then(function(response) {
    var portalUsers = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
List<PortalUserEntity> users = securityApi.GetPortalUsers(0, 100);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
List<PortalUserEntity> users = securityApi.getPortalUsers(0, 100);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.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 type PortalUserRequestEntity. Required
    • UserName - The username of the portal user. This needs to be unique and it is used to log in. Required
    • Password - The user's password. Required
    • ContactSynchronizationId - 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 type ContactEntity
    • 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({},{
    requestBody: {
        UserName: "portal.username",
        Password: "P0rt@l.p@$$w0rd"
    }
})
.then(function(response) {
    var portalUser = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
PortalUserEntity newUser = securityApi.CreatePortalUser(new PortalUserRequestEntity()
{
    UserName = "portal.username",
    Password = "p0rt@l.p@$$w0rd"
});

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

PortalUserRequestEntity portalUser = new PortalUserRequestEntity();
portalUser.setUserName("portal.username");
portalUser.setPassword("p0rt@l.p@$$w0rd");

// Send the request
PortalUserEntity newUser = securityApi.createPortalUser(portalUser);

HTTP

curl -H "Content-Type: application/json" -X POST -d  "{'UserName': 'portal.username', 'Password': 'P0rt@l.p@ssw0rd'}" -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/portal/users?start=0&count=100"

__

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 from the current environment
eosAPI.Security.GetPortalUser({
    id: 100
})
.then(function(response) {
    var portalUser = response.obj;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
PortalUserEntity user = securityApi.GetPortalUser(100);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
PortalUserEntity user = securityApi.getPortalUser(100);

HTTP

curl -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/portal/users/100"

__

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
eosAPI.Security.DeletePortalUser({
    id: 100
})
.then(function(response) {
    var statusCode = response.status;
})

.NET

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

Configuration securityApiConfig = new Configuration()
{
    BasePath = apiUrl,
    DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
};

// Create a new Security API
SecurityApi securityApi = new SecurityApi(securityApiConfig);

// Send the request
securityApi.DeletePortalUser(100);

Java

String apiUrl = "https://nsccm.example.com";
String sessionToken = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";

ApiClient client = new ApiClient();
client.setBasePath(apiUrl);
client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));

// Create a new Security API
SecurityApi securityApi = new SecurityApi(client);

// Send the request
securityApi.deletePortalUser(100);

HTTP

curl -X DELETE -H "Authorization: Basic VE9LRU46NGI4YTg1MTgtZjU0NC00N2NhLWFmMmMtMzBmYzBlODU1NzU3" "https://nsccm.example.com/api/v2/portal/users/100"