Listar Lambdas
Lista las lambdas pertenecientes a la cuenta autenticada.
Autenticación
Requiere X-Glue-Authentication.
Solicitud HTTP
curl -X GET "https://api.hola.cloud/api/v0/lambdas" \
-H "X-Glue-Authentication: TU_TOKEN"GET /api/v0/lambdas HTTP/1.1
Host: api.hola.cloud
X-Glue-Authentication: TU_TOKEN
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.hola.cloud/api/v0/lambdas", nil)
if err != nil {
panic(err)
}
req.Header.Set("X-Glue-Authentication", "TU_TOKEN")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(responseBody))
}
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.hola.cloud/api/v0/lambdas',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'X-Glue-Authentication: TU_TOKEN',
],
]);
$response = curl_exec($ch);
if ($response === false) {
throw new Exception(curl_error($ch));
}
curl_close($ch);
echo $response;
import requests
headers = {
"X-Glue-Authentication": "TU_TOKEN",
}
response = requests.request(
"GET",
"https://api.hola.cloud/api/v0/lambdas",
headers=headers
)
print(response.text)
const response = await fetch("https://api.hola.cloud/api/v0/lambdas", {
method: "GET",
headers: {
"X-Glue-Authentication": "TU_TOKEN"
}
});
console.log(await response.text());
const response = await fetch("https://api.hola.cloud/api/v0/lambdas", {
method: "GET",
headers: {
"X-Glue-Authentication": "TU_TOKEN"
}
});
const text = await response.text();
console.log(text);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
var request = HttpRequest.newBuilder()
.uri(URI.create("https://api.hola.cloud/api/v0/lambdas"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.header("X-Glue-Authentication", "TU_TOKEN")
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Ejemplo
curl -X GET "https://api.hola.cloud/api/v0/lambdas" \
-H "X-Glue-Authentication: TU_TOKEN"GET /api/v0/lambdas HTTP/1.1
Host: api.hola.cloud
X-Glue-Authentication: TU_TOKEN
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.hola.cloud/api/v0/lambdas", nil)
if err != nil {
panic(err)
}
req.Header.Set("X-Glue-Authentication", "TU_TOKEN")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(responseBody))
}
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.hola.cloud/api/v0/lambdas',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'X-Glue-Authentication: TU_TOKEN',
],
]);
$response = curl_exec($ch);
if ($response === false) {
throw new Exception(curl_error($ch));
}
curl_close($ch);
echo $response;
import requests
headers = {
"X-Glue-Authentication": "TU_TOKEN",
}
response = requests.request(
"GET",
"https://api.hola.cloud/api/v0/lambdas",
headers=headers
)
print(response.text)
const response = await fetch("https://api.hola.cloud/api/v0/lambdas", {
method: "GET",
headers: {
"X-Glue-Authentication": "TU_TOKEN"
}
});
console.log(await response.text());
const response = await fetch("https://api.hola.cloud/api/v0/lambdas", {
method: "GET",
headers: {
"X-Glue-Authentication": "TU_TOKEN"
}
});
const text = await response.text();
console.log(text);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
var request = HttpRequest.newBuilder()
.uri(URI.create("https://api.hola.cloud/api/v0/lambdas"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.header("X-Glue-Authentication", "TU_TOKEN")
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Respuesta
1[
2 {
3 "id": "f1a2b3c4-d5e6-7890-abcd-ef0123456789",
4 "created_timestamp": 1751378400,
5 "owner": "user_123",
6 "project_id": "project_456",
7 "name": "hello-world",
8 "language": "javascript",
9 "code": "export default (req) => ({ body: { message: \"Hello, World!\" } })",
10 "method": "GET",
11 "path": "/hello-world"
12 },
13 {
14 "id": "a2b3c4d5-e6f7-8901-bcde-f12345678901",
15 "created_timestamp": 1750408200,
16 "owner": "user_123",
17 "project_id": "project_456",
18 "name": "site-style",
19 "language": "static-css",
20 "code": "body { color: #111; }",
21 "method": "GET",
22 "path": "/site.css"
23 }
24]
Códigos de Error
| Código | Descripción |
|---|---|
| 401 | Autenticación faltante o inválida |
Comentarios