Fumadocs

Delete a planet

This endpoint was used to delete planets. Unfortunately, that caused a lot of trouble for planets with life. So, this endpoint is now deprecated and should not be used anymore.

DELETE
/planets/{planetId}
AuthorizationBearer <token>

JWT Bearer token authentication

In: header

Path Parameters

planetIdinteger

The ID of the planet to get

Formatint64

Response Body

curl -X DELETE "https://galaxy.scalar.com/planets/1"
fetch("https://galaxy.scalar.com/planets/1")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://galaxy.scalar.com/planets/1"

  req, _ := http.NewRequest("DELETE", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://galaxy.scalar.com/planets/1"

response = requests.request("DELETE", url)

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;

HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://galaxy.scalar.com/planets/1"))
  .DELETE()
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var client = new HttpClient();
var response = await client.DeleteAsync("https://galaxy.scalar.com/planets/1");
var responseBody = await response.Content.ReadAsStringAsync();
Empty
{
  "type": "https://example.com/errors/not-found",
  "title": "Not Found",
  "status": 404,
  "detail": "The resource you are trying to access does not exist."
}

How is this guide?