Eliminar Scheduler
Elimina un scheduler y todas sus tareas.
Autenticación
Requiere autenticación. Pasa tu clave API mediante el encabezado X-API-Key o Authorization: Bearer.
Parámetros de Ruta
| Parámetro | Tipo | Descripción |
|---|---|---|
| id | string | Identificador único del scheduler |
Ejemplo de Solicitud
curl -X DELETE "https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "X-API-Key: TU_API_KEY"DELETE /schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890 HTTP/1.1
Host: api.hola.cloud
X-API-Key: TU_API_KEY
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890", nil)
if err != nil {
panic(err)
}
req.Header.Set("X-API-Key", "TU_API_KEY")
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/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'X-API-Key: TU_API_KEY',
],
]);
$response = curl_exec($ch);
if ($response === false) {
throw new Exception(curl_error($ch));
}
curl_close($ch);
echo $response;
import requests
headers = {
"X-API-Key": "TU_API_KEY",
}
response = requests.request(
"DELETE",
"https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
headers=headers
)
print(response.text)
const response = await fetch("https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
method: "DELETE",
headers: {
"X-API-Key": "TU_API_KEY"
}
});
console.log(await response.text());
const response = await fetch("https://api.hola.cloud/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
method: "DELETE",
headers: {
"X-API-Key": "TU_API_KEY"
}
});
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/schedulers/sched-a1b2c3d4-e5f6-7890-abcd-ef1234567890"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.header("X-API-Key", "TU_API_KEY")
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Ejemplo de Respuesta
1HTTP/1.1 204 No Content
Códigos de Error
| Estado | Código | Descripción |
|---|---|---|
| 401 | unauthorized | Clave API faltante o inválida |
| 404 | not_found | Scheduler no encontrado |
| 500 | internal_error | Error interno del servidor |
Comentarios