Introduction

Welcome to the IGLOO API Reference! You can use our API to manipulate various data sources inside the platform, and to build your own Igloo widgets and middleware. Code examples are viewable on the right-hand side by using the buttons to toggle platform/language.

Not every platform and programming language will have an applicable code example for every possible use case or API related activitiy. However, to get you started in the best way possible, this document walks the developer through authentication first. Once authentication is successfully handled, the rest of the IGLOO API endpoints are available for use.

Code examples displayed in the documentation after Authentication contain only the required information, and do not stand-alone as a full software application that can be compiled. They are meant to be used in conjunction with the authentication code examples, and ultimately are meant as a guide only. Happy coding!

Usage

Before you begin, you should read the Overview of the Igloo API.

Using the API in the front-end of a web browser is for the most part a simple matter of obtaining an object ID and passing it in to construct the desired URI of an API call. No authentication is required when using the regular user interface of our product in a web browser run-time environment.

This KB article explains how to use the IGLOO API from inside your custom widget.

In all other scenarios, authentication needs to be established before subsequent API calls will be authorized and return data.

#!/bin/bash
# Usage of the IGLOO APIs requires authentication. Sessions within the front-end of a web browser allow you to make API calls without authentication. Connections performed externally to an IGLOO digital workplace are authenticated, with session data handled manually or within a cookie container depending on the run-time environment of the programming language.
/*
=============================================================================
Usage of the IGLOO APIs requires authentication. Sessions within the 
front-end of a web browser allow you to make API calls without 
authentication. Connections performed externally to an IGLOO digital 
workplace are authenticated, with session data handled manually or within a 
cookie container depending on the run-time environment of the programming 
language.
=============================================================================
*/
/// <summary>
/// Usage of the IGLOO APIs requires authentication. Sessions within the 
/// front-end of a web browser allow you to make API calls without 
/// authentication. Connections performed externally to an IGLOO digital 
/// workplace are authenticated, with session data handled manually or within a 
/// cookie container depending on the run-time environment of the programming 
/// language.
/// </summary>
/**
* @description Usage of the IGLOO APIs requires authentication. Sessions within the 
* front-end of a web browser allow you to make API calls without 
* authentication. Connections performed externally to an IGLOO digital 
* workplace are authenticated, with session data handled manually or within a 
* cookie container depending on the run-time environment of the programming 
* language.
*/
/**
* @description Usage of the IGLOO APIs requires authentication. Sessions within the 
* front-end of a web browser allow you to make API calls without 
* authentication. Connections performed externally to an IGLOO digital 
* workplace are authenticated, with session data handled manually or within a 
* cookie container depending on the run-time environment of the programming 
* language.
*/
# Usage of the IGLOO APIs requires authentication. Sessions within the front-end of a web browser allow you to make API calls without authentication. Connections performed externally to an IGLOO digital workplace are authenticated, with session data handled manually or within a cookie container depending on the run-time environment of the programming language.
//----------------------------------------------------------------------------
// Usage of the IGLOO APIs requires authentication. Sessions within the 
// front-end of a web browser allow you to make API calls without 
// authentication. Connections performed externally to an IGLOO digital 
// workplace are authenticated, with session data handled manually or within a 
// cookie container depending on the run-time environment of the programming 
// language.
//----------------------------------------------------------------------------
<#
.SYNOPSIS
    Usage of the IGLOO APIs requires authentication. Sessions within the 
    front-end of a web browser allow you to make API calls without 
    authentication. Connections performed externally to an IGLOO digital 
    workplace are authenticated, with session data handled manually or within a 
    cookie container depending on the run-time environment of the programming 
    language.
#>

Authentication

Authentication is only required if you are trying to connect to Igloo from a 3rd-party service or application. Otherwise,all API calls will be fully authenticated by the active browser session, and will respect the permissions assignedto the currently logged in user.

To create a session, you must provide the following data encoded as a form submission (x-www-form-urlencoded) aspart of the request body:

Parameter
Type
Value
AppID
string
API key provided by Igloo Software.
AppPassword
string
Randomly generated password provided by Igloo Software.
ApiVersion
string
0 by default.
UserName
string
Igloo digital workplace user to log in as (always an email address.)
UserPassword
string
Password that corresponds to UserName.
Instance
string
0 by default.

Contact Developer Support to obtain an AppID and AppPassword.

Create Session

Request:

POST https://site.igloocommunities.com/.api2/api/Session/Create HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded            

AppID=00000000-0000-0000-0000-000000000000&AppPassword=password&ApiVersion=0&UserName=tex.murphy@igloosoftware.com&UserPassword=password&Instance=0

Response:

HTTP/1.1 201 Created
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8

{  
    "TokenId": "string",
    "UserId": "string",
    "Expiry":"string",
    "RememberExpiry": null,
    "AppId": "string",
    "SecretKey": "string",
    "PrivatePlatformKey": "string",
    "BaseUri": "string",
    "CustomSessionToken": "string",
    "FlashToken": "string",
    "IsFlashSession": boolean,
    "CommunityID": "string",
    "IsValid": boolean
}
#!/bin/bash
# JSON parse
function jsonval {
    temp=`echo $json | 
    sed 's/\\\\\//\//g' | 
    sed 's/[{}]//g' | 
    awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | 
    sed 's/\"\:\"/\|/g' | 
    sed 's/[\,]/ /g' | 
    sed 's/\"//g' | 
    grep -w $prop`
    echo ${temp##*|}
}

# Send the HTTP request
curl -X POST "https://site.igloocommunities.com/.api2/api/Session/Create" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --data "AppID=00000000-0000-0000-0000-000000000000&AppPassword=password&ApiVersion=0&UserName=user@site.com&UserPassword=password&Instance=0" -o return.json

# Session Key
json=$(cat return.json)
prop='TokenId'
sessionkey=`jsonval`

# Clean up
rm -rf return.json

# To make the next API call, pass $sessionkey to the cookie parameter:
# curl -X GET url --cookie "iglooauth=$sessionkey"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <curl/curl.h>
#include "json\json.h" // https://github.com/open-source-parsers/jsoncpp

using namespace std;

string iglooauth; // Globally accessible for subsequent API calls

static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
	((string*)userp)->append((char*)contents, size * nmemb);
	return size * nmemb;
}

class Igloo {
public:
	string community = "https://admiral.igloocommunities.com";
	string uri = "/.api2/api/Session/Create";
	string url = community + uri;

	string body = "";
	string AppID = "00000000-0000-0000-0000-000000000000";
	string AppPassword = "password";
	string ApiVersion = "1";
	string UserName = "tex.murphy@igloosoftware.com";
	string UserPassword = "password";
	string Instance = "0";
};

int main(void)
{
	string readBuffer;

	CURLcode ret;
	CURL *hnd;

	struct curl_slist *headers;
	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");
	headers = curl_slist_append(headers, "Content-type: application/x-www-form-urlencoded");

	// This will contain the Session/Create JSON root value after parsing
	Json::Value root;
	string errs;
	Json::CharReaderBuilder builder;
	Json::CharReader * reader = builder.newCharReader();

	Igloo session;

	// POST Body
	session.body = "AppId=" + session.AppID +
		"&AppPassword=" + session.AppPassword +
		"&ApiVersion=" + session.ApiVersion +
		"&UserName=" + session.UserName +
		"&UserPassword=" + session.UserPassword +
		"&Instance=" + session.Instance;

	hnd = curl_easy_init();

	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_COOKIEFILE, "");
	curl_easy_setopt(hnd, CURLOPT_URL, session.url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, session.body.c_str());
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)146);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
	curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, WriteCallback);
	curl_easy_setopt(hnd, CURLOPT_WRITEDATA, &readBuffer);

	ret = curl_easy_perform(hnd);

	// Parse return data
	bool parseJson = reader->parse(readBuffer.c_str(), readBuffer.c_str() + readBuffer.size(), &root, &errs);
	delete reader;

	if (!parseJson) {
		cout << "There is no valid JSON data to parse." << endl;
		cout << errs << endl;
	}
	else {
		// Write output to the terminal
		cout << root << endl;

		// Store the TokenId
		iglooauth = root.get("TokenId", NULL).asString();

		// Write TokenId to the terminal
		cout << "TokenId: " << iglooauth << endl;

		/*
		
		The TokenId and Session Key are one in the same. There are 2 ways to handle it.

		It can be appended to the end of URLs as a query parameter:

			string uri = uri + "?sessionKey=" + iglooauth.c_str();

		Another way is to instantiate it as the "iglooauth" cookie:

			curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());

		*/
	}

	curl_easy_cleanup(hnd);

	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return 0;
}

//===========================================================================
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Net;
using Newtonsoft.Json;

namespace MyCustomIglooApp
{
    /// <summary>
    /// IGLOO digital workplace details
    /// </summary>
    class Igloo
    {
        public const string Url = "https://site.igloocommunities.com";
    }

    class Program
    {
        public static CookieContainer cookies = new CookieContainer();

        static HttpClientHandler handler = new HttpClientHandler()
        {
            AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
            UseCookies = true,
            CookieContainer = cookies
        };

        static HttpClient client = new HttpClient(handler);

        /// <summary>
        /// Create an IGLOO session
        /// </summary>
        static void Main()
        {
            // Uri
            Uri uri = new Uri(Igloo.Url + "/.api2/api/Session/Create");

            // Headers
            client.DefaultRequestHeaders.Add("Accept", "application/json");

            // Parameters
            var Params = new Dictionary<string, string>();
            Params.Add("AppID", "00000000-0000-0000-0000-000000000000");
            Params.Add("AppPassword", "password");
            Params.Add("ApiVersion", "0");
            Params.Add("UserName", "tex.murphy@igloosoftware.com");
            Params.Add("UserPassword", "password");
            Params.Add("Instance", "0");

            // Body
            var Body = new FormUrlEncodedContent(Params);

            // Send the HTTP Request
            using (client)
            {
                var response = client.PostAsync(uri, Body).Result;

                var responseContent = response.Content;

                if ((int)response.StatusCode == 201)
                {
                    string responseString = responseContent.ReadAsStringAsync().Result;

                    ReturnData iglooSession = JsonConvert.DeserializeObject<ReturnData>(responseString);

                    // Create cookie & add it to the CookieContainer
                    cookies.Add(new Uri(community), new Cookie("iglooauth", iglooSession.TokenId));
                }
            }
        }

        /// <summary>
        /// Class for JSON response data
        /// </summary>
        public class ReturnData
        {
            public string TokenId { get; set; }
            public string UserId { get; set; }
            public DateTime Expiry { get; set; }
            public object RememberExpiry { get; set; }
            public string AppId { get; set; }
            public string SecretKey { get; set; }
            public string PrivatePlatformKey { get; set; }
            public string BaseUri { get; set; }
            public string CustomSessionToken { get; set; }
            public string FlashToken { get; set; }
            public bool IsFlashSession { get; set; }
            public string CommunityID { get; set; }
            public bool IsValid { get; set; }
        }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "AppID=00000000-0000-0000-0000-000000000000&AppPassword=password&ApiVersion=1&UserName=tex.murphy%40igloosoftware.com&UserPassword=password&Instance=0";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
    if (this.readyState === 4) {
        console.log(this.responseText);
    }
});

xhr.open("POST", "https://site.igloocommunities.com/.api2/api/Session/Create");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://site.igloocommunities.com/.api2/api/Session/Create",
    "method": "POST",
    "headers": {
        "Content-Type": "application/x-www-form-urlencoded"
    },
    "data": {
        "AppID": "00000000-0000-0000-0000-000000000000",
        "AppPassword": "password",
        "ApiVersion": "1",
        "UserName": "tex.murphy@igloosoftware.com",
        "UserPassword": "password",
        "Instance": "0"
    }
}

jQuery.ajax(settings).done(function (response) {
    console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
    }
};

axios.post('https://site.igloocommunities.com/.api2/api/Session/Create', {
    AppID: '00000000-0000-0000-0000-000000000000',
    AppPassword: 'password',
    ApiVersion: '1',
    UserName: 'tex.murphy@igloosoftware.com',
    UserPassword: 'password',
    Instance: '0'
}, config);
var request = require('request');

var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded'
};

