API

API allows you to interact with your server programmatically. You can use it to automate tasks like updating, creating and deleting files, and more.

API Documentation

API base URL: nekoweb.org/api

Authentication

Send your API key in the Authorization header of your requests.

/site/info

Get information about your site.

Method: GET
Returns a JSON object with id, username, title, updates, followers, views, created_at and updated_at properties.

/site/info/:username

Get information about a user's site. Replace :username with the username of the user. This endpoint doesn't require auth if requested from Nekoweb site.

Method: GET
Returns a JSON object with id, username, title, updates, followers, views, created_at and updated_at properties.

/files/create

Create a new file or folder.

Content type: application/x-www-form-urlencoded
Method: POST
Parameters:
  • pathname: The path of the file or folder to create. Required.
  • isFolder: false for file, true for folder. Required.

/files/upload

Upload a file or files. This will overwrite old files. Max 100MB.

Content type: multipart/form-data
Method: POST
Parameters:
  • pathname: The path of the folder to upload to. Required.

/files/delete

Delete a file or folder.

Content type: application/x-www-form-urlencoded
Method: POST
Parameters:
  • pathname: The path of the file or folder to delete. Required.

/files/rename

Rename/Move a file or folder.

Content type: application/x-www-form-urlencoded
Method: POST
Parameters:
  • pathname: The old path of the file or folder. Required.
  • newpathname: The new path of the file or folder. Required.

/files/edit

Edit a file.

Content type: multipart/form-data
Method: POST
Parameters:
  • pathname: The path of the file to edit. Required.
  • content: The new content of the file. Required.

/files/readfolder

Read a folder.

Method: GET
Query parameters:
  • pathname: The path of the folder to read. Required.
Returns a JSON array with objects like this: {name: String, dir: Boolean}

/files/big/create

Create upload for a big file. Allows you to upload files larger than 100MB.

Method: GET
Returns a JSON object with a id property. Use this id to upload the file in chunks.

/files/big/append

Append a chunk to a big file upload. Chunk must be less than 100MB.

Content type: multipart/form-data
Method: POST
Parameters:
  • id: The id of the big file upload. Required.

/files/big/move

Move a big file upload to the final location.

Content type: application/x-www-form-urlencoded
Method: POST
Parameters:
  • id: The id of the big file upload. Required.
  • pathname: The path of the file to move to. Required.

/files/import/:bigid

Import a zip file from a big file upload. Replace :bigid with the id of the big file upload.

Content type: application/x-www-form-urlencoded
Method: POST