Files
Upload File
Upload File
POST
https://neodrive.my.id/api/v1/files
Upload a new file.
Headers
Request Body
{
"status": 200,
"url": "https://neodrive.my.id/f/a4dc28ac-0ad8-4e6a-a025-204085fbafbf",
"name": "eample.mp4",
"size": "15310263",
"format": "mp4",
"backup": {
"success": true,
"message": "backup file success"
}
}
{
"status": 401,
"messages": {
"error": "Unauthorized"
}
}
There were several errors during the request. either you don't have access to the requested file, or we don't have access to your account anymore
{
"status": 400,
"messages": {
"error": "Example Error Message"
}
}
{
"status": 422,
"messages": {
"error": "url field is required"
}
}
{
"status": 500,
"messages": {
"error": "Internal server error"
}
}
curl --location --request POST 'https://neodrive.my.id/api/v1/files' \
--header 'neodrive-api: 625092296266470295046fd6bd9c44a5' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'url=https://drive.google.com/file/d/1VLdzYRFUEL_QIvKlK46wu6kvAqPNRn2h/view?usp=sharing' \
--data-urlencode 'google_account=2' \
--data-urlencode 'google_account_backup=3' \
--data-urlencode 'teamdrive='
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://neodrive.my.id/api/v1/files',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1VLdzYRFUEL_QIvKlK46wu6kvAqPNRn2h%2Fview%3Fusp%3Dsharing&google_account=2&google_account_backup=3&teamdrive=',
CURLOPT_HTTPHEADER => array(
'neodrive-api: 625092296266470295046fd6bd9c44a5',
'Content-Type: application/x-www-form-urlencoded',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'url': 'https://drive.google.com/file/d/1VLdzYRFUELK46wu6kvAqPNRn2h/view?usp=sharing',
'google_account': '2',
'google_account_backup': '3',
'teamdrive': false
});
var config = {
method: 'post',
url: 'https://neodrive.my.id/api/v1/files',
headers: {
'neodrive-api': '625092296266470295046fd6bd9c44a5',
'Content-Type': 'application/x-www-form-urlencoded',
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Update File
Update existing file
PUT
https://neodrive.my.id/api/v1/files
Headers
Request Body
{
"status": 200,
"file": {
"id": "a4dc28ac-0ad8-4e6a-a025-204085fbafbf",
"name": "editexample.mp4",
"status": "normal",
"url": "http://localhost:8080/f/a4dc28ac-0ad8-4e6a-a025-204085fbafbf",
"driveid": "1VLdzYRFUEL_QIvKlK46wu6kvAqPNRn2h"
},
"message": "File updated."
}
{
"status": 404,
"messages": {
"error": "file not found"
}
}
{
"status": 403,
"messages": {
"error": "File Banned"
}
}
(Mostly Drive File Sharing Disable or Not Found)
{
"status": 400,
"messages": {
"error": "Google Drive ID is not accessible, check again or turn on sharing on your file"
}
}
{
"status": 500,
"messages": {
"error": "Internal Server Error"
}
}
{
"status": 401,
"messages": {
"error": "Unauthorized"
}
}
{
"status": 422,
"messages": {
"error": "url field is required"
}
}
curl --location --request PUT 'https://neodrive.my.id/api/v1/files' \
--header 'neodrive-api: 625092296266470295046fd6bd9c44a5' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=a4dc28ac-0ad8-4e6a-a025-204085fbafbf' \
--data-urlencode 'name=editexample.mp4'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://neodrive.my.id/api/v1/files',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => 'id=a4dc28ac-0ad8-4e6a-a025-204085fbafbf&name=editexample.mp4',
CURLOPT_HTTPHEADER => array(
'neodrive-api: 625092296266470295046fd6bd9c44a5',
'Content-Type: application/x-www-form-urlencoded',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'id': 'a4dc28ac-0ad8-4e6a-a025-204085fbafbf',
'name': 'editexample.mp4'
});
var config = {
method: 'put',
url: 'https://neodrive.my.id/api/v1/files',
headers: {
'neodrive-api': '625092296266470295046fd6bd9c44a5',
'Content-Type': 'application/x-www-form-urlencoded',
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});java
Delete File
Delete existing File
DELETE
https://neodrive.my.id/api/v1/files
Headers
Request Body
{
"status": 200,
"message": "file deleted"
}
{
"status": 401,
"messages": {
"error": "Unauthorized"
}
}
{
"status": 404,
"messages": {
"error": "file not found"
}
}
{
"status": 403,
"messages": {
"error": "File Banned"
}
}
{
"status": 422,
"messages": {
"error": "id field is required"
}
}
{
"status": 500,
"messages": {
"error": "Internal Server Error"
}
}
curl --location --request DELETE 'https://neodrive.my.id/api/v1/files' \
--header 'neodrive-api: 625092296266470295046fd6bd9c44a5' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=a4dc28ac-0ad8-4e6a-a025-204085fbafbf'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://neodrive.my.id/api/v1/files',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => 'id=a4dc28ac-0ad8-4e6a-a025-204085fbafbf',
CURLOPT_HTTPHEADER => array(
'neodrive-api: 625092296266470295046fd6bd9c44a5',
'Content-Type: application/x-www-form-urlencoded',curl --location --request DELETE 'http://localhost:8080/api/v1/files' \
--header 'neodrive-api: 625092296266470295046fd6bd9c44a5' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=a4dc28ac-0ad8-4e6a-a025-204085fbafbf'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var qs = require('qs');<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://neodrive.my.id/api/v1/files',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => 'id=a4dc28ac-0ad8-4e6a-a025-204085fbafbf',
CURLOPT_HTTPHEADER => array(
'neodrive-api: 625092296266470295046fd6bd9c44a5',
'Content-Type: application/x-www-form-urlencoded',
'Cookie: ci_session=p28mk06h8c9l84cglddglsko2qd673u9'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = qs.stringify({
'id': 'a4dc28ac-0ad8-4e6a-a025-204085fbafbf'
});
var config = {
method: 'delete',
url: 'http://localhost:8080/api/v1/files',
headers: {
'neodrive-api': '625092296266470295046fd6bd9c44a5',
'Content-Type': 'application/x-www-form-urlencoded', v
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
List Files
GET
https://neodrive.my.id/api/v1/files
List of your uploaded files.
Searching File URL example : https://neodrive.my.id/api/v1/files?q=MySearch
Goto pagination URL example : https://neodrive.my.id/api/v1/files?page=1
Query Parameters
Headers
{
"status": 200,
"items": [
{
"id": "d21ae110-8d4d-408d-a8f3-51bc7ee3d61a",
"name": "HTTP Injector.apk",
"url": "http://neodrive.my.id/f/d21ae110-8d4d-408d-a8f3-51bc7ee3d61a",
"driveid": "1ECxanAXnaZ0SwuGSUd2xd7vRYtz7Grf5",
"format": "apk",
"size": "50168768",
"md5": "fedabe11d8560364962d8dfd69b1cd8b",
"multiup": null,
"views": "0",
"downloads": "0"
}
],
"currentPage": 1,
"totalPage": 1
}
{
"status": 401,
"messages": {
"error": "Unauthorized"
}
}
{
"status": 500,
"messages": {
"error": "Internal Server Error"
}
}
curl --location --request GET 'https://neodrive.my.id/api/v1/files' \
--header 'neodrive-api: 625092296266470295046fd6bd9c44a5'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://neodrive.my.id/api/v1/files',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'neodrive-api: 625092296266470295046fd6bd9c44a5'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
});
var config = {
method: 'get',
url: 'https://neodrive.my.id/api/v1/files',
headers: {
'neodrive-api': '625092296266470295046fd6bd9c44a5'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Last updated