Перечисление siteProtectionUnits
Пространство имен: microsoft.graph
Получите список объектов siteProtectionUnit , связанных с sharePointProtectionPolicy.
Этот API доступен в следующих национальных облачных развертываниях.
Глобальная служба | Правительство США L4 | Правительство США L5 (DOD) | Китай управляется 21Vianet |
---|---|---|---|
✅ | ❌ | ❌ | ❌ |
Разрешения
Выберите разрешение или разрешения, помеченные как наименее привилегированные для этого API. Используйте более привилегированное разрешение или разрешения только в том случае, если это требуется приложению. Дополнительные сведения о делегированных разрешениях и разрешениях приложений см. в разделе Типы разрешений. Дополнительные сведения об этих разрешениях см. в справочнике по разрешениям.
Тип разрешения | Разрешения с наименьшими привилегиями | Более высокие привилегированные разрешения |
---|---|---|
Делегированные (рабочая или учебная учетная запись) | BackupRestore-Configuration.Read.All | Недоступно. |
Делегированные (личная учетная запись Майкрософт) | Не поддерживается. | Не поддерживается. |
Приложение | BackupRestore-Configuration.Read.All | Недоступно. |
HTTP-запрос
GET /solutions/backupRestore/protectionUnits/microsoft.graph.siteProtectionUnit
GET /solutions/backupRestore/sharePointProtectionPolicies/{sharePointProtectionPolicyId}/siteProtectionUnits
Заголовки запросов
Имя | Описание |
---|---|
Авторизация | Bearer {token}. Обязательно. Дополнительные сведения о проверке подлинности и авторизации. |
Текст запроса
Не указывайте текст запроса для этого метода.
Отклик
В случае успешного выполнения этот метод возвращает код отклика 200 OK
и siteProtectionUnit в тексте ответа.
Список возможных ответов на ошибки см. в разделе Ответы на ошибки API хранилища резервных копий.
Примеры
Пример 1. Вывод списка всех siteProtectionUnits в клиенте
В следующем примере показано, как получить список всех объектов siteProtectionUnits в клиенте.
Запрос
Ниже показан пример запроса.
GET https://graph.microsoft.com/v1.0/solutions/backupRestore/protectionUnits/microsoft.graph.siteProtectionUnit
Отклик
Ниже показан пример отклика.
HTTP/1.1 200 OK
{
"@odata.nextLink": "https://graph.microsoft.com/v1.0/solutions/backupRestore/protectionUnits/microsoft.graph.siteProtectionUnit?$skiptoken=M2UyZDAwMDAwMDMxMzkzYTMyNjQ2MTM0NjMzMjM5NjYzNjY0MzczMDM0MzE2NTYzNjEzNzMwNjIzNjMzMzg2MjM0MzM2NDM0MzUzNDMzMzc0MDc0Njg3MjY1NjE2NDJlNzYzMjAxZThmYjY4M2Y3ODAxMDAwMDg4NjA5ODdhNzgwMTAwMDB8MTYxNjk2NDUwOTgzMg%3d%3d",
"value": [
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "2b014d8c-71fe-4d00-a01a-31850bc5b32c",
"siteId": "contoso.sharepoint.com,da60e844-ba1d-49bc-b4d4-d5e36bae9019,712a596e-90a1-49e3-9b48-bfa80bee4532",
"siteName": "Enhanced Restore IDC", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/ERIDC", // Newly Added
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"status": "unprotected",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "8f014d8c-71fe-4d00-a01a-31850bc5b32c",
"siteId": "contoso.sharepoint.com,da60e844-ba1d-49bc-b4d4-d5e36bae9019,712a596e-90a1-49e3-9b48-bfa80bee5674",
"siteName": "Enhanced Restore IDC - 1", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/ERIDCOne", // Newly Added
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"status": "unprotectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "9b014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"siteId": "contoso-jpn.sharepoint.com,da60e844-ba1d-49bc-b4d4-d5e36bae9019,0271110f-634f-4300-a841-3a8a2e8517765",
"siteName": "Enhanced Restore IDC - 2", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/ERIDCTwo", // Newly Added
"status": "protected",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "9b014d8c-71fe-4d00-a01a-31850bc5b32c",
"siteId": "contoso-jpn.sharepoint.com,da60e844-ba1d-49bc-b4d4-d5e36bae9019,0271110f-634f-4300-a841-3a8a2e850987",
"siteName": "Enhanced Restore IDC - 3", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/ERIDCThree", // Newly Added
"status": "unprotected",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "9b014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"siteId": "contoso-jpn.sharepoint.com,da60e844-ba1d-49bc-b4d4-d5e36bae9019,1111110f-634f-4300-a841-3a8a2e851851",
"siteName": "Who+", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/Whoplus", // Newly Added
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
}
]
}
Пример 2. Перечисление siteProtectionUnits, связанного с политикой защиты SharePoint
В следующем примере показано, как вывести список всех siteProtectionUnits, связанных с sharePointProtectionPolicy.
Запрос
Ниже показан пример запроса.
GET https://graph.microsoft.com/v1.0/solutions/backupRestore/sharePointProtectionPolicies/845457dc-4bb2-4815-bef3-8628ebd1952e/siteProtectionUnits
Отклик
Ниже приводится пример отклика.
HTTP/1.1 200 OK
{
"@odata.id": "/solutions/backupRestore/ProtectionPolicies(845457dc-4bb2-4815-bef3-8628ebd1952e)",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/solutions/backupRestore/sharePointProtectionPolicies/845457dc-4bb2-4815-bef3-8628ebd1952e/siteProtectionUnits?&$skiptoken=M2UyZDAwMDAwMDMxMzkzYTMyNjQ2MTM0NjMzMjM5NjYzNjY0MzczMDM0MzE2NTYzNjEzNzMwNjIzNjMzMzg2MjM0MzM2NDM0MzUzNDMzMzc0MDc0Njg3MjY1NjE2NDJlNzYzMjAxZThmYjY4M2Y3ODAxMDAwMDg4NjA5ODdhNzgwMTAwMDB8MTYxNjk2NDUwOTgzMg%3d%3d",
"value": [
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "2b014d8c-71fe-4d00-a01a-31850bc5b32c",
"siteId": "contoso.sharepoint.com,fd1a778f-263e-4c43-acdf-d5c2519d80eb,c06016db-dfec-4f79-83a1-09c6dbfd7088",
"siteName": "Who+", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/Whoplus", // Newly Added
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "57014d8c-71fe-4d00-a01a-31850bc5b32c",
"siteId": "contoso.sharepoint.com,fd1a778f-263e-4c43-acdf-d5c2519d80eb,c06016db-dfec-4f79-83a1-09c6dbfd9876",
"siteName": "Enhanced Restore IDC", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/ERIDC", // Newly Added
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "17014d8c-71fe-4d00-a01a-31850bc5b32c",
"siteId": "contoso.sharepoint.com,fd1a778f-263e-4c43-acdf-d5c2519d80eb,c06016db-dfec-4f79-83a1-09c6dbfd0087",
"siteName": "Enhanced Restore IDC - 1", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/ERIDCOne", // Newly Added
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "8f014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"siteId": "contoso.sharepoint.com,fd1a778f-263e-4c43-acdf-d5c2519d80eb,c06016db-dfec-4f79-83a1-09c6dbfd5432",
"siteName": "Enhanced Restore IDC - 2", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/ERIDCTwo", // Newly Added
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "9b014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"siteId": "contoso.sharepoint.com,fd1a778f-263e-4c43-acdf-d5c2519d80eb,c06016db-dfec-4f79-83a1-09c6dbfd8765",
"siteName": "Enhanced Restore IDC - 3", // Newly Added
"siteWebUrl": "https://contoso.sharepoint.com/teams/ERIDCThree", // Newly Added
"status": "protected",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "[email protected]",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
}
]
}