var dataString = 'AppID=00000000-0000-0000-0000-000000000000&AppPassword=password&ApiVersion=0&UserName=user@site.com&UserPassword=password&Instance=0';

var options = {
    url: 'https://site.igloocommunities.com/.api2/api/Session/Create',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 201) {
        console.log(body);
    }
}

request(options, callback);
import requests

url = 'https://site.igloocommunities.com'

headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

params = [
  ('AppID', '00000000-0000-0000-0000-000000000000'),
  ('AppPassword', 'password'),
  ('ApiVersion', '0'),
  ('UserName', 'tex.murphy@igloosoftware.com'),
  ('UserPassword', 'password'),
  ('Instance', '0'),
]

# Send HTTP request
response = requests.post(url + '/.api2/api/Session/Create', headers=headers, data=params)
data = response.json()

# Session Key
TokenId = data['TokenId']
cookies = dict(iglooauth=TokenId)

# To make the next API call, use the cookies parameter:
# response = requests.get(url, cookies=cookies)
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();

$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded'
);

$data = array(
    'AppID' => '00000000-0000-0000-0000-000000000000',
    'AppPassword' => 'password',
    'ApiVersion' => '0',
    'UserName' => 'tex.murphy@igloosoftware.com',
    'UserPassword' => 'password',
    'Instance' => '0'
);

$response = Requests::post('https://site.igloocommunities.com/.api2/api/Session/Create', $headers, $data);
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession

$iglooUrl = "site.igloocommunities.com"
$sessionCreate = "https://${iglooUrl}/.api2/api/Session/Create"

$cookie = New-Object System.Net.Cookie
$cookie.Name = "iglooauth"
$cookie.Value = ""
$cookie.Domain = $iglooUrl

# Headers
$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

# POST body
$params = @{
    AppID        = "00000000-0000-0000-0000-000000000000" 
    AppPassword  = "password"
    ApiVersion   = "0"
    UserName     = "tex.murphy@igloosoftware.com"  
    UserPassword = "password"      
    Instance     = "0"              
}

# Send HTTP request
$response = Invoke-WebRequest -Method Post -Uri $sessionCreate -Headers $headers -Body $params -WebSession $session
$result = $response | ConvertFrom-Json

# Get the TokenId
$cookie.Value = $result.TokenId

# Set the TokenId as the iglooauth cookie
$session.Cookies.Add($cookie)

Keep-alive

Send this HTTP GET request approximately every 15 minutes if your software requires a persistent connection.

Request:

