Applications
/v1/apps
This endpoint retrieves a paginated list of applications.
GET
/
v1
/
apps
cURL
curl --request GET \
--url https://api.camposcloud.com/v1/apps \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.camposcloud.com/v1/apps"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.camposcloud.com/v1/apps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.camposcloud.com/v1/apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.camposcloud.com/v1/apps"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.camposcloud.com/v1/apps")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.camposcloud.com/v1/apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"applications": [
{
"_id": "000000000000000000000001",
"id": "000000000000000000000001",
"containerId": "00000000-0000-4000-8000-000000000000",
"userId": "000000000000000000000002",
"name": "My Application",
"mainFile": "index.js",
"restartRequired": false,
"allocatedMemoryMB": 256,
"allocatedVCpu": 2,
"workerNodeId": {
"_id": "000000000000000000000004",
"nodeName": "NODE-1"
},
"containerImage": "kevencampos/camposcloud-nodejs",
"exposedViaWeb": false,
"internalPort": 3000,
"externalPort": 30001,
"assignedSubdomain": "myapp",
"assignedCustomDomain": "app.example.com",
"startupCommand": "node index.js",
"installDependenciesCmd": "npm install --force",
"runtimeEnvironment": "nodejs",
"autoRestartEnabled": false,
"status": "active",
"suspension": {
"active": true,
"reason": "Phishing page reported by a third party.",
"suspendedAt": "2023-11-07T05:31:56Z"
},
"shutdownNotice": {
"kind": "request_limit",
"limitPerMinute": 1000,
"domain": "api.example.com",
"stoppedAt": "2023-11-07T05:31:56Z"
},
"environmentVariables": [
{
"key": "API_PORT",
"value": "3005",
"_id": "000000000000000000000006"
}
],
"repository": {
"name": "my-repo",
"owner": "my-github-user",
"id": "123456789",
"branch": "main",
"installationId": "12345678"
},
"githubDeploys": [
{
"_id": "000000000000000000000006",
"commitId": "0000000000000000000000000000000000000000",
"branch": "main",
"status": "success",
"message": "first commit",
"duration": 123,
"createdAt": "2025-01-01T12:00:00.000Z",
"commitedAt": "2025-01-01T12:00:00.000Z",
"commitedBy": "my-github-user"
}
],
"volumeMoved": false,
"currentResourceMetrics": {
"timestamp": "2025-01-01T12:00:00.000Z",
"online": true,
"uptime": 35980,
"startedAt": "2025-01-01T12:00:00.000Z",
"cpuUsagePercent": 0.42,
"memoryUsageBytes": 43671552,
"memoryLimitBytes": 268435456,
"networkRxBytes": 228961,
"networkTxBytes": 228190
},
"historyResourceMetrics": [
{}
],
"volumeSizeHistory": [
{
"timestamp": "2025-01-01T12:00:00.000Z",
"diskUsageBytes": 1048576
}
],
"createdAt": "2025-01-01T12:00:00.000Z",
"updatedAt": "2025-01-01T12:00:00.000Z",
"__v": 0,
"buildCommand": "npm run build",
"customDomainPending": "app.example.com",
"customDomainTxtName": "_camposcloud-verify.app.example.com",
"customDomainTxtValue": "camposcloud-verify=3f2a9c0d8e7b6a5f4e3d2c1b0a998877",
"teamId": null
}
],
"totalUsedRAM": 768,
"pagination": {
"totalItems": 12,
"totalPages": 2,
"currentPage": 1,
"itemsPerPage": 10,
"hasNextPage": true,
"hasPrevPage": false
}
}{
"error": "\"status\" is not allowed"
}{
"error": "Invalid developer token"
}{
"error": "You do not have permission to access this team."
}{
"error": "Team not found."
}{
"error": "Too many requests, please try again later"
}{
"error": "Internal server error. Please try again later."
}The list is paginated and returns 10 applications per page by default. Use
page and limit, and keep requesting pages while pagination.hasNextPage is true.Without the
team parameter only your personal applications are returned. Applications that belong to a team are only returned when you pass the ID of that team in team.Authorizations
Query Parameters
Response
A page of applications.
⌘I
cURL
curl --request GET \
--url https://api.camposcloud.com/v1/apps \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.camposcloud.com/v1/apps"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.camposcloud.com/v1/apps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.camposcloud.com/v1/apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.camposcloud.com/v1/apps"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.camposcloud.com/v1/apps")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.camposcloud.com/v1/apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"applications": [
{
"_id": "000000000000000000000001",
"id": "000000000000000000000001",
"containerId": "00000000-0000-4000-8000-000000000000",
"userId": "000000000000000000000002",
"name": "My Application",
"mainFile": "index.js",
"restartRequired": false,
"allocatedMemoryMB": 256,
"allocatedVCpu": 2,
"workerNodeId": {
"_id": "000000000000000000000004",
"nodeName": "NODE-1"
},
"containerImage": "kevencampos/camposcloud-nodejs",
"exposedViaWeb": false,
"internalPort": 3000,
"externalPort": 30001,
"assignedSubdomain": "myapp",
"assignedCustomDomain": "app.example.com",
"startupCommand": "node index.js",
"installDependenciesCmd": "npm install --force",
"runtimeEnvironment": "nodejs",
"autoRestartEnabled": false,
"status": "active",
"suspension": {
"active": true,
"reason": "Phishing page reported by a third party.",
"suspendedAt": "2023-11-07T05:31:56Z"
},
"shutdownNotice": {
"kind": "request_limit",
"limitPerMinute": 1000,
"domain": "api.example.com",
"stoppedAt": "2023-11-07T05:31:56Z"
},
"environmentVariables": [
{
"key": "API_PORT",
"value": "3005",
"_id": "000000000000000000000006"
}
],
"repository": {
"name": "my-repo",
"owner": "my-github-user",
"id": "123456789",
"branch": "main",
"installationId": "12345678"
},
"githubDeploys": [
{
"_id": "000000000000000000000006",
"commitId": "0000000000000000000000000000000000000000",
"branch": "main",
"status": "success",
"message": "first commit",
"duration": 123,
"createdAt": "2025-01-01T12:00:00.000Z",
"commitedAt": "2025-01-01T12:00:00.000Z",
"commitedBy": "my-github-user"
}
],
"volumeMoved": false,
"currentResourceMetrics": {
"timestamp": "2025-01-01T12:00:00.000Z",
"online": true,
"uptime": 35980,
"startedAt": "2025-01-01T12:00:00.000Z",
"cpuUsagePercent": 0.42,
"memoryUsageBytes": 43671552,
"memoryLimitBytes": 268435456,
"networkRxBytes": 228961,
"networkTxBytes": 228190
},
"historyResourceMetrics": [
{}
],
"volumeSizeHistory": [
{
"timestamp": "2025-01-01T12:00:00.000Z",
"diskUsageBytes": 1048576
}
],
"createdAt": "2025-01-01T12:00:00.000Z",
"updatedAt": "2025-01-01T12:00:00.000Z",
"__v": 0,
"buildCommand": "npm run build",
"customDomainPending": "app.example.com",
"customDomainTxtName": "_camposcloud-verify.app.example.com",
"customDomainTxtValue": "camposcloud-verify=3f2a9c0d8e7b6a5f4e3d2c1b0a998877",
"teamId": null
}
],
"totalUsedRAM": 768,
"pagination": {
"totalItems": 12,
"totalPages": 2,
"currentPage": 1,
"itemsPerPage": 10,
"hasNextPage": true,
"hasPrevPage": false
}
}{
"error": "\"status\" is not allowed"
}{
"error": "Invalid developer token"
}{
"error": "You do not have permission to access this team."
}{
"error": "Team not found."
}{
"error": "Too many requests, please try again later"
}{
"error": "Internal server error. Please try again later."
}