NorthStar CCM (EngageCX 14/Ruby) API Guide

This documentation describes the Application Programming Interfaces (API v2) for the NorthStar CCM Platform version R2025 (formerly EngageCX 14/Ruby) and later.

Introducing NorthStar CCM API 2

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

The following features are matching the MHC NorthStar CCM solution:

MHC NorthStar CCM provides the following APIs:

Notes

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

  • For MHC NorthStar CCM installations, the ports default to 80 (HTTP) and 443 (HTTPS).
  • In the cloud however, only HTTPS (port 443) access is provided .
  • Live REST API Documentation

    The REST API is accompanied by a live documentation page which allows you to send requests in real time and examine the response.

    To access the Live REST API Inspector:

    Getting Started

    Authentication

    NorthStar CCM uses API keys in order to authenticate requests made by clients. To manage API keys, from your NorthStar CCM home page, access the Developer module/API Keys.

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

    Single Sign-On

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

    Read more about NorthStar CCM SSO here.

    Template management

    NorthStar CCM uses document templates (.epr files created in NorthStar CCM Design Studio) to merge data points with layout and create personalized documents. This process is called document composition. Within NorthStar CCM Platform, templates are managed in a high-performance repository with versioning capabilities. Use the top-left menu to access your workspaces.

    Using JavaScript API

    Including the library

    The JavaScript API is referenced through NorthStarCCM.Client.2.0.js. To download the API, from your NorthStar CCM home page, access Developer module/Software.

    <html>
        <head>
            <script src="https://nsccm.example.com/NorthStarCCM.Client.2.0.js"></script>
        </head>
    <body>
        <script>
        // JavaScript code that uses the EngageCX API
        </script>
    </body>
    </html>
    

    Using the API

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

    // Wait for the API to initialize
    eosAPI.ready(function(){
        // Authenticate using an API key
        eosAPI.authorize("API:59e80576-19e5-4808-98c0-cf2c9da055ea")
        .catch(function(error){
            // Handle any authentication errors here
            alert("Authentication failure: " + error.response.statusText);
        })
    });
    // Wait for authorize() to complete
    eosAPI.authorized(function(){
        // Render an xml to pdf using a template
        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: {}
            }
        })
        .then(function(response) {
            // PDF rendered and received. You can use response.data to retrieve the PDF bytes, 
            // however for this sample the previewResponse utility is used 
            // to quickly preview the response bytes in a new window
            eosAPI.Util.previewResponse(response);
        })
        .catch(function(error){
            // Handle any render errors here
            alert("Render error: " + error.response.obj.Message);
        });
    });
    

    Notes

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

    Downloading the API

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

    Using the API

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

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

    string apiUrl = "http://nsccm.example.com";
    string apiKey = "API:898d6c1c-057f-4b8a-b429-c0bafa5a1ebf";
    string downloadFolder = "C:/Temp/";
    string fileName = "sample-xml2pdf.pdf";
    
    try
    {
        // Authenticate
        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;
        Configuration directRenderApiConfig = new Configuration()
        {
            BasePath = apiUrl,
            DefaultHeaders = new Dictionary<string, string>() { { "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionToken)) } }
        };
    
        Console.WriteLine("Your token is: {0}", sessionToken);
    
        // Render XML -> PDF
        // Create a new Render API
        DirectRenderApi renderApi = new DirectRenderApi(directRenderApiConfig);
    
        // Create a new render request
        RenderRequestEntity request = new RenderRequestEntity()
        {
            InputSettings = new InputSettings()
            {
                Template = new Template()
                {
                    Workspace = "Default",
                    Path = @"Retail\Bookstore Invoice\Invoice.epr"
                }
            },
            Input = new Input()
            {
                InputFormat = "xml",
                Source = "<?xml version=\"1.0\" standalone=\"yes\"?>" +
                    "<root>" +
                        "<Invoices>" +
                            "<Invoice>" +
                                "<InvoiceProperties>" +
                                    "<number>02116</number>" +
                                    "<date>2016-06-10</date>" +
                                "</InvoiceProperties>" +
                                "<CustomerInformation>" +
                                    "<name>Earl Library Co.</name>" +
                                    "<address>1021 South Main Street,Seattle, Washington 92315</address>" +
                                    "<email>sales@earlbook.com</email>" +
                                    "<telephone>(206)321-2345</telephone>" +
                                "</CustomerInformation>" +
                                "<Products>" +
                                    "<Product>" +
                                        "<id>1</id>" +
                                        "<name>Rendezvous with Rama by Arthur C. Clarke</name>" +
                                        "<price>15</price>" +
                                        "<quantity>3</quantity>" +
                                        "<total>45</total>" +
                                        "<description>An all-time science fiction classic, Rendezvous with Rama is also one of Clarke's best novels--it won the Campbell, Hugo, Jupiter, and Nebula Awards.</description>" +
                                    "</Product>" +
                                "</Products>" +
                                "<Comments>" +
                                    "<comments>Contact us with any questions you may have.</comments>" +
                                "</Comments>" +
                            "</Invoice>" +
                        "</Invoices>" +
                    "</root>"
            },
            PdfOutput = new PdfOutput()
        };
    
        // Send the request
        Stream response = renderApi.Render(request);
    
        Console.WriteLine("XML -> PDF rendered ok");
    
        // Download the PDF locally
        if (!Directory.Exists(downloadFolder))
            Directory.CreateDirectory(downloadFolder);
    
        // Write the file
        using (System.IO.Stream newFile = System.IO.File.OpenWrite(downloadFolder + fileName))
        {
            response.CopyTo(newFile);
        }
    
        Console.WriteLine("Downloaded response file to folder: {0}", downloadFolder + fileName);
    }
    catch (Exception ex)
    {
        Console.WriteLine("Error: {0}", ex.Message);
    }
    

    Using Java API

    Downloading the API

    In Java you need to include a reference to EngageCX.Client.JAVA-2.0.0.jar. To download the API, from your NorthStar CCM home page, access the Developer module/Software.

    Using the API

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

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

    String apiUrl = "http://nsccm.example.com";
    String apiKey = "API:898d6c1c-057f-4b8a-b429-c0bafa5a1ebf";
    String downloadFolder = "C:/Temp/";
    String fileName = "sample-xml2pdf.pdf";
    
    // Authenticate
    ApiClient client = new ApiClient();
    client.setBasePath(apiUrl);
    client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(apiKey.getBytes()));
    
    AuthorizationApi authorizationApi = new AuthorizationApi(client);
    String sessionToken = authorizationApi.getToken().getAccessToken();
    client.addDefaultHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(sessionToken.getBytes()));
    
    System.out.format("Your token is: %s%n", sessionToken);
    
    // Create RenderRequest
    RenderRequestEntity renderRequest = new RenderRequestEntity();
    
    InputSettings inputSettings = new InputSettings();
    Template template = new Template();
    template.setWorkspace("Default");
    template.setPath("Retail\\Bookstore Invoice\\Invoice.epr");
    inputSettings.setTemplate(template);
    renderRequest.setInputSettings(inputSettings);
    
    Input input = new Input();
    input.setInputFormat("xml");
    input.setSource("<?xml version=\"1.0\" standalone=\"yes\"?>" +
            "<root>" +
                "<Invoices>" +
                    "<Invoice>" +
                        "<InvoiceProperties>" +
                            "<number>02116</number>" +
                            "<date>2016-06-10</date>" +
                        "</InvoiceProperties>" +
                        "<CustomerInformation>" +
                            "<name>Earl Library Co.</name>" +
                            "<address>1021 South Main Street,Seattle, Washington 92315</address>" +
                            "<email>sales@earlbook.com</email>" +
                            "<telephone>(206)321-2345</telephone>" +
                        "</CustomerInformation>" +
                        "<Products>" +
                            "<Product>" +
                                "<id>1</id>" +
                                "<name>Rendezvous with Rama by Arthur C. Clarke</name>" +
                                "<price>15</price>" +
                                "<quantity>3</quantity>" +
                                "<total>45</total>" +
                                "<description>An all-time science fiction classic, Rendezvous with Rama is also one of Clarke's best novels--it won the Campbell, Hugo, Jupiter, and Nebula Awards.</description>" +
                            "</Product>" +
                        "</Products>" +
                        "<Comments>" +
                            "<comments>Contact us with any questions you may have.</comments>" +
                        "</Comments>" +
                    "</Invoice>" +
                "</Invoices>" +
            "</root>");
    renderRequest.setInput(input);
    
    renderRequest.setPdfOutput(new PdfOutput());
    
    DirectRenderApi renderApi = new DirectRenderApi(client);
    
    // Send the Request
    File response = renderApi.render(renderRequest);
    
    // Write the file
    byte[] data = Files.readAllBytes(response.toPath());
    OutputStream out = new FileOutputStream(new File(downloadFolder + fileName));
    out.write(data);
    out.close();
    
    System.out.format("File %s downloaded ok%n", downloadFolder + fileName);
    

    Java SDK Notes

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

    General Notes

    Error handling

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

    Example:

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

    Dates and durations

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

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

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

    "PT1.52S"
    

    API Reference

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

    Returns TokenEntity

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

    Examples

    JavaScript

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

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

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

    var apiKey = "API:dee401eb-d3e5-4523-9f90-c19a573e7e0a";
    eosAPI.authorize(apiKey)
    .catch(function(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

    Returns

    Examples

    JavaScript

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

    .NET

    string token = "TOKEN:c87ca566-2587-4480-8a7a-27531f04af80";
    
    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

    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:

    You must provide SAMLResponse or wresult.

    Returns


    DirectData

    Data

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

    POST /api/v2/data

    Parameters

    Returns

    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
    Stream response = dataApi.Data(request)
    

    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"
    

    DirectRender

    Render

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

    POST /api/v2/render

    Render Parameters


    Returns


    Input

    Input Settings

    HTML Input

    PDF Output

    AFP Output

    HTML Output

    TXT Output

    PNG Output

    JPG Output

    GIF Output

    PRN Output

    PS Output

    Wordml Output

    PPTX Output

    Editable PPTX Output

    DOCX Output

    EPUB Output

    TIFF Output

    IOCA Output

    XPS Output

    DICOM Output

    SMS Output

    ZPL Output

    Input Template

    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
    Stream response = renderApi.Render(request);
    

    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

    Returns

    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

    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

    Notes

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

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

    Returns FileEntity[]

    Examples

    JavaScript

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

    .NET

    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

    Returns

    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

    Returns

    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

    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

    Returns

    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

    Returns FileDependenciesEntity

    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

    Returns

    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

    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

    Returns RepositoryItemEntity[]

    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

    Returns FolderPermissionsEntity[]

    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 arrary, folder permssions will be reset. UserId and GroupId are mutual exclusive.

    POST /api/v2/folders/permissions

    Parameters

    Returns

    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

    Returns FolderEntity

    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

    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

    Returns

    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

    Returns

    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

    Returns

    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

    Returns

    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

    Returns

    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

    Returns WorkspaceEntity[]

    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

    Returns WorkspaceEntity

    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

    Returns WorkspaceEntity

    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

    Returns

    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

    Returns

    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

    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

    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

    Returns JobEntity

    JobStatus

    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

    Returns

    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

    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

    Returns

    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

    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

    Returns

    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

    Returns

    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

    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

    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

    Returns

    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

    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

    Returns

    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

    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

    Returns FileShareResponse

    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

    Returns

    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

    Returns ResourceTokenEntity

    Use case

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

    Examples

    JavaScript

    eosAPI.Resources.GetJobResourceToken({
        id: "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

    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

    Returns EmailTicketEntity

    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

    Returns

    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

    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

    Returns PrintTicketEntity

    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

    Returns

    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

    Returns LogMessageEntity[]

    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

    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

    Returns UserEntity

    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

    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

    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

    Returns

    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

    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

    Returns GroupEntity

    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

    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

    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

    Returns

    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.

    __

    GetPortalUsers

    Returns the list of portal users from the current environment.

    GET /api/v2/portal/users

    Parameters

    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

    Returns PortalUserEntity

    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

    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

    Returns

    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"
    

    Single Sign-On (SSO)

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

    Set up

    Set up SAML

    This set up applies to both Enterprise and Portal Websites.

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

    1. Access the Enterprise Website. Login as an enterprise user and go to the Admin Settings page and access the SSO under Sysinternals.
    2. Select Setup Enterprise SSO or Setup Portal SSO based on which website you want to enable SSO for.
    3. Select SAML 2.0 as SSO Type.
      • Enter the IdP Login URL to setup IdP (identity provider). Use HTTPS. The Login Url is used when a user attempts to login. NorthStar CCM triggers a redirect to the URL and expects a POST request with the SAML Assertion Response on the SAML Assertion Consumer endpoint, /Security/ConsumeSAMLToken. In response, the NorthStar CCM service provider produces an NorthStar CCM access token for the assertion subject and redirects the now authenticated user to NorthStar CCM homepage.
      • Optionally, you can provide a Logout URL.
      • Provide the X.509 public key certificate in PEM format from the IdP. This establishes a trust relationship between the SP and the IdP. During runtime NorthStar CCM uses the certificate to validate that the digital signature originated from the IdP.
    4. Once ready, select Next to proceed with the Users Mapping configuration. Select Add new mapping to map fields within NorthStar CCM.
      • Select the available user profile fields from the drop-down list and then,
      • Enter in the related empty field, the correspondent Identity Provider attribute issued for mapping.
    5. Once ready, select Save and continue. In the last step, a notification will inform you about the SSO connection if it was successful or not. To ensure that the Single Sign-On is set correctly, select the Login now using SSO button. You will be redirected to the Identity Provider sign in page. Log in to the IdP website.
    6. Once ready, in the SSO Wizard, select Finish to save the changes.

    Set up WS-Federation

    To set up NorthStar CCM service provider WS-Federation with 3rd party IdPs, step through the following process:

    1. Access the Enterprise Website. Login as an enterprise user and go to the Admin Settings page and access the SSO under Sysinternals.
    2. Select Setup Enterprise SSO or Setup Portal SSO based on which website you want to enable SSO for.
    3. Select WS-Federation as SSO Type and proceed with the SSO Configuration Wizard:
      • IdP Login URL: Enter the URL associated with logging in to the Identity Provider address. Login URL is used when a user attempts to login with SSO. NorthStar CCM triggers a redirect to the URL and expects a POST request. In response, the NorthStar CCM Platform produces an NorthStar CCM access token for the assertion subject and redirects the now authenticated user to the NorthStar CCM Homepage.
      • IdP Logout URL: Optionally, you can provide a logout URL from your Identity Provider. This will validate the request to the IdP.
    4. Once ready, select Next to proceed with the Users Mapping configuration. Select Add new mapping to map fields within NorthStar CCM.
      • Select the available user profile fields from the drop-down list and then,
      • Enter in the related empty field, the correspondent Identity Provider attribute issued for mapping.
    5. Once ready, select Save and continue. In the last step, a notification will inform you about the SSO connection if it was successful or not. To ensure that the Single Sign-On is set correctly, select the Login now using SSO button. You will be redirected to the Identity Provider sign in page. Log in to the IdP website.
    6. Once ready, in the SSO Wizard, select Finish to save the changes.

    Portal

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

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

    Creating NorthStar CCM Portal Users on the fly

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

    Using SSO API

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

    SSO API Reference