Delete File API

Remove file entries from the platform's resource library

Resources

Delete File API

Remove file entries from the platform. Delete outdated, deprecated, or no longer needed resource files from your library.

Remove Entry

Delete file from library.

Clean Up

Remove deprecated files.

Controlled

Admin-only operation.


Endpoint Overview

MUTATION/graphql

Delete an existing file entry by its unique identifier. This removes the file from the platform's resource library.

Authentication:Bearer Token
Required scopes:admin

Request Parameters

idInt!Required

The unique identifier of the file to delete.


GraphQL Mutation

mutation deleteFile($id: Int!) {
  deleteFile(id: $id) {
    id
    title
    description
    url
  }
}

Variables:

{
  "id": 789
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "query": "mutation deleteFile($id: Int!) { deleteFile(id: $id) { id title } }",
    "variables": {
      "id": 789
    }
  }'

Response

200File Deleted Successfully
{
  "data": {
    "deleteFile": {
      "id": "789",
      "title": "Windows VPN Client v2.4.0",
      "description": "Previous version - deprecated",
      "url": "https://downloads.example.com/vpn-client-2.4.0.exe"
    }
  }
}
400File Not Found
{
  "errors": [
    {
      "message": "File with ID 789 not found",
      "path": ["deleteFile"],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ],
  "data": null
}

When to Delete

Deprecated Version

Old software versions.

Replaced

Superseded by newer file.

Security Issue

Contains vulnerability.

No Longer Needed

Content is obsolete.


Best Practices

Keep Hosted File

This only removes the entry, not the actual file.

Redirect Users

Point users to replacement if available.

Verify Not Needed

Ensure file is truly obsolete.

Document Removal

Record why file was deleted.



Entry Removal Only

This deletes the file entry from the platform, not the actual file at the URL. Delete the hosted file separately if needed.

Add New Resources

Replace deleted files with updated versions.

Create File