GET https://site.igloocommunities.com/.api/api.svc/igloo/heartbeat HTTP/1.1
Host: site.igloocommunities.com
Cookie: iglooauth=00000000-0000-0000-0000-000000000000
Accept: application/json

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{  
   "minRequestPeriod":integer,
   "requestSupportCode":integer,
   "dictionary":null,
   "response":null
}
#!/bin/bash
curl -X GET "https://site.igloocommunities.com/.api/api.svc/igloo/heartbeat" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Keep-alive
=============================================================================
*/
int heartbeat()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/igloo/heartbeat";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Keep the session alive.
/// </summary>
class Util
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void Heartbeat()
    {
        // Uri
        Uri uri = new Uri("https://site.igloocommunities.com/.api/api.svc/igloo/heartbeat");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooSession = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Class for JSON response data
    /// </summary>
    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public int requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public object response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/igloo/heartbeat");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/igloo/heartbeat",
  "method": "GET"
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/igloo/heartbeat', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/igloo/heartbeat',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

response = requests.get('https://site.igloocommunities.com/.api/api.svc/igloo/heartbeat', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/igloo/heartbeat', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/igloo/heartbeat"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Community

These endpoints return site details about your Igloo Digital Workplace.

# Community

View Community

Request:

GET https://site.igloocommunities.com/.api/api.svc/community/view HTTP/1.1
Host: site.igloocommunities.com
Cache-Control: no-cache
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "Community:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"IsArchived": boolean,
		"IsScheduledForArchiving": boolean,
		"SpaceId": null,
		"commentprivileges": "string",
		"title": "string",
		"content": "string",
		"description": "string",
		"created": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": null
		},
		"modified": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": null
		},
		"statistics": {
			"rating": {
				"votes": integer,
				"average": integer,
				"sum": integer
			},
			"views": {
				"views": integer,
				"downloads": integer
			},
			"contents": {
				"comments": integer,
				"children": integer
			}
		},
		"numAttachments": integer,
		"isPublished": boolean,
		"published": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": null
		},
		"AuthenticationMethod": integer,
		"ClearSessionOnExitEnabled": boolean,
		"EmailBrandingEnabled": boolean,
		"ForgotPasswordEnabled": boolean,
		"InvitationsEnabled": boolean,
		"NotificationsEnabled": boolean,
		"RememberMeEnabled": boolean,
		"SessionDurationInMinutes": integer,
		"domain": "string",
		"masterDomain": null,
		"microblogsEnabled": boolean,
		"registrationEnabled": boolean,
		"version": "string"
	}
}
#!/bin/bash
curl -X GET "https://site.igloocommunities.com/.api/api.svc/community/view" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View Community
=============================================================================
*/
int viewCommunity()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/community/view";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View Community
/// </summary>
class Community
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewCommunity()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/community/view");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Created
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public Statistics statistics { get; set; }
        public int numAttachments { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public int AuthenticationMethod { get; set; }
        public bool ClearSessionOnExitEnabled { get; set; }
        public bool EmailBrandingEnabled { get; set; }
        public bool ForgotPasswordEnabled { get; set; }
        public bool InvitationsEnabled { get; set; }
        public bool NotificationsEnabled { get; set; }
        public bool RememberMeEnabled { get; set; }
        public int SessionDurationInMinutes { get; set; }
        public string domain { get; set; }
        public object masterDomain { get; set; }
        public bool microblogsEnabled { get; set; }
        public bool registrationEnabled { get; set; }
        public string version { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/community/view");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/community/view",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/community/view', config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/community/view',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

response = requests.get(
    'https://site.igloocommunities.com/.api/api.svc/community/view', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/community/view', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/community/view"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Return All Members

This endpoint returns an array of all users of the Igloo Digital Workplace. Respecting Access & Permissions, this endpoint will only return data the user who calls it is allowed to see.

Request:

GET https://site.igloocommunities.com/.api/api.svc/community/members&maxcount=99 HTTP/1.1
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "IglooList:http://schemas.iglooplatform.com/Igloo.Common",
		"startIndex": integer,
		"count": integer,
		"totalCount": "integer",
		"items": [
			{
				"__type": "Persona:http://schemas.iglooplatform.com/Igloo.Common",
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"lastvisit": "string",
					"statusText": "string"
				},
				"status": {
					"updated": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean,
				"sendEmailOnMessage": boolean,
				"smsAddress": "string"
			}
		]
	}
}
#!/bin/bash
curl -X GET "https://site.igloocommunities.com/.api/api.svc/community/members&maxcount=99" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View Members
=============================================================================
*/
int viewMembers()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/community/members&maxcount=99";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View Members
/// </summary>
class Community
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewMembers()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/community/members&maxcount=99");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public DateTime lastvisit { get; set; }
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class Item
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
        public bool sendEmailOnMessage { get; set; }
        public string smsAddress { get; set; }
        public string email { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public int startIndex { get; set; }
        public int count { get; set; }
        public string totalCount { get; set; }
        public List<Item> items { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/community/members&maxcount=99");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/community/members&maxcount=99",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/community/members&maxcount=99', config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/community/members&maxcount=99',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

response = requests.get(
    'https://site.igloocommunities.com/.api/api.svc/community/members&maxcount=99', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/community/members&maxcount=99', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/community/members&maxcount=99"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Blogs

# Blogs

Create Blog Channel

This endpoint creates a parent blog container for blog article child objects. An ID of a parent level object needs to be passed in the uri.

Parameter
Type
Value
title
string
Title of the blog.
description
string
Description field of the blog.
content
string
Blog content.
returnNav
boolean
Return navigation.
showInNav
boolean
Show in navigation.

Request:

POST https://site.igloocommunities.com/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add HTTP/1.1
Accept: application/json 
Content-Type: application/x-www-form-urlencoded    
Cookie: iglooauth=00000000-0000-0000-0000-000000000000 

title=testblog&description=my%20description&content=my%20content&returnNav=false&showInNav=false

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
   "minRequestPeriod": int,
   "requestSupportCode": int,
   "dictionary":null,
   "response":{
      "__type":"string",
      "startIndex": int,
      "count": int,
      "totalCount": "string",
      "items":[
         {
            "__type":"namevalue:http:\/\/schemas.iglooplatform.com\/Igloo.Common",
            "name":"navTree",
            "value":"{\"type\":\"BlogChannel\",\"ParentID\":int,\"property\":{\"name\":\"testblog\",\"id\":int,\"url_title\":\"sandboxblogtest\",\"url\":\"\/sandboxblogtest\",\"order\":\"21\",\"show_in_nav\":\"False\",\"show_fly_out_nav\":\"False\",\"is_homepage\":\"False\",\"object_id\":\"00000000-0000-0000-0000-000000000000\",\"parent_space_id\":null,\"descendant_or_self_is_space\":\"False\",\"perms\":{\"dirty\":true,\"CanEdit\":false,\"CanDelete\":false,\"CanAddChild\":true},\"Names\":[{\"Language\":\"en\",\"Name\":\"testblog\",\"IsAutoTranslated\":false}]},\"children\":[]}"
         }
      ]
   }
}
#!/bin/bash

# The ID that needs to be passed here is the parent object to create the blog channel under. For example, using the Community ID would create the new blog at the root level of the site nav.

curl -X POST "https://site.igloocommunities.com/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --data "showInNav=false&title=testblog&description=my%20description&content=my%20content&returnNav=true" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Create Blog Channel
=============================================================================
*/
int createBlogChannel()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "showInNav=false&title=testblog&description=my%20description&content=my%20content&returnNav=true");
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)95);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Create Blog Channel
/// </summary>
class Blogs
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void CreateBlogChannel()
    {
        // Uri
        Uri uri = new Uri("https://site.igloocommunities.com/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add");

        // Headers
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        // Parameters
        var Params = new Dictionary<string, string>();
        Params.Add("title", "Test Blog");
        Params.Add("description", "My description");
        Params.Add("content", "My content");
        Params.Add("returnNav", true);
        Params.Add("showInNav", false);

        // Body
        var Body = new FormUrlEncodedContent(Params);

        // Send the HTTP Request
        using (client)
        {
            var response = client.PostAsync(uri, Body).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Item
    {
        public string __type { get; set; }
        public string name { get; set; }
        public string value { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public int startIndex { get; set; }
        public int count { get; set; }
        public string totalCount { get; set; }
        public List<Item> items { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public int requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "title=Test%20Blog%20Channel&description=Summary%20field&content=Blog%20Channel%20body&returnNav=true&showInNav=false";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add",
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "title": "Test Blog Channel",
    "description": "Summary field",
    "content": "Blog channel body",
    "returnNav": "true",
    "showInNav": "false"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  }
};

axios.post('/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add', {
  title: 'Test Blog Channel',
  description: 'Summary field',
  content: 'Blog channel body',
  returnNav: 'true',
  showInNav: 'false'
}, config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var dataString = 'showInNav=false&title=testblog&description=my%20description&content=my%20content&returnNav=true';

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

data = [
  ('showInNav', 'false'),
  ('title', 'testblog'),
  ('description', 'my description'),
  ('content', 'my content'),
  ('returnNav', 'true'),
]

response = requests.post('https://site.igloocommunities.com/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add', headers=headers, cookies=cookies, data=data)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$data = array(
    'showInNav' => 'false',
    'title' => 'testblog',
    'description' => 'my description',
    'content' => 'my content',
    'returnNav' => 'true'
);

$response = Requests::post('https://site.igloocommunities.com/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add', $headers, $data);
$uri = "https://${iglooUrl}/.api/api.svc/blogfolders/00000000-0000-0000-0000-000000000000/blogchannels/add"

$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

$params = @{
    showInNav   = "false"
    title       = "testblog"
    description = "my description"
    content     = "my content"
    returnNav   = "true"
}

$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $params -WebSession $session

View Blog Channel

This endpoint returns blog articles from the supplied blog channel. An ID of a blog channel object needs to be passed in the uri.

Parameter
Type
Value
maxcount
string
Specify the maximum number of objects to return. Default is 10.
startindex
string
Supply an integer value to specify where in the index to start returning blog articles.
includefuturepublished
string
Set to false by default. Include future articles in the index.

Request:

GET https://site.igloocommunities.com/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10 HTTP/1.1
Host: site.igloocommunities.com
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "BlogChannel:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"IsArchived": boolean,
		"IsScheduledForArchiving": boolean,
		"SpaceId": null,
		"commentprivileges": "string",
		"title": "string",
		"name": "{00000000-0000-0000-0000-000000000000}",
		"content": "",
		"description": "string",
		"created": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {
					"updated": "string",
					"value": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"modified": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {
					"updated": "string",
					"value": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"parentHref": "string",
		"parentId": "00000000-0000-0000-0000-000000000000",
		"statistics": {
			"rating": {
				"votes": integer,
				"average": integer,
				"sum": integer
			},
			"views": {
				"views": integer,
				"downloads": integer
			},
			"contents": {
				"comments": integer,
				"children": integer
			}
		},
		"isPublished": boolean,
		"published": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": null
		},
		"HashId": "string",
		"HashName": "string",
		"children": [],
		"numchildren": integer
	}
}
#!/bin/bash

# The ID that needs to be passed here is the Blog Channel to retrieve Blog Articles from.

curl -X GET "https://site.igloocommunities.com/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View Blog Channel
=============================================================================
*/

// The ID that needs to be passed here is the Blog Channel to retrieve Blog Articles from.

int viewBlogChannel()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str() + "?maxcount=10");
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View Blog Channel
/// </summary>
class Blogs
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewBlogChannel()
    {
        // Uri
        Uri uri = new Uri("https://site.igloocommunities.com/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            string responseString = responseContent.ReadAsStringAsync().Result;

            ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

            // Your code here...
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Created
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User user { get; set; }
    }

    public class Name2
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus2
    {
        public string statusText { get; set; }
    }

    public class Status2
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User2
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name2 name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus2 onlinestatus { get; set; }
        public Status2 status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User2 user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string name { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public string parentHref { get; set; }
        public string parentId { get; set; }
        public Statistics statistics { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public string HashId { get; set; }
        public string HashName { get; set; }
        public List<object> children { get; set; }
        public int numchildren { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "title=Test%20Blog%20Article&description=Summary%20field&content=Blog%20article%20body&returnNav=true&showInNav=false";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10",
  "method": "GET",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "title": "Test Blog Article",
    "description": "Summary field",
    "content": "Blog article body",
    "returnNav": "true",
    "showInNav": "false"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

params = (
    ('maxcount', '10'),
)

response = requests.get('https://site.igloocommunities.com/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view', headers=headers, params=params, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/blogchannels/00000000-0000-0000-0000-000000000000/view?maxcount=10"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Create Blog Article

This endpoint creates a new blog article in the specified blog channel. An ID of a blog channel needs to be passed in the uri.

Parameter
Type
Value
name
string
Title of the blog article.
summary
string
Description of the blog article.
body
string
Blog article content.
activationDate
datetime
The desired date the blog post should be visible.
channelId
string
ID of the blog to post the article to.

Request:

POST https://site.igloocommunities.com/.api/api.svc/blogarticles/add HTTP/1.1
Host: site.igloocommunities.com
Cookie: iglooauth=f4a6aace-e842-47a7-bcdd-f73645959454
Accept: application/json
Content-type: application/x-www-form-urlencoded

name=blog%20post&summary=my%20summary&body=my%20body&activationDate=2018-11-11&channelId=f8f25a0d-d2cc-4120-bd6b-ea9ad968adfe

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
   "minRequestPeriod": int,
   "requestSupportCode": int,
   "dictionary": null,
   "response":{
      "__type":"BlogArticle:http:\/\/schemas.iglooplatform.com\/Igloo.Common",
      "id":"00000000-0000-0000-0000-000000000000",
      "href":"\/blogtest\/blog_post",
      "navType":1,
      "IsArchived": false,
      "IsScheduledForArchiving": false,
      "SpaceId": null,
      "commentprivileges": "string",
      "title": "string",
      "name":"{00000000-0000-0000-0000-000000000000}",
      "content": "string",
      "description": "string",
      "created":{
         "userId":"00000000-0000-0000-0000-000000000000",
         "date":"string",
         "user":{
            "id":"00000000-0000-0000-0000-000000000000",
            "href":"string",
            "navType": int,
            "isEnabled": true,
            "name":{
               "firstName": "string",
               "lastName": "string",
               "fullName": "string",
               "initials": "string"
            },
            "namespace": "string",
            "isActivated": true,
            "onlinestatus":{
               "statusText":""
            },
            "status":{
               "updated": "string",
               "value": "string"
            },
            "anonymousname": "",
            "hasPhoto": true,
            "sharePhoto": true
         }
      },
      "modified":{
         "userId":"00000000-0000-0000-0000-000000000000",
         "date":"string",
         "user":{
            "id":"00000000-0000-0000-0000-000000000000",
            "href": "string",
            "navType": int,
            "isEnabled": true,
            "name":{
               "firstName": "string",
               "lastName": "string",
               "fullName": "string",
               "initials": "string"
            },
            "namespace": "string",
            "isActivated": true,
            "onlinestatus":{
               "statusText":""
            },
            "status":{
               "updated": "string",
               "value": "string"
            },
            "anonymousname": "",
            "hasPhoto": true,
            "sharePhoto": true
         }
      },
      "parentHref": "string",
      "parentId": "00000000-0000-0000-0000-000000000000",
      "statistics":{
         "rating":{
            "votes": int,
            "average": int,
            "sum": int
         },
         "views":{
            "views": int,
            "downloads": int
         },
         "contents":{
            "comments": int,
            "children": int
         }
      },
      "isPublished": false,
      "published":{
         "userId":"00000000-0000-0000-0000-000000000000",
         "date": "string",
         "user": null
      },
      "commentPrivileges": int,
      "articleSummary": "string",
      "articleBody": "string",
      "islocked": true
   }
}
#!/bin/bash

# The ID that needs to be passed here is the Blog Channel to post the new article to.

curl -X POST "https://site.igloocommunities.com/.api/api.svc/blogarticles/add" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --data "name=blog%20post&summary=my%20summary&body=my%20body&activationDate=2018-11-11&channelId=00000000-0000-0000-0000-000000000000" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Create Blog Article
=============================================================================
*/
int createBlogChannel()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/blogarticles/add";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "name=blog%20post&summary=my%20summary&body=my%20body&activationDate=2018-11-11&channelId=00000000-0000-0000-0000-000000000000");
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)95);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Create Blog Article
/// </summary>
class Blogs
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void CreateBlogArticle()
    {
        // Uri
        Uri uri = new Uri("https://site.igloocommunities.com/.api/api.svc/blogarticles/add");

        // Headers
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        // Parameters
        var Params = new Dictionary<string, string>();
        Params.Add("name", "blog post");
        Params.Add("summary", "My summary");
        Params.Add("body", "My body");
        Params.Add("activationDate", "2018-11-11");
        Params.Add("channelId", "00000000-0000-0000-0000-000000000000");

        // Body
        var Body = new FormUrlEncodedContent(Params);

        // Send the HTTP Request
        using (client)
        {
            var response = client.PostAsync(uri, Body).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public string updated { get; set; }
        public string value { get; set; }
    }

    public class User
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Created
    {
        public string userId { get; set; }
        public string date { get; set; }
        public User user { get; set; }
    }

    public class Name2
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus2
    {
        public string statusText { get; set; }
    }

    public class Status2
    {
        public string updated { get; set; }
        public string value { get; set; }
    }

    public class User2
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name2 name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus2 onlinestatus { get; set; }
        public Status2 status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public string date { get; set; }
        public User2 user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public string date { get; set; }
        public object user { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string name { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public string parentHref { get; set; }
        public string parentId { get; set; }
        public Statistics statistics { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public int commentPrivileges { get; set; }
        public string articleSummary { get; set; }
        public string articleBody { get; set; }
        public bool islocked { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public int requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "name=Blog%20Article&summary=Blog%20Article%20summary%20field&body=Blog%20article%20body&activationDate=2018-11-11&channelId=00000000-0000-0000-0000-000000000000";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "/.api/api.svc/blogarticles/add");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/blogarticles/add",
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "name": "Blog Article",
    "summary": "Blog Article summary field",
    "body": "Blog article body",
    "activationDate": "2018-11-11",
    "channelId": "00000000-0000-0000-0000-000000000000"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  }
};

axios.post('/.api/api.svc/blogarticles/add', {
  name: 'Test Blog Article',
  summary: 'Blog article summary field',
  body: 'Blog article body',
  activationDate: '2018-11-11',
  channelId: '00000000-0000-0000-0000-000000000000'
}, config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var dataString = 'name=blog%20post&summary=my%20summary&body=my%20body&activationDate=2018-11-11&channelId=00000000-0000-0000-0000-000000000000';

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/blogarticles/add',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

data = [
  ('name', 'blog post'),
  ('summary', 'my summary'),
  ('body', 'my body'),
  ('activationDate', '2018-11-11'),
  ('channelId', '00000000-0000-0000-0000-000000000000'),
]

response = requests.post('https://site.igloocommunities.com/.api/api.svc/blogarticles/add', headers=headers, cookies=cookies, data=data)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$data = array(
    'name' => 'blog post',
    'summary' => 'my summary',
    'body' => 'my body',
    'activationDate' => '2018-11-11',
    'channelId' => '00000000-0000-0000-0000-000000000000'
);

$response = Requests::post('https://site.igloocommunities.com/.api/api.svc/blogarticles/add', $headers, $data);
$uri = "https://${iglooUrl}/.api/api.svc/blogarticles/add"

$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

$params = @{
    name           = "test blog"
    summary        = "my summary"
    body           = "my blog post"
    activationDate = "2018-11-11"
    channelId      = "00000000-0000-0000-0000-000000000000"
}

$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $params -WebSession $session

Update Blog Article

This endpoint updates an existing blog article. The ID of the blog article needs to be passed in the uri.

Parameter
Type
Value
title
string
Title of the blog article.
summary
string
Description of the blog article.
body
string
Blog article content.
activationDate
datetime
The desired date the blog post should be visible.

Request:

POST https://site.igloocommunities.com/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update HTTP/1.1
Host: site.igloocommunities.com
Content-type: application/x-www-form-urlencoded; charset=UTF-8
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

title=Test&summary=This%20is%20a%20nonsense%20poem%20written%20by%20Lewis%20Carroll%20in%201871.&body=Twas%20brillig%2C%20and%20the%20slithy%20toves%2C%20Did%20gyre%20and%20gimble%20in%20the%20wabe%2C%20All%20mimsy%20were%20the%20borogoves%2C%20And%20the%20mome%20raths%20outgrabe.

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "BlogArticle:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"IsArchived": boolean,
		"IsScheduledForArchiving": boolean,
		"SpaceId": null,
		"commentprivileges": "string",
		"title": "string",
		"name": "{00000000-0000-0000-0000-000000000000}",
		"content": "string",
		"description": "string",
		"created": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {
					"updated": "string",
					"value": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"modified": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {
					"updated": "string",
					"value": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"parentHref": "string",
		"parentId": "00000000-0000-0000-0000-000000000000",
		"statistics": {
			"rating": {
				"votes": integer,
				"average": integer,
				"sum": integer
			},
			"views": {
				"views": integer,
				"downloads": integer
			},
			"contents": {
				"comments": integer,
				"children": integer
			},
			"subscribed": integer
		},
		"isPublished": boolean,
		"published": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": null
		},
		"commentPrivileges": integer,
		"articleSummary": "string",
		"articleBody": "string",
		"islocked": boolean
	}
}
#!/bin/bash

# The ID that needs to be passed here is the blog article to update.

curl -X POST "https://site.igloocommunities.com/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --data "title=Test&summary=This%20is%20a%20nonsense%20poem%20written%20by%20Lewis%20Carroll%20in%201871.&body=Twas%20brillig%2C%20and%20the%20slithy%20toves%2C%20Did%20gyre%20and%20gimble%20in%20the%20wabe%2C%20All%20mimsy%20were%20the%20borogoves%2C%20And%20the%20mome%20raths%20outgrabe." --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Update Blog Article
=============================================================================
*/
int updateBlogArticle()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");
	headers = curl_slist_append(headers, "Content-type: application/x-www-form-urlencoded");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "title=Test&summary=This%20is%20a%20nonsense%20poem%20written%20by%20Lewis%20Carroll%20in%201871.&body=Twas%20brillig%2C%20and%20the%20slithy%20toves%2C%20Did%20gyre%20and%20gimble%20in%20the%20wabe%2C%20All%20mimsy%20were%20the%20borogoves%2C%20And%20the%20mome%20raths%20outgrabe.");
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)95);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Update Blog Article
/// </summary>
class Blogs
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void UpdateBlogArticle()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update");

        // Headers
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        // Parameters
        var Params = new Dictionary<string, string>();
        Params.Add("title", "blog post");
        Params.Add("summary", "My summary");
        Params.Add("body", "My body");
        Params.Add("activationDate", "2018-11-11");

        // Body
        var Body = new FormUrlEncodedContent(Params);

        // Send the HTTP Request
        using (client)
        {
            var response = client.PostAsync(uri, Body).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Created
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User user { get; set; }
    }

    public class Name2
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus2
    {
        public string statusText { get; set; }
    }

    public class Status2
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User2
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name2 name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus2 onlinestatus { get; set; }
        public Status2 status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User2 user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
        public int subscribed { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string name { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public string parentHref { get; set; }
        public string parentId { get; set; }
        public Statistics statistics { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public int commentPrivileges { get; set; }
        public string articleSummary { get; set; }
        public string articleBody { get; set; }
        public bool islocked { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "title=Updated%20blog%20article%20title&summary=Updated%20blog%20article%20summary%20field&body=Updated%20blog%20article%20body&activationDate=2018-11-11";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "https://site.igloocommunities.com/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update",
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "title": "Updated blog article title",
    "summary": "Updated blog article summary field",
    "body": "Updated blog article body",
    "activationDate": "2018-11-11"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  }
};

axios.post('/.api/api.svc/blogarticles/add', {
  title: 'Updated Blog article title',
  summary: 'Updated Blog article summary field',
  body: 'Updated Blog article body',
  activationDate: '2018-11-11'
}, config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var dataString = 'title=Test&summary=This%20is%20a%20nonsense%20poem%20written%20by%20Lewis%20Carroll%20in%201871.&body=Twas%20brillig%2C%20and%20the%20slithy%20toves%2C%20Did%20gyre%20and%20gimble%20in%20the%20wabe%2C%20All%20mimsy%20were%20the%20borogoves%2C%20And%20the%20mome%20raths%20outgrabe.';

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

data = [
    ('title', 'Test'),
    ('summary', 'This is a nonsense poem written by Lewis Carroll in 1871.'),
    ('body', 'Twas brillig, and the slithy toves, Did gyre and gimble in the wabe, All mimsy were the borogoves, And the mome raths outgrabe.'),
]

response = requests.post('https://site.igloocommunities.com/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update',
                         headers=headers, cookies=cookies, data=data)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$data = array(
    'title' => 'Test',
    'summary' => 'This is a nonsense poem written by Lewis Carroll in 1871.',
    'body' => 'Twas brillig, and the slithy toves, Did gyre and gimble in the wabe, All mimsy were the borogoves, And the mome raths outgrabe.'
);

$response = Requests::post('https://site.igloocommunities.com/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update', $headers, $data);
$uri = "https://${iglooUrl}/.api/api.svc/blogarticles/00000000-0000-0000-0000-000000000000/update"

$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

$params = @{
    title          = "test blog"
    summary        = "my summary"
    body           = "my blog post"
    activationDate = "2018-11-11"
}

$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $params -WebSession $session

Folders

These endpoints return information about folders and folder content. The IGLOO folder ID needs to be passed in the uri.

# Folders

Create Folder

This endpoint creates a new folder on the Igloo Digital Workplace.

Parameter
Type
Value
parentId
string
ID of the folder to create a new folder under.
title
string
Name of the folder.

Request:

POST https://site.igloocommunities.com/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder HTTP/1.1
Content-type: application/x-www-form-urlencoded; charset=UTF-8
Accept: application/json

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "Folder:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"IsArchived": boolean,
		"IsScheduledForArchiving": boolean,
		"SpaceId": null,
		"commentprivileges": "string",
		"title": "string",
		"name": "{00000000-0000-0000-0000-000000000000}",
		"content": "string",
		"description": "string",
		"created": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {
					"updated": "string",
					"value": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"modified": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {
					"updated": "string",
					"value": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"parentHref": "string",
		"parentId": "00000000-0000-0000-0000-000000000000",
		"statistics": {
			"rating": {
				"votes": integer,
				"average": integer,
				"sum": integer
			},
			"views": {
				"views": integer,
				"downloads": integer
			},
			"contents": {
				"comments": integer,
				"children": integer
			}
		},
		"isPublished": boolean,
		"published": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": null
		},
		"HashId": "string",
		"HashName": "string",
		"children": [],
		"numchildren": integer,
		"thumbnail": "string",
		"defaultView": integer
	}
}
#!/bin/bash

curl -X POST "https://site.igloocommunities.com/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Create Folder
=============================================================================
*/
int createFolder()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "");
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)95);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Create User
/// </summary>
class Folders
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void CreateFolder()
    {
        // Uri
        Uri uri = new Uri("https://site.igloocommunities.com/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder");

        // Headers
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        // Body
        var Body = null;

        // Send the HTTP Request
        using (client)
        {
            var response = client.PostAsync(uri, Body).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Created
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User user { get; set; }
    }

    public class Name2
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus2
    {
        public string statusText { get; set; }
    }

    public class Status2
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User2
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name2 name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus2 onlinestatus { get; set; }
        public Status2 status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User2 user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string name { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public string parentHref { get; set; }
        public string parentId { get; set; }
        public Statistics statistics { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public string HashId { get; set; }
        public string HashName { get; set; }
        public List<object> children { get; set; }
        public int numchildren { get; set; }
        public string thumbnail { get; set; }
        public int defaultView { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "https://site.igloocommunities.com/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder",
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  }
};

axios.post('/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder', config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder',
    method: 'POST',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

response = requests.post('https://site.igloocommunities.com/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder',
                         headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::post('https://site.igloocommunities.com/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/folders/create&parentId=00000000-0000-0000-0000-000000000000&title=New%20Folder"

$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -WebSession $session

View Folder

This endpoint will return details/properties of a folder, based on it's ID.

Request:

GET https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view HTTP/1.1
Host: site.igloocommunities.com
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "FolderChannel:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"IsArchived": boolean,
		"IsScheduledForArchiving": boolean,
		"SpaceId": null,
		"commentprivileges": "string",
		"title": "string",
		"name": "{00000000-0000-0000-0000-000000000000}",
		"content": "string",
		"description": "string",
		"created": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"modified": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"parentHref": "string",
		"parentId": "00000000-0000-0000-0000-000000000000",
		"statistics": {
			"rating": {
				"votes": integer,
				"average": integer,
				"sum": integer
			},
			"views": {
				"views": integer,
				"downloads": integer
			},
			"contents": {
				"comments": integer,
				"children": integer
			}
		},
		"isPublished": boolean,
		"published": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": null
		},
		"HashId": "string",
		"HashName": "string",
		"children": [],
		"numchildren": integer,
		"thumbnail": "string",
		"defaultView": integer
	}
}
#!/bin/bash
curl -X GET "https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View Folder
=============================================================================
*/
int viewFolder()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View Folder
/// </summary>
class Folders
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewFolder()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
    }

    public class User
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Created
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User user { get; set; }
    }

    public class Name2
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus2
    {
        public string statusText { get; set; }
    }

    public class Status2
    {
    }

    public class User2
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name2 name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus2 onlinestatus { get; set; }
        public Status2 status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User2 user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string name { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public string parentHref { get; set; }
        public string parentId { get; set; }
        public Statistics statistics { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public string HashId { get; set; }
        public string HashName { get; set; }
        public List<object> children { get; set; }
        public int numchildren { get; set; }
        public string thumbnail { get; set; }
        public int defaultView { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

response = requests.get('https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/view"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

View Folder Contents

This endpoint will return all of the child objects of a folder, based on the folder ID.

Request:

GET https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view HTTP/1.1
Host: site.igloocommunities.com
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "minRequestPeriod": integer,
    "requestSupportCode": integer,
    "dictionary": null,
    "response": {
        "__type": "IglooList:http://schemas.iglooplatform.com/Igloo.Common",
        "startIndex": integer,
        "count": integer,
        "totalCount": "string",
        "items": [
            {
                "__type": "Document:http://schemas.iglooplatform.com/Igloo.Common",
                "id": "00000000-0000-0000-0000-000000000000",
                "href": "string",
                "navType": integer,
                "IsArchived": boolean,
                "IsScheduledForArchiving": boolean,
                "SpaceId": null,
                "commentprivileges": "string",
                "title": "string",
                "name": "{00000000-0000-0000-0000-000000000000}",
                "content": "string",
                "description": "string",
                "created": {
                    "userId": "00000000-0000-0000-0000-000000000000",
                    "date": "string",
                    "user": {
                        "id": "00000000-0000-0000-0000-000000000000",
                        "href": "string",
                        "navType": integer,
                        "isEnabled": boolean,
                        "name": {
                            "firstName": "string",
                            "lastName": "string",
                            "fullName": "string",
                            "initials": "string"
                        },
                        "namespace": "string",
                        "isActivated": boolean,
                        "onlinestatus": {
                            "statusText": "string"
                        },
                        "status": {
                            "updated": "string",
                            "value": "string"
                        },
                        "anonymousname": "string",
                        "hasPhoto": boolean,
                        "sharePhoto": boolean
                    }
                },
                "modified": {
                    "userId": "00000000-0000-0000-0000-000000000000",
                    "date": "string",
                    "user": {
                        "id": "00000000-0000-0000-0000-000000000000",
                        "href": "string",
                        "navType": integer,
                        "isEnabled": boolean,
                        "name": {
                            "firstName": "string",
                            "lastName": "string",
                            "fullName": "string",
                            "initials": "string"
                        },
                        "namespace": "string",
                        "isActivated": boolean,
                        "onlinestatus": {
                            "statusText": "string"
                        },
                        "status": {
                            "updated": "string",
                            "value": "string"
                        },
                        "anonymousname": "string",
                        "hasPhoto": boolean,
                        "sharePhoto": boolean
                    }
                },
                "parentHref": "string",
                "parentId": "00000000-0000-0000-0000-000000000000",
                "statistics": {
                    "rating": {
                        "votes": integer,
                        "average": integer,
                        "sum": integer
                    },
                    "views": {
                        "views": integer,
                        "downloads": integer
                    },
                    "contents": {
                        "comments": integer,
                        "children": integer
                    },
                    "subscribed": integer
                },
                "isPublished": boolean,
                "published": {
                    "userId": "00000000-0000-0000-0000-000000000000",
                    "date": "string",
                    "user": null
                },
                "fileExtension": "string",
                "imageHeight": integer,
                "imageWidth": integer,
                "isImage": boolean,
                "mimeType": "string",
                "size": integer,
                "versionId": integer
            }
        ]
    }
}
#!/bin/bash
curl -X GET "https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View Folder Content
=============================================================================
*/
int viewFolderContents()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View Folder Contents
/// </summary>
class Folders
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewFolderContents()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Created
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User user { get; set; }
    }

    public class Name2
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus2
    {
        public string statusText { get; set; }
    }

    public class Status2
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User2
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name2 name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus2 onlinestatus { get; set; }
        public Status2 status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User2 user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
        public int subscribed { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Item
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string name { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public string parentHref { get; set; }
        public string parentId { get; set; }
        public Statistics statistics { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public string fileExtension { get; set; }
        public int imageHeight { get; set; }
        public int imageWidth { get; set; }
        public bool isImage { get; set; }
        public string mimeType { get; set; }
        public int size { get; set; }
        public int versionId { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public int startIndex { get; set; }
        public int count { get; set; }
        public string totalCount { get; set; }
        public List<Item> items { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

response = requests.get('https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/folders/00000000-0000-0000-0000-000000000000/children/view"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Objects

These endpoints allow interaction with any object that has an ID on the IGLOO platform. The ID of the object needs to be passed in the uri.

# Objects

View Object

This endpoint will return details/properties of the object, based on it's ID.

Request:

GET https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view HTTP/1.1
Host: site.igloocommunities.com
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "Document:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"IsArchived": boolean,
		"IsScheduledForArchiving": boolean,
		"SpaceId": null,
		"commentprivileges": "string",
		"title": "string",
		"name": "{00000000-0000-0000-0000-000000000000}",
		"content": "string",
		"description": "string",
		"created": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {
					"updated": "string",
					"value": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"modified": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": {
				"id": "00000000-0000-0000-0000-000000000000",
				"href": "string",
				"navType": integer,
				"isEnabled": boolean,
				"name": {
					"firstName": "string",
					"lastName": "string",
					"fullName": "string",
					"initials": "string"
				},
				"namespace": "string",
				"isActivated": boolean,
				"onlinestatus": {
					"statusText": "string"
				},
				"status": {
					"updated": "string",
					"value": "string"
				},
				"anonymousname": "string",
				"hasPhoto": boolean,
				"sharePhoto": boolean
			}
		},
		"parentHref": "string",
		"parentId": "00000000-0000-0000-0000-000000000000",
		"statistics": {
			"rating": {
				"votes": integer,
				"average": integer,
				"sum": integer
			},
			"views": {
				"views": integer,
				"downloads": integer
			},
			"contents": {
				"comments": integer,
				"children": integer
			},
			"subscribed": integer
		},
		"isPublished": boolean,
		"published": {
			"userId": "00000000-0000-0000-0000-000000000000",
			"date": "string",
			"user": null
		},
		"fileExtension": "string",
		"imageHeight": integer,
		"imageWidth": integer,
		"isImage": boolean,
		"mimeType": "string",
		"size": integer,
		"versionId": integer
	}
}
#!/bin/bash
curl -X GET "https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View Object
=============================================================================
*/
int viewObject()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View Object
/// </summary>
class Objects
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewObject()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Created
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User user { get; set; }
    }

    public class Name2
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus2
    {
        public string statusText { get; set; }
    }

    public class Status2
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User2
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name2 name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus2 onlinestatus { get; set; }
        public Status2 status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User2 user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
        public int subscribed { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string name { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public string parentHref { get; set; }
        public string parentId { get; set; }
        public Statistics statistics { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public string fileExtension { get; set; }
        public int imageHeight { get; set; }
        public int imageWidth { get; set; }
        public bool isImage { get; set; }
        public string mimeType { get; set; }
        public int size { get; set; }
        public int versionId { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

response = requests.get('https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/view"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

View Child Objects

This endpoint will return all of the child objects of the object, based on the parent ID.

Request:

GET https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children HTTP/1.1
Host: site.igloocommunities.com
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "minRequestPeriod": integer,
    "requestSupportCode": integer,
    "dictionary": null,
    "response": {
        "__type": "IglooList:http://schemas.iglooplatform.com/Igloo.Common",
        "startIndex": integer,
        "count": integer,
        "totalCount": "string",
        "items": [
            {
                "__type": "Document:http://schemas.iglooplatform.com/Igloo.Common",
                "id": "00000000-0000-0000-0000-000000000000",
                "href": "string",
                "navType": integer,
                "IsArchived": boolean,
                "IsScheduledForArchiving": boolean,
                "SpaceId": null,
                "commentprivileges": "string",
                "title": "string",
                "name": "{00000000-0000-0000-0000-000000000000}",
                "content": "string",
                "description": "string",
                "created": {
                    "userId": "00000000-0000-0000-0000-000000000000",
                    "date": "string",
                    "user": {
                        "id": "00000000-0000-0000-0000-000000000000",
                        "href": "string",
                        "navType": integer,
                        "isEnabled": boolean,
                        "name": {
                            "firstName": "string",
                            "lastName": "string",
                            "fullName": "string",
                            "initials": "string"
                        },
                        "namespace": "string",
                        "isActivated": boolean,
                        "onlinestatus": {
                            "statusText": "string"
                        },
                        "status": {
                            "updated": "string",
                            "value": "string"
                        },
                        "anonymousname": "string",
                        "hasPhoto": boolean,
                        "sharePhoto": boolean
                    }
                },
                "modified": {
                    "userId": "00000000-0000-0000-0000-000000000000",
                    "date": "string",
                    "user": {
                        "id": "00000000-0000-0000-0000-000000000000",
                        "href": "string",
                        "navType": integer,
                        "isEnabled": boolean,
                        "name": {
                            "firstName": "string",
                            "lastName": "string",
                            "fullName": "string",
                            "initials": "string"
                        },
                        "namespace": "string",
                        "isActivated": boolean,
                        "onlinestatus": {
                            "statusText": "string"
                        },
                        "status": {
                            "updated": "string",
                            "value": "string"
                        },
                        "anonymousname": "string",
                        "hasPhoto": boolean,
                        "sharePhoto": boolean
                    }
                },
                "parentHref": "string",
                "parentId": "00000000-0000-0000-0000-000000000000",
                "statistics": {
                    "rating": {
                        "votes": integer,
                        "average": integer,
                        "sum": integer
                    },
                    "views": {
                        "views": integer,
                        "downloads": integer
                    },
                    "contents": {
                        "comments": integer,
                        "children": integer
                    },
                    "subscribed": integer
                },
                "isPublished": boolean,
                "published": {
                    "userId": "00000000-0000-0000-0000-000000000000",
                    "date": "string",
                    "user": null
                },
                "fileExtension": "string",
                "imageHeight": integer,
                "imageWidth": integer,
                "isImage": boolean,
                "mimeType": "string",
                "size": integer,
                "versionId": integer
            }
        ]
    }
}
#!/bin/bash
curl -X GET "https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View Child Objects
=============================================================================
*/
int viewChildObject()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View Child Object
/// </summary>
class Objects
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewChildObject()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Created
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User user { get; set; }
    }

    public class Name2
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus2
    {
        public string statusText { get; set; }
    }

    public class Status2
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class User2
    {
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name2 name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus2 onlinestatus { get; set; }
        public Status2 status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
    }

    public class Modified
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public User2 user { get; set; }
    }

    public class Rating
    {
        public int votes { get; set; }
        public int average { get; set; }
        public int sum { get; set; }
    }

    public class Views
    {
        public int views { get; set; }
        public int downloads { get; set; }
    }

    public class Contents
    {
        public int comments { get; set; }
        public int children { get; set; }
    }

    public class Statistics
    {
        public Rating rating { get; set; }
        public Views views { get; set; }
        public Contents contents { get; set; }
        public int subscribed { get; set; }
    }

    public class Published
    {
        public string userId { get; set; }
        public DateTime date { get; set; }
        public object user { get; set; }
    }

    public class Item
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool IsArchived { get; set; }
        public bool IsScheduledForArchiving { get; set; }
        public object SpaceId { get; set; }
        public string commentprivileges { get; set; }
        public string title { get; set; }
        public string name { get; set; }
        public string content { get; set; }
        public string description { get; set; }
        public Created created { get; set; }
        public Modified modified { get; set; }
        public string parentHref { get; set; }
        public string parentId { get; set; }
        public Statistics statistics { get; set; }
        public bool isPublished { get; set; }
        public Published published { get; set; }
        public string fileExtension { get; set; }
        public int imageHeight { get; set; }
        public int imageWidth { get; set; }
        public bool isImage { get; set; }
        public string mimeType { get; set; }
        public int size { get; set; }
        public int versionId { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public int startIndex { get; set; }
        public int count { get; set; }
        public string totalCount { get; set; }
        public List<Item> items { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

response = requests.get('https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/objects/00000000-0000-0000-0000-000000000000/children"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Search

These endpoints allow the developer to directly access platform search.

# Search

Search Content

Search the content of an IGLOO digital workplace for a text string. The search query is passed as a query parameter.

Parameter
Type
Value
maxcount
string
Specify the maximum number of objects to return. Default is 10.

Request:

GET https://site.igloocommunities.com/.api/api.svc/search/content?&q=Hello%20World HTTP/1.1
Host: site.igloocommunities.com
Cache-Control: no-cache
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
    "minRequestPeriod": integer,
    "requestSupportCode": integer,
    "dictionary": null,
    "response": {
        "__type": "namevalue:http://schemas.iglooplatform.com/Igloo.Common",
        "name": "string",
        "value": {
            "__type": "SearchResults:http://schemas.iglooplatform.com/Igloo.Common",
            "count": integer,
            "facets": [],
            "hit": [
                {
                    "__type": "ExtendedObjectHit:#Igloo.Common.Search",
                    "ApplicationType": integer,
                    "CommunityId": "00000000-0000-0000-0000-000000000000",
                    "CreatedById": "a00000000-0000-0000-0000-000000000000",
                    "IsArchived": boolean,
                    "ModifiedDate": "string",
                    "NumberOfComments": integer,
                    "ObjectId": "00000000-0000-0000-0000-000000000000",
                    "ObjectType": integer,
                    "Content": "",
                    "CreatedBy": null,
                    "Description": "string",
                    "FileFormat": {
                        "Extension": "string",
                        "FileType": integer,
                        "Id": "string",
                        "MimeType": "string",
                        "ProcessType": integer
                    },
                    "Highlights": [
                        {
                            "Key": "string",
                            "Value": [
                                "Hello World"
                            ]
                        }
                    ],
                    "Href": "string",
                    "Labels": null,
                    "LikeCount": integer,
                    "Title": "string",
                    "ViewCount": integer
                }
            ]
        }
    }
}
#!/bin/bash
curl -X GET "https://site.igloocommunities.com/.api/api.svc/search/content?q=Hello%20World" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Search Content
=============================================================================
*/
int searchContent()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/search/content";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str() + "?q=Hello%20World");
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Search Content
/// </summary>
class Search
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void SearchContent()
    {
        // Query
        string Query = "Hello World";

        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/search/content?q=" + Query);

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class FileFormat
    {
        public string Extension { get; set; }
        public int FileType { get; set; }
        public string Id { get; set; }
        public string MimeType { get; set; }
        public int ProcessType { get; set; }
    }

    public class Highlight
    {
        public string Key { get; set; }
        public List<string> Value { get; set; }
    }

    public class Hit
    {
        public string __type { get; set; }
        public int ApplicationType { get; set; }
        public string CommunityId { get; set; }
        public string CreatedById { get; set; }
        public bool IsArchived { get; set; }
        public DateTime ModifiedDate { get; set; }
        public int NumberOfComments { get; set; }
        public string ObjectId { get; set; }
        public int ObjectType { get; set; }
        public string Content { get; set; }
        public object CreatedBy { get; set; }
        public string Description { get; set; }
        public FileFormat FileFormat { get; set; }
        public List<Highlight> Highlights { get; set; }
        public string Href { get; set; }
        public object Labels { get; set; }
        public int LikeCount { get; set; }
        public string Title { get; set; }
        public int ViewCount { get; set; }
    }

    public class Value
    {
        public string __type { get; set; }
        public int count { get; set; }
        public List<object> facets { get; set; }
        public List<Hit> hit { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public string name { get; set; }
        public Value value { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/search/content?q=Hello%20World");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/search/content?q=Hello%20World",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/search/content?q=Hello%20World', config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/search/content?q=Hello%20World',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

params = (
    ('q', 'Hello World'),
)

response = requests.get('https://site.igloocommunities.com/.api/api.svc/search/content', headers=headers, params=params, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/search/content?q=Hello%20World', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/search/content?q=Hello%20World"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Users

These endpoints allow an authorized IGLOO user to interact with user profile data.

# Users

Create User

This endpoint creates a user directly in the Igloo Digital workplace.

Parameter
Type
Value
email
string
Email address of the user to add.
firstName
string
First name of the user.
lastName
string
Last name of the user.
password
string
A password must be supplied at the time of creation.
sendWelcomeMessage
boolean
Flag whether or not to send the default welcome message to the new user.

Request:

POST https://site.igloocommunities.com/.api/api.svc/users/create? HTTP/1.1
Host: site.igloocommunities.com
Content-type: application/x-www-form-urlencoded; charset=UTF-8
Accept: application/json

email=tex.murphy%40igloosoftware.com&firstName=Tex&lastName=Murphy&password=strongpassword&sendWelcomeMessage=false

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "Persona:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"isEnabled": boolean,
		"name": {
			"firstName": "string",
			"lastName": "string",
			"fullName": "string",
			"initials": "string"
		},
		"namespace": "string",
		"isActivated": boolean,
		"onlinestatus": {
			"lastvisit": "00000000-0000-0000-0000-000000000000",
			"statusText": ""
		},
		"status": {},
		"anonymousname": "string",
		"hasPhoto": boolean,
		"sharePhoto": boolean,
		"email": "string",
		"sendEmailOnMessage": boolean,
		"smsAddress": "string"
	}
}
#!/bin/bash

curl -X POST "https://site.igloocommunities.com/.api/api.svc/users/create" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --data "email=tex.murphy%40igloosoftware.com&firstName=Tex&lastName=Murphy&password=strong%20password&sendWelcomeMessage=false" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Create User
=============================================================================
*/
int createUser()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/users/create";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "email=tex.murphy%40igloosoftware.com&firstName=Tex&lastName=Murphy&password=strong%20password&sendWelcomeMessage=false");
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)95);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Create User
/// </summary>
class Users
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void CreateUser()
    {
        // Uri
        Uri uri = new Uri("https://site.igloocommunities.com/.api/api.svc/users/create");

        // Headers
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        // Parameters
        var Params = new Dictionary<string, string>();
        Params.Add("email", "tex.murphy@igloosoftware.com");
        Params.Add("firstName", "Tex");
        Params.Add("lastName", "Murphy");
        Params.Add("password", "strongpassword");
        Params.Add("sendWelcomeMessage", "false");

        // Body
        var Body = new FormUrlEncodedContent(Params);

        // Send the HTTP Request
        using (client)
        {
            var response = client.PostAsync(uri, Body).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public DateTime lastvisit { get; set; }
        public string statusText { get; set; }
    }

    public class Status
    {
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
        public string email { get; set; }
        public bool sendEmailOnMessage { get; set; }
        public string smsAddress { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "email=tex.murphy%40igloosoftware.com&firstName=Tex&lastName=Murphy&password=strong%20password&sendWelcomeMessage=false";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "/.api/api.svc/users/create");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "https://site.igloocommunities.com/.api/api.svc/users/create",
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "email": "tex.murphy@igloosoftware.com",
    "firstName": "Tex",
    "lastName": "Murphy",
    "password": "strong password",
    "sendWelcomeMessage": "false"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  }
};

axios.post('/.api/api.svc/users/create', {
  email: 'tex.murphy@igloosoftware.com',
  firstName: 'Tex',
  lastName: 'Murphy',
  password: 'strong password',
  sendWelcomeMessage: false
}, config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var dataString = 'email=tex.murphy%40igloosoftware.com&firstName=Tex&lastName=Murphy&password=strong%20password&sendWelcomeMessage=false';

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/users/create',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

data = [
    ('email', 'tex.murphy@igloosoftware.com'),
    ('firstName', 'Tex'),
    ('lastName', 'Murphy'),
    ('password', 'strong password'),
    ('sendWelcomeMessage', 'false'),
]

response = requests.post('https://site.igloocommunities.com/.api/api.svc/users/create',
                         headers=headers, cookies=cookies, data=data)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$data = array(
    'email' => 'tex.murphy@igloosoftware.com',
    'firstName' => 'Tex',
    'lastName' => 'Murphy',
    'password' => 'strong password',
    'sendWelcomeMessage' => 'false'
);

$response = Requests::post('https://site.igloocommunities.com/.api/api.svc/users/create', $headers, $data);
$uri = "https://${iglooUrl}/.api/api.svc/users/create"

$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

$params = @{
    email              = "tex.murphy@igloosoftware.com"
    firstName          = "Tex"
    lastName           = "Murphy"
    password           = "strong password"
    sendWelcomeMessage = "false"
}

$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $params -WebSession $session

Bulk Member Upload

This endpoint bulk adds users to an Igloo Digital Workplace based on flat text that is made up of comma-separated, carriage-returned values.

csvData:

firstname,lastname,email,password
Tex,Murphy,tex.murphy@igloosoftware.com,password
Parameter
Type
Value
csvData
string
comma-separated value list of users to add.
title
string
Friendly name of the Bulk Member Upload job.
type
string
Type of job to complete, in this case: Update
groupDelimiter
string
Special character to delimit groups to add the user to.
spaceDelimiter
string
Special character to delimit spaces to add the user to.

Request:

POST https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job HTTP/1.1
Content-type: application/x-www-form-urlencoded; charset=UTF-8
Accept: application/json

csvData=firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2tex.murphy%40igloosoftware.com%2Cpassword&title=New%20bulk%20member%20upload%20job&type=update&groupDelimiter=%7C&spaceDelimiter=~

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "BulkUserActionJob:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "string",
		"href": "string",
		"navType": integer,
		"CommunityId": "00000000-0000-0000-0000-000000000000",
		"CreatedAt": "string",
		"JobStatus": integer,
		"NumNew": integer,
		"NumProcessed": integer,
		"NumSuccess": integer,
		"Title": "string",
		"Type": integer,
		"UserId": "00000000-0000-0000-0000-000000000000"
	}
}
#!/bin/bash

curl -X POST "https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --data "csvData=firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword&title=New%20bulk%20member%20upload%20job&type=update&groupDelimiter=%7C&spaceDelimiter=~" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Bulk Member Upload
=============================================================================
*/
int bulkMemberUpload()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");
	headers = curl_slist_append(headers, "Content-type: application/x-www-form-urlencoded");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "csvData=firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword&title=New%20bulk%20member%20upload%20job&type=update&groupDelimiter=%7C&spaceDelimiter=~");
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)95);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Bulk Member Upload
/// </summary>
class BulkMemberUpload
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void UploadMember()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/bulk_user_action/create_job");

        // Headers
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        // Parameters
        var Params = new Dictionary<string, string>();
        Params.Add("csvData", "firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword");
        Params.Add("title", "New bulk member upload job");
        Params.Add("type", "update");
        Params.Add("groupDelimiter", "|");
        Params.Add("spaceDelimiter", "~");

        // Body
        var Body = new FormUrlEncodedContent(Params);

        // Send the HTTP Request
        using (client)
        {
            var response = client.PostAsync(uri, Body).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public string CommunityId { get; set; }
        public DateTime CreatedAt { get; set; }
        public int JobStatus { get; set; }
        public int NumNew { get; set; }
        public int NumProcessed { get; set; }
        public int NumSuccess { get; set; }
        public string Title { get; set; }
        public int Type { get; set; }
        public string UserId { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "csvData=firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2tex.murphy%40igloosoftware.com%2Cpassword&title=New%20bulk%20member%20upload%20job&type=update&groupDelimiter=%7C&spaceDelimiter=~";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "/.api/api.svc/bulk_user_action/create_job");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job",
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "csvData": "firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword",
    "title": "New bulk member upload job",
    "type": "update",
    "groupDelimiter": "|",
    "spaceDelimiter": "~"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  }
};

axios.post('/.api/api.svc/bulk_user_action/create_job', {
  csvData: 'firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword',
  title: 'New bulk member upload job',
  type: 'update',
  groupDelimiter: '|',
  spaceDelimiter: '~'
}, config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var dataString = 'csvData=firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword&title=New%20bulk%20member%20upload%20job&type=update&groupDelimiter=%7C&spaceDelimiter=~';

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

data = [
    ('csvData', 'firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword'),
    ('title', 'New bulk member upload job'),
    ('type', 'update'),
    ('groupDelimiter', '|'),
    ('groupDelimiter', '~')
]

response = requests.post('https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job',
                         headers=headers, cookies=cookies, data=data)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$data = array(
    'csvData' => 'firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword',
    'title' => 'New bulk member upload job',
    'type' => 'update',
    'groupDelimiter' => '|',
    'spaceDelimiter' => '~'
);

$response = Requests::post('https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job', $headers, $data);
$uri = "https://${iglooUrl}/.api/api.svc/bulk_user_action/create_job"

$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

$params = @{
    csvData        = "firstname%2Clastname%2Cemail%2Cpassword%0D%0ATex%2CMurphy%2Ctex.murphy%40igloosoftware.com%2Cpassword"
    title          = "New bulk member upload job"
    type           = "update"
    groupDelimiter = "|"
    spaceDelimiter = "~"
}

$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $params -WebSession $session

Bulk Member Revoke

This endpoint removes users from an Igloo Digital Workplace based upon text containing email addresses separated by carriage-return.

csvData:

email
tex.murphy@igloosoftware.com
Parameter
Type
Value
csvData
string
Text list of email addresses to remove, prepended with "email" in the first line.
title
string
Friendly name of the Bulk Member job.
type
string
Type of Bulk Member job to perform, in this case **delete**.
groupDelimiter
string
Special character to delimit groups to remove the user from.
spaceDelimiter
string
Special character to delimit spaces to remove the user from.

Request:

POST https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job HTTP/1.1
Content-type: application/x-www-form-urlencoded; charset=UTF-8
Accept: application/json

csvData=email%0D%0Atex.murphy%40igloosoftware.com&title=New%20bulk%20member%20revoke%20job&type=delete&groupDelimiter=%7C&spaceDelimiter=~

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "BulkUserActionJob:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "string",
		"href": "string",
		"navType": integer,
		"CommunityId": "00000000-0000-0000-0000-000000000000",
		"CreatedAt": "string",
		"JobStatus": integer,
		"NumNew": integer,
		"NumProcessed": integer,
		"NumSuccess": integer,
		"Title": "string",
		"Type": integer,
		"UserId": "00000000-0000-0000-0000-000000000000"
	}
}
#!/bin/bash

curl -X POST "https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --data "csvData=email%0D%0Atex.murphy%40igloosoftware.com&title=New%20bulk%20member%20revoke%20job&type=delete&groupDelimiter=%7C&spaceDelimiter=~" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Bulk Member Revoke
=============================================================================
*/
int bulkMemberRevoke()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");
	headers = curl_slist_append(headers, "Content-type: application/x-www-form-urlencoded");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "csvData=email%0D%0Atex.murphy%40igloosoftware.com&title=New%20bulk%20member%20revoke%20job&type=delete&groupDelimiter=%7C&spaceDelimiter=~");
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)95);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Bulk Member Revoke
/// </summary>
class BulkMemberRevoke
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void RevokeMember()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/bulk_user_action/create_job");

        // Headers
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        // Parameters
        var Params = new Dictionary<string, string>();
        Params.Add("csvData", "email%0D%0Atex.murphy%40igloosoftware.com");
        Params.Add("title", "New bulk member revoke job");
        Params.Add("type", "delete");
        Params.Add("groupDelimiter", "|");
        Params.Add("spaceDelimiter", "~");

        // Body
        var Body = new FormUrlEncodedContent(Params);

        // Send the HTTP Request
        using (client)
        {
            var response = client.PostAsync(uri, Body).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public string CommunityId { get; set; }
        public DateTime CreatedAt { get; set; }
        public int JobStatus { get; set; }
        public int NumNew { get; set; }
        public int NumProcessed { get; set; }
        public int NumSuccess { get; set; }
        public string Title { get; set; }
        public int Type { get; set; }
        public string UserId { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "csvData=email%0D%0Atex.murphy%40igloosoftware.com&title=New%20bulk%20member%20revoke%20job&type=delete&groupDelimiter=%7C&spaceDelimiter=~";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "/.api/api.svc/bulk_user_action/create_job");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job",
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "csvData": "email%0D%0Atex.murphy%40igloosoftware.com",
    "title": "New bulk member revoke job",
    "type": "delete",
    "groupDelimiter": "|",
    "spaceDelimiter": "~"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  }
};

axios.post('/.api/api.svc/bulk_user_action/create_job', {
  csvData: 'email%0D%0Atex.murphy%40igloosoftware.com',
  title: 'New bulk member revoke job',
  type: 'delete',
  groupDelimiter: '|',
  spaceDelimiter: '~'
}, config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var dataString = 'email=tex.murphy%40igloosoftware.com&firstName=Tex&lastName=Murphy&password=strong%20password&sendWelcomeMessage=false';

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/users/create',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

data = [
    ('csvData', 'email%0D%0Atex.murphy%40igloosoftware.com'),
    ('title', 'New bulk member revoke job'),
    ('type', 'delete'),
    ('groupDelimiter', '|'),
    ('spaceDelimiter', '~')
]

response = requests.post('https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job',
                         headers=headers, cookies=cookies, data=data)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$data = array(
    'csvData' => 'email%0D%0Atex.murphy%40igloosoftware.com',
    'title' => 'New bulk member revoke job',
    'type' => 'delete',
    'groupDelimiter' => '|',
    'spaceDelimiter' => '~'
);

$response = Requests::post('https://site.igloocommunities.com/.api/api.svc/bulk_user_action/create_job', $headers, $data);
$uri = "https://${iglooUrl}/.api/api.svc/bulk_user_action/create_job"

$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

$params = @{
    csvData        = "email%0D%0Atex.murphy%40igloosoftware.com"
    title          = "New bulk member revoke job"
    type           = "delete"
    groupDelimiter = "|"
    spaceDelimiter = "~"
}

$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $params -WebSession $session

View User

This will return basic user profile data. The ID of the user needs to be passed in the uri.

Request:

GET https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view HTTP/1.1
Host: site.igloocommunities.com
Cache-Control: no-cache
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "Persona:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"isEnabled": boolean,
		"name": {
			"firstName": "string",
			"lastName": "string",
			"fullName": "string",
			"initials": "string"
		},
		"namespace": "string5",
		"isActivated": boolean,
		"onlinestatus": {
			"statusText": "string"
		},
		"status": {
			"updated": "string",
			"value": "string"
		},
		"anonymousname": "string",
		"hasPhoto": boolean,
		"sharePhoto": boolean,
		"email": "string",
		"reputation": integer,
		"sendEmailOnMessage": boolean,
		"smsAddress": "string",
		"address": {},
		"bio": "string",
		"company": "string",
		"phone": "string",
		"website": "string"
	}
}
#!/bin/bash

