- 0 minutes to read

Manage the Nodinite Web API

Empower your DevOps and integration workflows by automating Nodinite management with the Web API. This guide shows how to use REST-based operations to add, update, or manage artifacts—such as Integrations in the Repository—using your preferred programming language.

✅ Automate documentation and configuration as part of your DevOps pipeline
✅ Use REST-based API calls from PowerShell, C#, Java, or Node.js
✅ Streamline integration management and reduce manual effort
✅ Support both Windows Authentication and OAuth 2.0 / OpenID Connect (OIDC)

Note

Nodinite v7 introduces a new URL structure and enhanced security with OAuth 2.0 / OpenID Connect support. Learn more about configuring OAuth authentication.

Tired of writing documentation? Make it part of your DevOps experience instead!
You can use the Nodinite Web API to automate almost everything related to Nodinite, such as adding or modifying artifacts like an Integration in the Repository as part of your DevOps routine. You can use almost any programming language to call the REST-based operations.

Tip

Use automation to keep your documentation up to date as part of your DevOps experience.

Programming Language Description
Powershell Easily call REST endpoints with built-in PowerShell cmdlets
C# Integrate with .NET applications using WebClient and JSON parsing
Java Connect to the API from Java-based solutions
Node.js Use Node.js and npm packages for automation

Authentication Methods

Nodinite v7 supports two authentication methods for API access:

  1. Windows Authentication (NTLM/Kerberos) - Traditional on-premises authentication using Windows credentials
  2. OAuth 2.0 / OpenID Connect (OIDC) - Modern authentication for cloud-based deployments with enhanced security

For detailed OAuth configuration, see Install Nodinite v7 - OpenID.

Nodinite v7 URL Structure

Nodinite v7 introduces a simplified URL structure:

API Type URL Pattern Example
Web API https://{host}/webapi/api/ https://nodinite.local:41000/webapi/api/integrations
Log API https://{host}/logapi/api/ https://nodinite.local:41000/logapi/api/logevents

Tip

The new URL structure removes the application path segment (e.g., /Nodinite/Demo/) used in earlier versions.

Powershell

You can easily use Invoke-RestMethod to call any method in the Web API.

Windows Authentication

# Nodinite v7 URL structure
$nodiniteBaseUrl = "https://nodinite.local:41000"
$nodiniteWebApiUrl = "$nodiniteBaseUrl/webapi/api"

# Call with Windows credentials
$url = "$nodiniteWebApiUrl/integrations"
$getResponse = Invoke-RestMethod -Uri $url -Method Get -UseDefaultCredentials
$getResponse.Collection.Items[0].Data.IntegrationId

Example: Retrieve the first Integration Id using Windows Authentication in Nodinite v7.

OAuth 2.0 / OpenID Connect

When using OAuth 2.0 authentication, you need to obtain an access token first:

# Nodinite v7 with OAuth 2.0
$nodiniteBaseUrl = "https://nodinite.local:41000"
$nodiniteWebApiUrl = "$nodiniteBaseUrl/webapi/api"

# OAuth configuration (from your Identity Provider)
$tokenEndpoint = "https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token"
$clientId = "nodinite-prod-installation"
$clientSecret = "{your-client-secret}"
$scope = "api://nodinite-prod-webapi/.default"

# Request access token
$tokenBody = @{
    client_id     = $clientId
    client_secret = $clientSecret
    scope         = $scope
    grant_type    = "client_credentials"
}

$tokenResponse = Invoke-RestMethod -Uri $tokenEndpoint -Method Post -Body $tokenBody -ContentType "application/x-www-form-urlencoded"
$accessToken = $tokenResponse.access_token

# Call Web API with bearer token
$url = "$nodiniteWebApiUrl/integrations"
$headers = @{
    Authorization = "Bearer $accessToken"
}
$getResponse = Invoke-RestMethod -Uri $url -Method Get -Headers $headers
$getResponse.Collection.Items[0].Data.IntegrationId

Example: Retrieve the first Integration Id using OAuth 2.0 authentication in Nodinite v7.

Important

Store client secrets securely using Azure Key Vault, HashiCorp Vault, or environment variables. Never commit secrets to source control.

For more information on OAuth configuration, see Install Nodinite v7 - OpenID.

cSharp

Windows Authentication

using Newtonsoft.Json.Linq;
using System;
using System.Net;
using System.Text;

