Storage Monitoring 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 = '{
"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
{
"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 |
| » 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 = '{
"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
{
"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 |
| » 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
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| pageSize | query | string | false | none |
| pageIndex | query | string | false | none |
Example responses
200 Response
{
"monitors": [
{
"id": "11111111-1111-1111-1111-111111111111",
"resource": {
"siteId": "SharePoint test site id",
"siteName": "SharePoint test site",
"driveId": "SharePoint test drive id",
"driveName": "SharePoint test drive"
},
"policyName": "default",
"status": "started"
}
],
"pageLinks": {
"pages": 12,
"count": 120
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of all active SharePoint storage monitors | ListSharePointMonitorItem |
Create SharePoint storage monitors
Code samples
# You can also use wget
curl -X POST /api/storage-monitor/sharepoint/v1/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /api/storage-monitor/sharepoint/v1/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"rootId": "string",
"ids": [
"string"
],
"selectAll": true,
"policyName": "default"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/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/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/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/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("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/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/storage-monitor/sharepoint/v1/monitors
Create the selected SharePoint storage monitors with the specified policy
Body parameter
{
"rootId": "string",
"ids": [
"string"
],
"selectAll": true,
"policyName": "default"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | SharePointCreateMonitorsRequest | true | Required body specifying what SharePoint site and document libraries to create monitors for, and the policy to apply |
Example responses
200 Response
{
"issues": [
{
"id": "11111111-1111-1111-1111-111111111111",
"error": "monitor does not exist",
"resourceName": "test sharepoint site"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of any issues which occured during creation | BulkResponse |
Update existing SharePoint storage monitors
Code samples
# You can also use wget
curl -X PATCH /api/storage-monitor/sharepoint/v1/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PATCH /api/storage-monitor/sharepoint/v1/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true,
"patches": {
"status": "started",
"policyName": "default"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/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/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/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/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("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/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /api/storage-monitor/sharepoint/v1/monitors
Update existing SharePoint storage monitors
Body parameter
{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true,
"patches": {
"status": "started",
"policyName": "default"
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | PatchMonitorsRequest | true | Required body specifying new options to apply to the specified monitors |
Example responses
200 Response
{
"issues": [
{
"id": "11111111-1111-1111-1111-111111111111",
"error": "monitor does not exist",
"resourceName": "test sharepoint site"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | SharePoint monitor updated | BulkResponse |
Delete SharePoint storage monitors
Code samples
# You can also use wget
curl -X DELETE /api/storage-monitor/sharepoint/v1/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
DELETE /api/storage-monitor/sharepoint/v1/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/monitors',
{
method: 'DELETE',
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.delete '/api/storage-monitor/sharepoint/v1/monitors',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.delete('/api/storage-monitor/sharepoint/v1/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('DELETE','/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("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() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/api/storage-monitor/sharepoint/v1/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /api/storage-monitor/sharepoint/v1/monitors
Deletes the selected SharePoint storage monitors
Body parameter
{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | DeleteMonitorsRequest | true | Required body specifying what SharePoint storage monitors to delete |
Example responses
200 Response
{
"issues": [
{
"id": "11111111-1111-1111-1111-111111111111",
"error": "monitor does not exist",
"resourceName": "test sharepoint site"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of any issues which occured during deletion | BulkResponse |
Get the status of the SharePoint Storage Monitoring service
Code samples
# You can also use wget
curl -X GET /api/storage-monitor/sharepoint/v1/status \
-H 'Accept: application/json'
GET /api/storage-monitor/sharepoint/v1/status HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/api/storage-monitor/sharepoint/v1/status',
{
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/status',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/api/storage-monitor/sharepoint/v1/status', 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/status', 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/status");
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/status", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/storage-monitor/sharepoint/v1/status
Gets the status of the SharePoint Storage Monitoring service
Example responses
200 Response
{
"isHealthy": false,
"results": [
{
"check": "Webhook",
"isSuccess": false,
"reason": "Webhook is unreachable"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | The current status of the SharePoint Storage Monitoring service | GetStorageMonitorStatusResponse |
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 |
|---|---|---|---|---|
| search | query | string | false | none |
| 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 = '{
"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
{
"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 |
| » 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 = '{
"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
{
"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 |
| » 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
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| pageSize | query | string | false | none |
| pageIndex | query | string | false | none |
Example responses
200 Response
{
"monitors": [
{
"id": "11111111-1111-1111-1111-111111111111",
"resource": {
"userId": "OneDrive test user id",
"email": "testuser@test.com",
"driveId": "OneDrive test drive id",
"driveName": "OneDrive test drive"
},
"policyName": "default",
"status": "started"
}
],
"pageLinks": {
"pages": 12,
"count": 120
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of all active OneDrive storage monitors | ListOneDriveMonitorItem |
Create OneDrive storage monitors
Code samples
# You can also use wget
curl -X POST /api/storage-monitor/onedrive/v1/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /api/storage-monitor/onedrive/v1/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true,
"policyName": "default"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/onedrive/v1/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/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/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/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("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/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/storage-monitor/onedrive/v1/monitors
Create the selected OneDrive storage monitors with the specified policy
Body parameter
{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true,
"policyName": "default"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CreateMonitorsRequest | true | Required body specifying what OneDrive users to create monitors for, and the policy to apply |
Example responses
200 Response
{
"issues": [
{
"id": "11111111-1111-1111-1111-111111111111",
"error": "monitor does not exist",
"resourceName": "test sharepoint site"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of any issues which occured during creation | BulkResponse |
Edit OneDrive storage monitors
Code samples
# You can also use wget
curl -X PATCH /api/storage-monitor/onedrive/v1/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PATCH /api/storage-monitor/onedrive/v1/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true,
"patches": {
"status": "started",
"policyName": "default"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/onedrive/v1/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/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/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/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("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/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /api/storage-monitor/onedrive/v1/monitors
Edits the selected OneDrive storage monitors with the specified changes
Body parameter
{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true,
"patches": {
"status": "started",
"policyName": "default"
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | PatchMonitorsRequest | true | Required body specifying what OneDrive storage monitors to patch, and the changes to apply |
Example responses
200 Response
{
"issues": [
{
"id": "11111111-1111-1111-1111-111111111111",
"error": "monitor does not exist",
"resourceName": "test sharepoint site"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of any issues which occured during editing | BulkResponse |
Delete OneDrive storage monitors
Code samples
# You can also use wget
curl -X DELETE /api/storage-monitor/onedrive/v1/monitors \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
DELETE /api/storage-monitor/onedrive/v1/monitors HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/storage-monitor/onedrive/v1/monitors',
{
method: 'DELETE',
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.delete '/api/storage-monitor/onedrive/v1/monitors',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.delete('/api/storage-monitor/onedrive/v1/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('DELETE','/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("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() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/api/storage-monitor/onedrive/v1/monitors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /api/storage-monitor/onedrive/v1/monitors
Deletes the selected OneDrive storage monitors
Body parameter
{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | DeleteMonitorsRequest | true | Required body specifying what OneDrive storage monitors to delete |
Example responses
200 Response
{
"issues": [
{
"id": "11111111-1111-1111-1111-111111111111",
"error": "monitor does not exist",
"resourceName": "test sharepoint site"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of any issues which occured during deletion | BulkResponse |
Get the status of the OneDrive Storage Monitoring service
Code samples
# You can also use wget
curl -X GET /api/storage-monitor/onedrive/v1/status \
-H 'Accept: application/json'
GET /api/storage-monitor/onedrive/v1/status HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/api/storage-monitor/onedrive/v1/status',
{
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/status',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('/api/storage-monitor/onedrive/v1/status', 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/status', 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/status");
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/status", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/storage-monitor/onedrive/v1/status
Gets the status of the OneDrive Storage Monitoring service
Example responses
200 Response
{
"isHealthy": false,
"results": [
{
"check": "Webhook",
"isSuccess": false,
"reason": "Webhook is unreachable"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | The current status of the OneDrive Storage Monitoring service | GetStorageMonitorStatusResponse |
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
{
"monitors": [
{
"id": "11111111-1111-1111-1111-111111111111",
"resource": {
"siteId": "SharePoint test site id",
"siteName": "SharePoint test site",
"driveId": "SharePoint test drive id",
"driveName": "SharePoint test drive"
},
"policyName": "default",
"status": "started"
}
],
"pageLinks": {
"pages": 12,
"count": 120
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| monitors | [object] | false | none | none |
| » id | string(uuid) | false | none | Unique Identifier of the SharePoint monitor |
| » 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. |
| » status | string | false | none | Current status of the monitor |
| pageLinks | object | false | none | none |
| » pages | integer | false | none | Total amount of pages |
| » count | integer | false | none | Total count of monitors |
ListOneDriveMonitorItem
{
"monitors": [
{
"id": "11111111-1111-1111-1111-111111111111",
"resource": {
"userId": "OneDrive test user id",
"email": "testuser@test.com",
"driveId": "OneDrive test drive id",
"driveName": "OneDrive test drive"
},
"policyName": "default",
"status": "started"
}
],
"pageLinks": {
"pages": 12,
"count": 120
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| monitors | [object] | false | none | none |
| » id | string(uuid) | false | none | Unique Identifier of the OneDrive monitor |
| » 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. |
| » status | string | false | none | Current status of the monitor |
| pageLinks | object | false | none | none |
| » pages | integer | false | none | Total amount of pages |
| » count | integer | false | none | Total count of monitors |
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 |
PatchMonitorsRequest
{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true,
"patches": {
"status": "started",
"policyName": "default"
}
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ids | [string] | false | none | none |
| selectAll | boolean | false | none | Whether to select all active storage monitors or not. If true the ids argument can be used as an exclusion list, if false the ids argument will be an inclusion list. |
| patches | object | false | none | none |
| » status | string | false | none | Status to set for the specified monitors |
| » policyName | string | false | none | Policy to set for the specified monitors |
BulkResponse
{
"issues": [
{
"id": "11111111-1111-1111-1111-111111111111",
"error": "monitor does not exist",
"resourceName": "test sharepoint site"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| issues | [object] | false | none | none |
| » id | string(uuid) | false | none | Monitor id for monitor which failed |
| » error | string | false | none | Error reason for monitor which failed |
| » resourceName | string | false | none | Resource name for monitor which failed |
DeleteMonitorsRequest
{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ids | [string] | false | none | none |
| selectAll | boolean | false | none | Whether to select all active storage monitors or not. If true the ids argument can be used as an exclusion list, if false the ids argument will be an inclusion list. |
SharePointCreateMonitorsRequest
{
"rootId": "string",
"ids": [
"string"
],
"selectAll": true,
"policyName": "default"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| rootId | string | false | none | The Id of the SharePoint Site to create monitors for. |
| ids | [string] | false | none | none |
| selectAll | boolean | false | none | Whether to select all Document Libraries for the specified SharePoint Site or not. If true the ids argument can be used as an exclusion list, if false the ids argument will be an inclusion list. |
| policyName | string | false | none | Policy to apply for the created monitors |
CreateMonitorsRequest
{
"ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"selectAll": true,
"policyName": "default"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ids | [string] | false | none | none |
| selectAll | boolean | false | none | Whether to select all users or not. If true the ids argument can be used as an exclusion list, if false the ids argument will be an inclusion list. |
| policyName | string | false | none | Policy to apply for the created monitors |
GetStorageMonitorStatusResponse
{
"isHealthy": false,
"results": [
{
"check": "Webhook",
"isSuccess": false,
"reason": "Webhook is unreachable"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| isHealthy | boolean | false | none | Specifies whether the Storage Monitor is healthy |
| results | [object] | false | none | none |
| » check | string | false | none | The health check performed |
| » isSuccess | boolean | false | none | Whether the check was successful |
| » reason | string | false | none | The reason for the failure on the check |