Preview Feature: Storage Monitor Api v1.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Authentication
-
HTTP Authentication, scheme: Basic
-
HTTP Authentication, scheme: Bearer
SharePoint Monitoring
API endpoints to manage and view information for SharePoint monitoring
List SharePoint sites
Code samples
# You can also use wget
curl -X GET /api/storage-monitor/sharepoint/v1/sites \
-H 'Accept: application/json'
GET /api/storage-monitor/sharepoint/v1/sites HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/sites',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/api/storage-monitor/sharepoint/v1/sites',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/api/storage-monitor/sharepoint/v1/sites', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/storage-monitor/sharepoint/v1/sites', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/sharepoint/v1/sites");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/storage-monitor/sharepoint/v1/sites", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/storage-monitor/sharepoint/v1/sites
Lists SharePoint sites
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
skipToken | query | string | false | none |
Example responses
200 Response
{
"sites": [
{
"id": "string",
"displayName": "string"
}
],
"skipToken": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | ListSitesResponse |
List SharePoint drives
Code samples
# You can also use wget
curl -X GET /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives \
-H 'Accept: application/json'
GET /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives
Lists SharePoint drives
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
siteId | path | string | true | none |
skipToken | query | string | false | none |
Example responses
200 Response
[
{
"drives": [
{
"id": "string",
"name": "string"
}
],
"skipToken": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ListDrivesResponse] | false | none | none |
» drives | [object] | false | none | none |
»» id | string | false | none | Identifier for the SharePoint drive |
»» name | string | false | none | Name of the SharePoint drive |
» skipToken | string | false | none | Skip token used to fetch next page of data |
Create a new SharePoint storage monitor
Code samples
# You can also use wget
curl -X POST /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"replaceErrorsWithReports": false,
"policyName": "default"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post '/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors
Creates a new SharePoint storage monitor
Body parameter
{
"replaceErrorsWithReports": false,
"policyName": "default"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
siteId | path | string | true | none |
driveId | path | string | true | none |
body | body | object | false | Optional body to specify extra options when creating a monitor |
» replaceErrorsWithReports | body | boolean | false | Whether the storage monitor should replace any files that failed to rebuild with an error report. Default is false which results in the system leaving the original file in storage if it fails to rebuild |
» policyName | body | string | false | The name of the content management policy to apply when rebuilding files from the monitored drive. By default, the “default” content management policy is used. |
Example responses
201 Response
{
"id": "11111111-1111-1111-1111-111111111111"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | SharePoint monitor created | CreateMonitorResponse |
409 | Conflict | Conflict when creating storage monitor | None |
Update an existing SharePoint storage monitor
Code samples
# You can also use wget
curl -X PATCH /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PATCH /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"replaceErrorsWithReports": null,
"policyName": "default"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.patch '/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.patch('/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PATCH','/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors
Updates an existing SharePoint storage monitor
Body parameter
{
"replaceErrorsWithReports": null,
"policyName": "default"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
siteId | path | string | true | none |
driveId | path | string | true | none |
body | body | object | false | Required body specifying new options to apply to the existing monitor |
» replaceErrorsWithReports | body | boolean | false | Whether the storage monitor should replace any files that failed to rebuild with an error report. If not defined the flag will be left unchanged |
» policyName | body | string | false | The name of the content management policy to apply when rebuilding files from the monitored drive. |
Example responses
200 Response
{
"id": "11111111-1111-1111-1111-111111111111"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SharePoint monitor updated | CreateMonitorResponse |
404 | Not Found | SharePoint storage monitor was not found | None |
Delete the active SharePoint storage monitor
Code samples
# You can also use wget
curl -X DELETE /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors
DELETE /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors HTTP/1.1
fetch('/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete '/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /api/storage-monitor/sharepoint/v1/sites/{siteId}/drives/{driveId}/monitors
Deletes the active SharePoint storage monitor
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
siteId | path | string | true | none |
driveId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SharePoint storage monitor deleted | None |
404 | Not Found | SharePoint storage monitor was not found | None |
List active SharePoint storage monitors
Code samples
# You can also use wget
curl -X GET /api/storage-monitor/sharepoint/v1/monitors \
-H 'Accept: application/json'
GET /api/storage-monitor/sharepoint/v1/monitors HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/monitors',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/api/storage-monitor/sharepoint/v1/monitors',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/api/storage-monitor/sharepoint/v1/monitors', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/storage-monitor/sharepoint/v1/monitors', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/sharepoint/v1/monitors");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/storage-monitor/sharepoint/v1/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/storage-monitor/sharepoint/v1/monitors
Lists the active SharePoint storage monitors
Example responses
200 Response
[
{
"resource": {
"siteId": "SharePoint test site id",
"siteName": "SharePoint test site",
"driveId": "SharePoint test drive id",
"driveName": "SharePoint test drive"
},
"policyName": "default",
"replaceErrorsWithReports": false
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of all active SharePoint storage monitors | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ListSharePointMonitorItem] | false | none | none |
» resource | object | false | none | none |
»» siteId | string(uuid) | false | none | Unique Identifier of the SharePoint site being monitored |
»» siteName | string | false | none | Name of the SharePoint site being monitored |
»» driveId | string | false | none | Unique Identifier of the SharePoint drive being monitored |
»» driveName | string | false | none | Name of the SharePoint drive being monitored |
» policyName | string | false | none | The name of the content management policy which will be applied when rebuilding files from the monitored drive. |
» replaceErrorsWithReports | boolean | false | none | Whether the storage monitor is replacing any files that fail to rebuild with error reports. |
OneDrive Monitoring
API endpoints to manage and view information for OneDrive monitoring
List OneDrive users
Code samples
# You can also use wget
curl -X GET /api/storage-monitor/onedrive/v1/users \
-H 'Accept: application/json'
GET /api/storage-monitor/onedrive/v1/users HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/api/storage-monitor/onedrive/v1/users',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/api/storage-monitor/onedrive/v1/users',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/api/storage-monitor/onedrive/v1/users', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/storage-monitor/onedrive/v1/users', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/onedrive/v1/users");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/storage-monitor/onedrive/v1/users", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/storage-monitor/onedrive/v1/users
Lists OneDrive users
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
skipToken | query | string | false | none |
Example responses
200 Response
[
{
"users": [
{
"id": "string",
"email": "string"
}
],
"skipToken": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ListUsersResponse] | false | none | none |
» users | [object] | false | none | none |
»» id | string | false | none | Identifier for the OneDrive user |
string | false | none | Email of the OneDrive user | |
» skipToken | string | false | none | Skip token used to fetch next page of data |
Create a new OneDrive storage monitor
Code samples
# You can also use wget
curl -X POST /api/storage-monitor/onedrive/v1/users/{userId}/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /api/storage-monitor/onedrive/v1/users/{userId}/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"replaceErrorsWithReports": false,
"policyName": "default"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/onedrive/v1/users/{userId}/monitors',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post '/api/storage-monitor/onedrive/v1/users/{userId}/monitors',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('/api/storage-monitor/onedrive/v1/users/{userId}/monitors', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/storage-monitor/onedrive/v1/users/{userId}/monitors', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/onedrive/v1/users/{userId}/monitors");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/storage-monitor/onedrive/v1/users/{userId}/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/storage-monitor/onedrive/v1/users/{userId}/monitors
Creates a new OneDrive storage monitor
Body parameter
{
"replaceErrorsWithReports": false,
"policyName": "default"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userId | path | string | true | none |
body | body | object | false | Optional body to specify extra options when creating a monitor |
» replaceErrorsWithReports | body | boolean | false | Whether the storage monitor should replace any files that failed to rebuild with an error report. Default is false which results in the system leaving the original file in storage if it fails to rebuild |
» policyName | body | string | false | The name of the content management policy to apply when rebuilding files from the monitored drive. By default, the “default” content management policy is used. |
Example responses
201 Response
{
"id": "11111111-1111-1111-1111-111111111111"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | OneDrive monitor created | CreateMonitorResponse |
409 | Conflict | Conflict when creating storage monitor | None |
Update an existing OneDrive storage monitor
Code samples
# You can also use wget
curl -X PATCH /api/storage-monitor/onedrive/v1/users/{userId}/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PATCH /api/storage-monitor/onedrive/v1/users/{userId}/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"replaceErrorsWithReports": null,
"policyName": "default"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/onedrive/v1/users/{userId}/monitors',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.patch '/api/storage-monitor/onedrive/v1/users/{userId}/monitors',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.patch('/api/storage-monitor/onedrive/v1/users/{userId}/monitors', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PATCH','/api/storage-monitor/onedrive/v1/users/{userId}/monitors', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/onedrive/v1/users/{userId}/monitors");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "/api/storage-monitor/onedrive/v1/users/{userId}/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /api/storage-monitor/onedrive/v1/users/{userId}/monitors
Updates an existing OneDrive storage monitor
Body parameter
{
"replaceErrorsWithReports": null,
"policyName": "default"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userId | path | string | true | none |
body | body | object | true | Required body specifying new options to apply to the existing monitor |
» replaceErrorsWithReports | body | boolean | false | Whether the storage monitor should replace any files that failed to rebuild with an error report. If not defined the flag will be left unchanged |
» policyName | body | string | false | The name of the content management policy to apply when rebuilding files from the monitored drive. |
Example responses
200 Response
{
"id": "11111111-1111-1111-1111-111111111111"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OneDrive monitor updated | CreateMonitorResponse |
404 | Not Found | OneDrive storage monitor was not found | None |
Delete the active OneDrive storage monitor
Code samples
# You can also use wget
curl -X DELETE /api/storage-monitor/onedrive/v1/users/{userId}/monitors
DELETE /api/storage-monitor/onedrive/v1/users/{userId}/monitors HTTP/1.1
fetch('/api/storage-monitor/onedrive/v1/users/{userId}/monitors',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete '/api/storage-monitor/onedrive/v1/users/{userId}/monitors',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('/api/storage-monitor/onedrive/v1/users/{userId}/monitors')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/storage-monitor/onedrive/v1/users/{userId}/monitors', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/onedrive/v1/users/{userId}/monitors");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/api/storage-monitor/onedrive/v1/users/{userId}/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /api/storage-monitor/onedrive/v1/users/{userId}/monitors
Deletes the active OneDrive storage monitor
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OneDrive storage monitor deleted | None |
404 | Not Found | OneDrive storage monitor was not found | None |
List active OneDrive storage monitors
Code samples
# You can also use wget
curl -X GET /api/storage-monitor/onedrive/v1/monitors \
-H 'Accept: application/json'
GET /api/storage-monitor/onedrive/v1/monitors HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/api/storage-monitor/onedrive/v1/monitors',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get '/api/storage-monitor/onedrive/v1/monitors',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/api/storage-monitor/onedrive/v1/monitors', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/storage-monitor/onedrive/v1/monitors', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/storage-monitor/onedrive/v1/monitors");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/storage-monitor/onedrive/v1/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/storage-monitor/onedrive/v1/monitors
Lists the active OneDrive storage monitors
Example responses
200 Response
[
{
"resource": {
"userId": "OneDrive test user id",
"email": "testuser@test.com",
"driveId": "OneDrive test drive id",
"driveName": "OneDrive test drive"
},
"policyName": "default",
"replaceErrorsWithReports": false
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of all active OneDrive storage monitors | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ListOneDriveMonitorItem] | false | none | none |
» resource | object | false | none | none |
»» userId | string(uuid) | false | none | Unique Identifier of the OneDrive user being monitored |
string | false | none | Email of the OneDrive user being monitored | |
»» driveId | string | false | none | Unique Identifier of the OneDrive drive being monitored |
»» driveName | string | false | none | Name of the OneDrive drive being monitored |
» policyName | string | false | none | The name of the content management policy which will be applied when rebuilding files from the monitored drive. |
» replaceErrorsWithReports | boolean | false | none | Whether the storage monitor is replacing any files that fail to rebuild with error reports. |
Schemas
CreateMonitorResponse
{
"id": "11111111-1111-1111-1111-111111111111"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | Unique Identifier for the created monitor |
ListSharePointMonitorItem
{
"resource": {
"siteId": "SharePoint test site id",
"siteName": "SharePoint test site",
"driveId": "SharePoint test drive id",
"driveName": "SharePoint test drive"
},
"policyName": "default",
"replaceErrorsWithReports": false
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
resource | object | false | none | none |
» siteId | string(uuid) | false | none | Unique Identifier of the SharePoint site being monitored |
» siteName | string | false | none | Name of the SharePoint site being monitored |
» driveId | string | false | none | Unique Identifier of the SharePoint drive being monitored |
» driveName | string | false | none | Name of the SharePoint drive being monitored |
policyName | string | false | none | The name of the content management policy which will be applied when rebuilding files from the monitored drive. |
replaceErrorsWithReports | boolean | false | none | Whether the storage monitor is replacing any files that fail to rebuild with error reports. |
ListOneDriveMonitorItem
{
"resource": {
"userId": "OneDrive test user id",
"email": "testuser@test.com",
"driveId": "OneDrive test drive id",
"driveName": "OneDrive test drive"
},
"policyName": "default",
"replaceErrorsWithReports": false
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
resource | object | false | none | none |
» userId | string(uuid) | false | none | Unique Identifier of the OneDrive user being monitored |
string | false | none | Email of the OneDrive user being monitored | |
» driveId | string | false | none | Unique Identifier of the OneDrive drive being monitored |
» driveName | string | false | none | Name of the OneDrive drive being monitored |
policyName | string | false | none | The name of the content management policy which will be applied when rebuilding files from the monitored drive. |
replaceErrorsWithReports | boolean | false | none | Whether the storage monitor is replacing any files that fail to rebuild with error reports. |
ListSitesResponse
{
"sites": [
{
"id": "string",
"displayName": "string"
}
],
"skipToken": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
sites | [object] | false | none | none |
» id | string | false | none | Identifier for the SharePoint site |
» displayName | string | false | none | Display name of the SharePoint site |
skipToken | string | false | none | Skip token used to fetch next page of data |
ListDrivesResponse
{
"drives": [
{
"id": "string",
"name": "string"
}
],
"skipToken": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
drives | [object] | false | none | none |
» id | string | false | none | Identifier for the SharePoint drive |
» name | string | false | none | Name of the SharePoint drive |
skipToken | string | false | none | Skip token used to fetch next page of data |
ListUsersResponse
{
"users": [
{
"id": "string",
"email": "string"
}
],
"skipToken": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
users | [object] | false | none | none |
» id | string | false | none | Identifier for the OneDrive user |
string | false | none | Email of the OneDrive user | |
skipToken | string | false | none | Skip token used to fetch next page of data |