# The user's ID needs to be passed here.

curl -X GET "https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View User
=============================================================================
*/
int viewUser()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View User Profile
/// </summary>
class Users
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewUserProfile()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class Address
    {
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
        public string email { get; set; }
        public int reputation { get; set; }
        public bool sendEmailOnMessage { get; set; }
        public string smsAddress { get; set; }
        public Address address { get; set; }
        public string bio { get; set; }
        public string company { get; set; }
        public string phone { get; set; }
        public string website { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

response = requests.get(
    'https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/users/00000000-0000-0000-0000-000000000000/view"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

View User By Email

This will return basic user data. The email address of the user needs to be passed in the uri as a query parameter.

Request:

GET https://site.igloocommunities.com/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com HTTP/1.1
Host: site.igloocommunities.com
Cache-Control: no-cache
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "Persona:http://schemas.iglooplatform.com/Igloo.Common",
		"id": "00000000-0000-0000-0000-000000000000",
		"href": "string",
		"navType": integer,
		"isEnabled": boolean,
		"name": {
			"firstName": "string",
			"lastName": "string",
			"fullName": "string",
			"initials": "string"
		},
		"namespace": "string",
		"isActivated": boolean,
		"onlinestatus": {
			"statusText": "string"
		},
		"status": {
			"updated": "string",
			"value": "string"
		},
		"anonymousname": "string",
		"hasPhoto": boolean,
		"sharePhoto": boolean,
		"email": "string",
		"reputation": integer,
		"sendEmailOnMessage": boolean,
		"smsAddress": "string",
		"address": {},
		"bio": "string",
		"company": "string",
		"phone": "string",
		"website": "string"
	}
}
#!/bin/bash

# The user's email address needs to be passed here.

curl -X GET "https://site.igloocommunities.com/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View User By Email
=============================================================================
*/
int viewUserByEmail()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/users/view_by_email_address";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str() + "?emailAddress=texmurphy%40igloosoftware.com");
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View User By Email
/// </summary>
class Users
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewUserByEmail()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Name
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public string fullName { get; set; }
        public string initials { get; set; }
    }

    public class Onlinestatus
    {
        public string statusText { get; set; }
    }

    public class Status
    {
        public DateTime updated { get; set; }
        public string value { get; set; }
    }

    public class Address
    {
    }

    public class Response
    {
        public string __type { get; set; }
        public string id { get; set; }
        public string href { get; set; }
        public int navType { get; set; }
        public bool isEnabled { get; set; }
        public Name name { get; set; }
        public string @namespace { get; set; }
        public bool isActivated { get; set; }
        public Onlinestatus onlinestatus { get; set; }
        public Status status { get; set; }
        public string anonymousname { get; set; }
        public bool hasPhoto { get; set; }
        public bool sharePhoto { get; set; }
        public string email { get; set; }
        public int reputation { get; set; }
        public bool sendEmailOnMessage { get; set; }
        public string smsAddress { get; set; }
        public Address address { get; set; }
        public string bio { get; set; }
        public string company { get; set; }
        public string phone { get; set; }
        public string website { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

params = (
    ('emailAddress', 'texmurphy@igloosoftware.com'),
)

response = requests.get('https://site.igloocommunities.com/.api/api.svc/users/view_by_email_address',
                        headers=headers, params=params, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=$sessionkey'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/users/view_by_email_address?emailAddress=texmurphy%40igloosoftware.com"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

View User Profile

This will return all user profile data fields. The ID of the user needs to be passed in the uri.

Request:

GET https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile HTTP/1.1
Host: site.igloocommunities.com
Cache-Control: no-cache
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": integer,
	"requestSupportCode": integer,
	"dictionary": null,
	"response": {
		"__type": "IglooList:http://schemas.iglooplatform.com/Igloo.Common",
		"startIndex": integer,
		"count": integer,
		"totalCount": "string",
		"items": [
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "bio",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "zipcode",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "fax",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "busphone",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "",
				"HasPerms": boolean,
				"Name": "occupation",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "im_skype",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "s_linkedin",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "website",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "customIdentifier",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "00000000-0000-0000-0000-000000000000"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "managedByLdap",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "i_report_to",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			},
			{
				"__type": "ProfileField:http://schemas.iglooplatform.com/Igloo.Common",
				"FieldId": "string",
				"HasPerms": boolean,
				"Name": "i_report_to_email",
				"Privacy": integer,
				"Type": integer,
				"UserId": "00000000-0000-0000-0000-000000000000",
				"Value": "string"
			}
		]
	}
}
#!/bin/bash

# The user's ID needs to be passed here.

curl -X GET "https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
View User Profile
=============================================================================
*/
int viewUserProfile()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// View User Profile
/// </summary>
class Users
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewUserProfile()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class Item
    {
        public string __type { get; set; }
        public string FieldId { get; set; }
        public bool HasPerms { get; set; }
        public string Name { get; set; }
        public int Privacy { get; set; }
        public int Type { get; set; }
        public string UserId { get; set; }
        public string Value { get; set; }
    }

    public class Response
    {
        public string __type { get; set; }
        public int startIndex { get; set; }
        public int count { get; set; }
        public string totalCount { get; set; }
        public List<Item> items { get; set; }
    }

    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public Response response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

response = requests.get(
    'https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile', $headers);
$uri = "https://${iglooUrl}/.api/api.svc/users/00000000-0000-0000-0000-000000000000/viewprofile"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Retrieve Profile Photo

This endpoint will allow the programmatic retrieval of a user's profile photo. The user's ID needs to be passed in the uri.

Request:

GET https://site.igloocommunities.com/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge HTTP/1.1
Host: site.igloocommunities.com
Cache-Control: no-cache
Accept: application/json
Cookie: iglooauth=00000000-0000-0000-0000-000000000000

Response:

This endpoint will directly download a JPEG (*.jpg) of the user's profile picture.

#!/bin/bash

# The user's ID needs to be passed here.

curl -X GET "https://site.igloocommunities.com/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge" -H "Accept: application/json" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Retrieve Profile Photo
=============================================================================
*/
int retrieveProfilePhoto()
{
	string url = "https://site.igloocommunities.com/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Retrieve Profile Photo
/// </summary>
class Users
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void ViewUserByEmail()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge");

        // Request
        using (client)
        {
            var response = client.GetAsync(uri).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                // Your code here...
            }
        }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge");
xhr.setRequestHeader("Accept", "application/json");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json'
  }
};

