Skip to main content

Listing Applications in Your Project

To list applications in your project, you need to send a GET request to the endpoint /api/v1/applications.

The response would be a json that contains all the data about your applications.

See below for code examples on how to retrieve the list of applications 

Java

info

You need the OKHttpClient library. You can get from Maven (if you use maven or gradle).

Get Applications with Java Expand source

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.junit.Test;

import java.io.IOException;


public class Applications {

@Test
public void listApplications() throws IOException {
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://cloud.seetest.io/api/v1/applications")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer <ACCESS KEY>")
.addHeader("Cache-Control", "no-cache")
.addHeader("Postman-Token", "2b15d9e9-b0e2-0c0b-3a7c-bdf7d94272b0")
.build();

try {
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
} catch (IOException e) {
e.printStackTrace();
}
}

}

Python

info

For this code to run, you need the Requests package You can get it by running the command

pip install requests

Get Applications with Python Expand source

import requests

url = "https://cloud.seetest.io/api/v1/applications"

headers = {
'Content-Type': "application/json",
'Authorization': "Bearer <ACCESS_KEY>",
'Cache-Control': "no-cache",
}

response = requests.request("GET", url, headers=headers)

print(response.text)

C#

info

For this code to run, you need the RestSharp library. You can get it by running the command (in NuGet Package Manager)

Install-Package RestSharp

List Applications with C Sharp Expand source

using RestSharp;
using System;

namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)

{
var client = new RestClient("https://cloud.seetest.io/api/v1/applications");
var request = new RestRequest(Method.GET);
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Authorization", "Bearer <ACCESS_KEY>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Console.ReadLine();
}
}
}

Ruby

List Applications with Ruby Expand source

require 'uri'
require 'net/http'

url = URI("https://cloud.seetest.io/api/v1/applications")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request["Authorization"] = 'Bearer <ACCESS_KEY>'
request["Cache-Control"] = 'no-cache'

response = http.request(request)
puts response.read_body