Get a collection of Projects/Users that has been deleted. Accessible to admins only

using System;
using System.Net;
using System.Net.Http;

namespace REST.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            HttpClient client = new HttpClient();
            client.BaseAddress = new Uri("https://restapi.tpondemand.com/api/");
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

            string query = "DeletedItems/v1/Projects";

            //using a token generated at /api/v1/Authentication
            query += "?token=MTpGMjRERDMxODUzNDk1NjdFOTQ0NEY4NkFFOEJCMjkzMw==";
            Console.WriteLine("Pulling " + query);

            HttpResponseMessage response = client.GetAsync(query).Result;
            if (response.IsSuccessStatusCode)
            {
                Console.WriteLine(response.Content.ReadAsStringAsync().Result);
            }
            else
            {
                Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
            }
        }
    }
}
using System;
using System.Net;
using System.Net.Http;

namespace REST.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            HttpClient client = new HttpClient();
            client.BaseAddress = new Uri("https://restapi.tpondemand.com/api/");
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

            string query = "DeletedItems/v1/Projects";

            //using access token generated at Personal Details page (Access Tokens tab)
            query += "?access_token=MTpoUmx4WW1LTzF6dlkvbUN1dTZIclVBUFQyQ1Z0MkN6YnF6OHBETmRZN2kwPQ==";
            Console.WriteLine("Pulling " + query);

            HttpResponseMessage response = client.GetAsync(query).Result;
            if (response.IsSuccessStatusCode)
            {
                Console.WriteLine(response.Content.ReadAsStringAsync().Result);
            }
            else
            {
                Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
            }
        }
    }
}
using System;
using System.Net;
using System.Net.Http;
using System.Text;

namespace REST.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            HttpClient client = new HttpClient();
            client.BaseAddress = new Uri("https://restapi.tpondemand.com/api/");
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

            string query = "DeletedItems/v1/Projects";

            //using basic authentication (here 'admin' is login and 'admin' is password)
            string authentication = Convert.ToBase64String(Encoding.ASCII.GetBytes("admin:admin"));
            client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", authentication);
            Console.WriteLine("Pulling " + query);

            HttpResponseMessage response = client.GetAsync(query).Result;
            if (response.IsSuccessStatusCode)
            {
                Console.WriteLine(response.Content.ReadAsStringAsync().Result);
            }
            else
            {
                Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
            }
        }
    }
}
using System;
using System.Net;
using System.Net.Http;

namespace REST.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            HttpClient client = new HttpClient();
            client.BaseAddress = new Uri("https://restapi.tpondemand.com/api/");
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

            string query = "DeletedItems/v1/Projects";

            //using no authentication will result in 401 Unauthorized response
            Console.WriteLine("Pulling " + query);

            HttpResponseMessage response = client.GetAsync(query).Result;
            if (response.IsSuccessStatusCode)
            {
                Console.WriteLine(response.Content.ReadAsStringAsync().Result);
            }
            else
            {
                Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
            }
        }
    }
}
Language
Click Try It! to start a request and see the response here!