axios.get('/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge', config);
var headers = {
    'Accept': 'application/json',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var options = {
    url: 'https://site.igloocommunities.com/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
}

response = requests.get(
    'https://site.igloocommunities.com/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge', headers=headers, cookies=cookies)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$response = Requests::get('https://site.igloocommunities.com/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge', $headers);
$uri = "https://${iglooUrl}/download-profile/00000000-0000-0000-0000-000000000000/profile/crxlarge"

$headers = @{
    "Accept" = "application/json"
}

$response = Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -WebSession $session

Update User Profile

This endpoint updates a user's profile. The ID of the user needs to be passed in the uri. This can only be performed by the user themselves, or an Igloo Administrator.

Parameter
Type
Value
igval_address
string
String that contains the user's address.
igval_address2
string
String that contains the second line of the address.
igval_associations
string
String for any associations the user belongs to.
igval_bio
string
Biography as entered by the user.
igval_birthdate
string
User's birthday.
igval_blog
string
String containing URL link to the user's external blog website.
igval_busphone
string
String for the user's business phone number.
igval_buswebsite
string
String containing URL link to the user's business website.
igval_cellphone
string
String for the user's cell phone number.
igval_city
string
String containing the city the user lives in.
igval_company
string
String containing the name of the company the user works for.
igval_country
string
Country the user resides in.
igval_department
string
String for the department the user works under.
igval_extension
string
String containing the user's telephone extension number.
igval_fax
string
String for the user's fax number.
igval_hobbies
string
String containing a comma delimited list of the user's hobbies.
igval_i_report_to
string
String containing the name of the user that this specific user reports to.
igval_i_report_to_email
string
String containing the email address of this user's manager.
igval_im_aol
string
String containing the user's AOL username.
igval_im_googletalk
string
String containing the user's Google Talk username.
igval_im_msn
string
String containing the user's MSN username.
igval_im_skype
string
String containing the user's Skype username.
igval_interests
string
String containing a comma delimited list of the user's interests.
igval_occupation
string
String containing the user's job title/occupation.
igval_s_facebook
string
String containing URL link to the user's Facebook profile.
igval_s_google
string
String containing URL link to the user's Google+ profile.
igval_s_linkedin
string
String containing URL link to the user's LinkedIn profile.
igval_s_twitter
string
String containing URL link to the user's Twitter profile.
igval_sector
string
String containing the user's field/sector of employment.
igval_skills
string
String containing a comma delimited list of the user's skills.
igval_state
string
String containing the user's Province, State, or Region.
igval_status
string
Field that reflects the user's online status inside Igloo.
igval_website
string
String containing URL link to the user's external website.
igval_zipcode
string
String that contains the user's zip or postal code.

Request:

POST https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update HTTP/1.1
Accept: application/json

igval_address=2nd%20floor%20office%20of%20the%20Ritz%20Hotel&igval_address2=Chandler%20Ave&igval_associations=West%20Coast%20Tango%20Dance%20Instructors%20Guild&igval_bio=Private%20Investigator%20and%20Dance%20Instructor&igval_birthdate=3%2F04%2F1955%2012%3A00%3A00%20AM&igval_city=San%20Franciso&igval_country=United%20States%20of%20America&igval_fax=555-867-5309&igval_gender=Male&igval_hobbies=Teaching%20dance%2C%20collecting%20antique%20computers&igval_state=California

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
	"minRequestPeriod": 0,
	"requestSupportCode": 636619095258390700,
	"dictionary": null,
	"response": null
}
#!/bin/bash

