hello.app Documentation
  • Get 100GB Free Cloud Storage Now: Discover hello.app's Secure & Decentralized File Management
  • 👋Welcome to hello.app: Your Gateway to Secure, Decentralized File Storage
  • Overview
    • 💡Platform FAQ
    • 🌐Journalistic Press
  • 💁Support
  • Api Key Documentation
    • 🔑Get an Api key
    • 🌌Endpoints
      • 📍Ping
      • âŦ†ī¸Upload Files
      • 📃Retrieve File Information
      • đŸ—ƒī¸Retrieve Paginated List of Files
      • 💨Delete File
      • 🔃 Update File
      • âŦ‡ī¸Download File
  • Integrating the Future
    • 🔒Security system
    • đŸ§ŋStorage Networks
      • IPFS
      • SIA
    • 📑Data Management System
    • 📓Decentralized Database
    • 🔎Decentralized storage verification system
  • IPFS
    • 🔩About IPFS
    • âš™ī¸IPFS Tools
    • â›Šī¸IPFS Gateway
  • Documentation
    • đŸ› ī¸Getting set up
  • Resources
    • 📍Discord
    • 📓Dictionary
    • đŸ›Ąī¸Slack
    • 📔Release Notes
  • hello.app - Terms and Conditions
Powered by GitBook
On this page
  1. Api Key Documentation
  2. Endpoints

Delete File

Endpoint to delete a specific file based on its UID.

  • HTTP Method: DELETE

  • Route: /public-api/v1/files/:uid

  • Headers:

    • api-key: Token generated through the API key section.

Query Parameters

  • uid: The unique identifier (UID) of the file to delete.

Response

  • Status Code: 200 OK

  • Response Body:

    {
      "message": "ok"
    }

Error Responses

  • Entity Not Found (404):

    • If the file with the specified UID does not exist.

Example in JavaScript:

Using Fetch API:

const url = 'base_url/public-api/v1/files/your_file_uid';
const apiKey = 'your_api_key';

fetch(url, {
  method: 'DELETE',
  headers: {
    'api-key': apiKey,
  },
})
  .then((response) => {
    if (!response.ok) {
      if (response.status === 404) {
        console.error('File not found.');
      } else {
        throw new Error(`Network error: ${response.status}`);
      }
    }
    return response.json();
  })
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error('There was a problem with the Fetch request:', error);
  });

Using Axios:

const axios = require('axios');

const url = 'base_url/public-api/v1/files/your_file_uid';
const apiKey = 'your_api_key';

axios.delete(url, {
  headers: {
    'api-key': apiKey,
  },
})
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    if (error.response.status === 404) {
      console.error('File not found.');
    } else {
      console.error('There was a problem with the Axios request:', error);
    }
  });
PreviousRetrieve Paginated List of FilesNext Update File

Last updated 1 year ago

🌌
💨