namespace ConnectWebAPI
{
    class Program
    {
        static void Main(string[] args)
        {
            // Nodinite v7 URL structure
            using (var client = new WebClient { UseDefaultCredentials = true })
            {
                client.Headers.Add(HttpRequestHeader.ContentType, "application/json; charset=utf-8");
                byte[] responseBody = client.DownloadData("https://nodinite.local:41000/webapi/api/integrations");
                var jsonBody = JObject.Parse(Encoding.ASCII.GetString(responseBody));
                var firstIntegration = jsonBody.SelectToken("Collection.Items[0].Data.IntegrationId");
                Console.WriteLine(firstIntegration);
            }
        }
    }
}

Example: Retrieve the first Integration Id using Windows Authentication in Nodinite v7.

OAuth 2.0 / OpenID Connect

using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

namespace ConnectWebAPIWithOAuth
{
    class Program
    {
        static async Task Main(string[] args)
        {
            // OAuth configuration
            var tokenEndpoint = "https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token";
            var clientId = "nodinite-prod-installation";
            var clientSecret = "{your-client-secret}";
            var scope = "api://nodinite-prod-webapi/.default";

            // Get access token
            using var tokenClient = new HttpClient();
            var tokenRequest = new FormUrlEncodedContent(new[]
            {
                new KeyValuePair<string, string>("client_id", clientId),
                new KeyValuePair<string, string>("client_secret", clientSecret),
                new KeyValuePair<string, string>("scope", scope),
                new KeyValuePair<string, string>("grant_type", "client_credentials")
            });

            var tokenResponse = await tokenClient.PostAsync(tokenEndpoint, tokenRequest);
            var tokenJson = JObject.Parse(await tokenResponse.Content.ReadAsStringAsync());
            var accessToken = tokenJson["access_token"].ToString();

            // Call Web API
            using var apiClient = new HttpClient();
            apiClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
            
            var apiResponse = await apiClient.GetStringAsync("https://nodinite.local:41000/webapi/api/integrations");
            var jsonBody = JObject.Parse(apiResponse);
            var firstIntegration = jsonBody.SelectToken("Collection.Items[0].Data.IntegrationId");
            Console.WriteLine(firstIntegration);
        }
    }
}

Example: Retrieve the first Integration Id using OAuth 2.0 authentication in Nodinite v7.

Java

Node.js

Windows Authentication

// This example uses httpntlm (https://www.npmjs.com/package/httpntlm)
// Run: "npm install httpntlm --save" before running this script.

var httpntlm = require('httpntlm');
var url = 'https://nodinite.local:41000/webapi/api/integrations';

httpntlm.get({
  url: url,
  username: '{YourWindowsUsername}',
  password: '{YourWindowsPassword}'
}, function (err, res) {
  if (err) return err;

  var jsonBody = JSON.parse(res.body);
  var firstIntegration = jsonBody.Collection.Items[0].Data.IntegrationId;

  console.log(`First Integration Id: ${firstIntegration}`);
});

Example: Retrieve the first Integration Id using Windows Authentication in Nodinite v7.

Important

Your password should be protected. Use the Pre-Encrypt password feature in a real-world scenario.

OAuth 2.0 / OpenID Connect

// This example uses axios (https://www.npmjs.com/package/axios)
// Run: "npm install axios --save" before running this script.

const axios = require('axios');
const qs = require('querystring');

async function getIntegrations() {
  try {
    // OAuth configuration
    const tokenEndpoint = 'https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token';
    const clientId = 'nodinite-prod-installation';
    const clientSecret = '{your-client-secret}';
    const scope = 'api://nodinite-prod-webapi/.default';

    // Get access token
    const tokenResponse = await axios.post(tokenEndpoint, qs.stringify({
      client_id: clientId,
      client_secret: clientSecret,
      scope: scope,
      grant_type: 'client_credentials'
    }), {
      headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    });

    const accessToken = tokenResponse.data.access_token;

    // Call Web API
    const apiUrl = 'https://nodinite.local:41000/webapi/api/integrations';
    const apiResponse = await axios.get(apiUrl, {
      headers: { 'Authorization': `Bearer ${accessToken}` }
    });

    const firstIntegration = apiResponse.data.Collection.Items[0].Data.IntegrationId;
    console.log(`First Integration Id: ${firstIntegration}`);
  } catch (error) {
    console.error('Error:', error.response ? error.response.data : error.message);
  }
}

getIntegrations();

Example: Retrieve the first Integration Id using OAuth 2.0 authentication in Nodinite v7.

Important

Store client secrets securely using environment variables or a secrets management service. Never commit secrets to source control.


Next Step

Install Nodinite v7 - OpenID
Integrations
Repository Model

Log API
Register Nodinite Applications in Azure AD (Entra ID) with OpenID
Install Nodinite v7