# The ID that needs to be passed here is the user id of the profile to update.

curl -X POST "https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update" -H "Accept: application/json" -H "Content-type: application/x-www-form-urlencoded" --data "igval_address=2nd%20floor%20office%20of%20the%20Ritz%20Hotel&igval_address2=Chandler%20Ave&igval_associations=West%20Coast%20Tango%20Dance%20Instructors%20Guild&igval_bio=Private%20Investigator%20and%20Dance%20Instructor&igval_birthdate=3%2F04%2F1955%2012%3A00%3A00%20AM&igval_city=San%20Franciso&igval_country=United%20States%20of%20America&igval_fax=555-867-5309&igval_gender=Male&igval_hobbies=Teaching%20dance%2C%20collecting%20antique%20computers&igval_state=California" --cookie "iglooauth=$sessionkey"
/*
=============================================================================
Update User Profile
=============================================================================
*/
int updateUserProfile()
{
	string url = "https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update";

	CURLcode ret;
	CURL *hnd;
	struct curl_slist *headers;

	headers = NULL;
	headers = curl_slist_append(headers, "Accept: application/json");
	headers = curl_slist_append(headers, "Content-type: application/x-www-form-urlencoded");

	hnd = curl_easy_init();
	curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
	curl_easy_setopt(hnd, CURLOPT_URL, url.c_str());
	curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "igval_address=2nd%20floor%20office%20of%20the%20Ritz%20Hotel&igval_address2=Chandler%20Ave&igval_associations=West%20Coast%20Tango%20Dance%20Instructors%20Guild&igval_bio=Private%20Investigator%20and%20Dance%20Instructor&igval_birthdate=3%2F04%2F1955%2012%3A00%3A00%20AM&igval_city=San%20Franciso&igval_country=United%20States%20of%20America&igval_fax=555-867-5309&igval_gender=Male&igval_hobbies=Teaching%20dance%2C%20collecting%20antique%20computers&igval_state=California");
	curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)95);
	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
	curl_easy_setopt(hnd, CURLOPT_COOKIE, "iglooauth=" + iglooauth.c_str());
	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
	curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

	ret = curl_easy_perform(hnd);

	//
	// Your code here...
	//

	curl_easy_cleanup(hnd);
	hnd = NULL;
	curl_slist_free_all(headers);
	headers = NULL;

	return (int)ret;
}

//===========================================================================
/// <summary>
/// Update User Profile
/// </summary>
class Users
{
    static HttpClientHandler handler = new HttpClientHandler()
    {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
        UseCookies = true,
        CookieContainer = Authentication.cookies
    };

    static HttpClient client = new HttpClient(handler);

    public static void UpdateProfile()
    {
        // Uri
        Uri uri = new Uri(Igloo.Url + "/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update");

        // Headers
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        // Parameters
        var Params = new Dictionary<string, string>();
        Params.Add("igval_address", "2nd floor office of the Ritz Hotel");
        Params.Add("igval_address2", "Chandler Ave");
        Params.Add("igval_associations", "West Coast Tango Dance Instructors Guild");
        Params.Add("igval_bio", "Private Investigator and Dance Instructor");
        Params.Add("igval_birthdate", "3/04/1955 12:00:00 AM");
        Params.Add("igval_city", "San Francisco");
        Params.Add("igval_fax", "555-867-5309");
        Params.Add("igval_hobbies", "Teaching dance, collecting antique computers");
        Params.Add("igval_state", "California");

        // Body
        var Body = new FormUrlEncodedContent(Params);

        // Send the HTTP Request
        using (client)
        {
            var response = client.PostAsync(uri, Body).Result;

            var responseContent = response.Content;

            if ((int)response.StatusCode == 200)
            {
                string responseString = responseContent.ReadAsStringAsync().Result;

                ReturnData iglooResponse = JsonConvert.DeserializeObject<ReturnData>(responseString);

                // Your code here...
            }
        }
    }

    /// <summary>
    /// Classes for JSON response data
    /// </summary>
    public class ReturnData
    {
        public int minRequestPeriod { get; set; }
        public long requestSupportCode { get; set; }
        public object dictionary { get; set; }
        public object response { get; set; }
    }
}
/**
 * @description XHR - https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
 */
var data = "igval_address=2nd%20floor%20office%20of%20the%20Ritz%20Hotel&igval_address2=Chandler%20Ave&igval_associations=West%20Coast%20Tango%20Dance%20Instructors%20Guild&igval_bio=Private%20Investigator%20and%20Dance%20Instructor&igval_birthdate=3%2F04%2F1955%2012%3A00%3A00%20AM&igval_city=San%20Franciso&igval_country=United%20States%20of%20America&igval_fax=555-867-5309&igval_gender=Male&igval_hobbies=Teaching%20dance%2C%20collecting%20antique%20computers&igval_state=California";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);










/**
 * @description jQuery AJAX - http://api.jquery.com/jquery.ajax/
 */
var settings = {
  "async": true,
  "url": "https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update",
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "igval_address": "2nd floor office of the Ritz Hotel",
    "igval_address2": "Chandler Ave",
    "igval_associations": "West Coast Tango Dance Instructors Guild",
    "igval_bio": "Private Investigator and Dance Instructor",
    "igval_birthdate": "3/04/1955 12:00:00 AM",
    "igval_city": "San Francisco",
    "igval_country": "United States of America",
    "igval_fax": "555-867-5309",
    "igval_hobbies": "Teaching dance, collecting antique computers",
    "igval_state": "California"
  }
}

jQuery.ajax(settings).done(function (response) {
  console.log(response);
});










/**
 * @description axios - https://github.com/axios/axios
 */
var config = {
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  }
};

axios.post('/.api/api.svc/blogarticles/add', {
  igval_address: '2nd floor office of the Ritz Hotel',
  igval_address2: 'Chandler Ave',
  igval_associations: 'West Coast Tango Dance Instructors Guild',
  igval_bio: 'Private Investigator and Dance Instructor',
  igval_birthdate: '3/04/1955 12:00:00 AM',
  igval_city: 'San Francisco',
  igval_country: 'United States of America',
  igval_fax: '555-867-5309',
  igval_hobbies: 'Teaching dance, collecting antique computers',
  igval_state: 'California'
}, config);
var headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
    'Cookie': 'iglooauth=00000000-0000-0000-0000-000000000000'
};

var dataString = 'igval_address=2nd%20floor%20office%20of%20the%20Ritz%20Hotel&igval_address2=Chandler%20Ave&igval_associations=West%20Coast%20Tango%20Dance%20Instructors%20Guild&igval_bio=Private%20Investigator%20and%20Dance%20Instructor&igval_birthdate=3%2F04%2F1955%2012%3A00%3A00%20AM&igval_city=San%20Franciso&igval_country=United%20States%20of%20America&igval_fax=555-867-5309&igval_gender=Male&igval_hobbies=Teaching%20dance%2C%20collecting%20antique%20computers&igval_state=California';

var options = {
    url: 'https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update',
    method: 'POST',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
headers = {
    'Accept': 'application/json',
    'Content-type': 'application/x-www-form-urlencoded',
}

data = [
    ('igval_address', '2nd floor office of the Ritz Hotel'),
    ('igval_address2', 'Chandler Ave'),
    ('igval_associations', 'West Coast Tango Dance Instructors Guild'),
    ('igval_bio', 'Private Investigator and Dance Instructor'),
    ('igval_birthdate', '3/04/1955 12:00:00 AM'),
    ('igval_city', 'San Franciso'),
    ('igval_country', 'United States of America'),
    ('igval_fax', '555-867-5309'),
    ('igval_hobbies', 'Teaching dance, collecting antique computers'),
    ('igval_state', 'California')
]

response = requests.post('https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update',
                         headers=headers, cookies=cookies, data=data)
<?php
$headers = array(
    'Accept' => 'application/json',
    'Content-type' => 'application/x-www-form-urlencoded',
    'Cookie' => 'iglooauth=00000000-0000-0000-0000-000000000000'
);

$data = array(
    'igval_address' => '2nd floor office of the Ritz Hotel',
    'igval_address2' => 'Chandler Ave',
    'igval_associations' => 'West Coast Tango Dance Instructors Guild',
    'igval_bio' => 'Private Investigator and Dance Instructor',
    'igval_birthdate' => '3/04/1955 12:00:00 AM',
    'igval_city' => 'San Francisco',
    'igval_country' => 'United States of America',
    'igval_fax' => '555-867-5309',
    'igval_hobbies' => 'Teaching dance, collecting antique computers',
    'igval_state' => 'California',
);

$response = Requests::post('https://site.igloocommunities.com/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update', $headers, $data);
$uri = "https://${iglooUrl}/.api/api.svc/users/00000000-0000-0000-0000-000000000000/update"

$headers = @{
    "Accept"       = "application/json"
    "Content-type" = "application/x-www-form-urlencoded"
}

$params = @{
    igval_address      = "2nd floor office of the Ritz Hotel"
    igval_address2     = "Chandler Ave"
    igval_associations = "West Coast Tango Dance Instructors Guild"
    igval_bio          = "Private Investigator and Dance Instructor"
    igval_birthdate    = "3/04/1955 12:00:00 AM"
    igval_city         = "San Francisco"
    igval_country      = "United States of America"
    igval_fax          = "555-867-5309"
    igval_hobbies      = "Teaching dance, collecting antique computers"
    igval_state        = "California"
}

$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $params -WebSession $session

Errors

Code
Text
Description
200
OK
Success!
204
No Content
The server successfully processed the request and is not returning any content.
207
Multi-Status
Response will contain a number of separate response codes.
400
Bad Request
The request was invalid or cannot be otherwise served.
401
Unauthorized
Missing or incorrect authentication credentials.
403
Forbidden
The request is understood, but it has been refused or access is not allowed.
404
Not Found
The URI requested is invalid or the resource requested does not exists.
405
Method Not Allowed
A request method is not supported for the requested resource.
409
Conflict
Indicates that the request could not be processed because of conflict in the request.
422
Unprocessable entity
The request was well-formed but was unable to be followed due to semantic errors.
500
Internal Server Error
Something is broken.
503
Service Unavailable
The servers are up, but overloaded. Try again later.

Example error messages

Errors will return a supportCode which can in some instances be used by internal Igloo teams to investigate the root cause of the error.

{ 
   "supportCode":"NjM2NDE0NDU2NzI5NzM1MjIwX01HSVJBUkQtTFAy", 
   "errors":[ 
      { 
 	 "code":"BadRequest", 
 	 "message":"Provided post body was empty!" 
      } 
   ] 
} 

Or:

{ 
    "minRequestPeriod": 0, 
    "requestSupportCode": 636414457559809087, 
    "exception": { 
	 	"statusCode": 422, 
	 	"type": "Validation_ReportInvalidInput", 
	 	"errorId": 49763, 
	 	"message": "Your request failed due to invalid parameters.", 
	 	"errorTags": "Validation, BadUserInput", 
	 	"dataTokens": [], 
	 	"stacktrace": "", 
	 	"errorList": [ 
	 	    { 
	 	 	"statusCode": 422, 
	 	 	"type": "Validation_ParameterMissing", 
	 	 	"errorId": 888089, 
	 	 	"message": "A required parameter was not found.", 
	 	 	"errorTags": "Validation, BadUserInput", 
	 	 	"dataTokensId": 10, 
	 	 	"dataTokens": [ 
	 	 	    { 
	 	 	 	"name": "ParameterName", 
	 	 	 	"value": "email", 
	 	 	 	"isLiteral": true 
	 	 	    } 
	 	 	], 
	 	 	"timestamp": "/Date(1505848957794-0400)/" 
	 	    }, 
	 	    { 
	 	 	"statusCode": 422, 
	 	 	"type": "Validation_ParameterMissing", 
	 	 	"errorId": 888089, 
	 	 	"message": "A required parameter was not found.", 
	 	 	"errorTags": "Validation, BadUserInput", 
	 	 	"dataTokensId": 10, 
	 	 	"dataTokens": [ 
	 	 	    { 
	 	 	 	"name": "ParameterName", 
	 	 	 	"value": "firstName", 
	 	 	 	"isLiteral": true 
	 	 	    } 

	 	 	], 
	 	 	"timestamp": "/Date(1505848957794-0400)/" 
	 	    } 
	 	], 
	 	"timestamp": "/Date(1505848957794-0400)/" 
    }, 
    "dictionary": null, 
    "response": null 
} 

For more information, check out the Developer's Knowledge Base.

# The IGLOO API returns errors in JSON format.