获取 machineAction APIGet machineAction API

适用于:Microsoft Defender for EndpointApplies to: Microsoft Defender for Endpoint

备注

如果你是美国政府客户,请使用 Microsoft Defender for Endpoint 中针对美国政府客户的 URI。If you are a US Government customer, please use the URIs listed in Microsoft Defender for Endpoint for US Government customers.

提示

为了提高性能,可以使用距离地理位置更近的服务器:For better performance, you can use server closer to your geo location:

  • api-us.securitycenter.microsoft.comapi-us.securitycenter.microsoft.com
  • api-eu.securitycenter.microsoft.comapi-eu.securitycenter.microsoft.com
  • api-uk.securitycenter.microsoft.comapi-uk.securitycenter.microsoft.com

API 说明API description

按其 ID 检索 特定计算机操作。Retrieves specific Machine Action by its ID.

限制Limitations

  1. 此 API 的速率限制是每分钟 100 个调用和每小时 1500 个调用。Rate limitations for this API are 100 calls per minute and 1500 calls per hour.

权限Permissions

若要调用此 API,需要以下权限之一。One of the following permissions is required to call this API. 若要了解更多信息(包括如何选择权限),请参阅对 终结点 API 使用 DefenderTo learn more, including how to choose permissions, see Use Defender for Endpoint APIs

权限类型Permission type 权限Permission 权限显示名称Permission display name
应用程序Application Machine.Read.AllMachine.Read.All "读取所有计算机配置文件"'Read all machine profiles'
应用程序Application Machine.ReadWrite.AllMachine.ReadWrite.All "读取和写入所有计算机信息"'Read and write all machine information'
委派(工作或学校帐户)Delegated (work or school account) Machine.ReadMachine.Read "读取计算机信息"'Read machine information'
委派(工作或学校帐户)Delegated (work or school account) Machine.ReadWriteMachine.ReadWrite "读取和写入计算机信息"'Read and write machine information'

备注

使用用户凭据获取令牌时:When obtaining a token using user credentials:

  • 用户至少需要具有以下角色权限:"查看数据"权限 (有关详细信息,请参阅创建和管理) The user needs to have at least the following role permission: 'View Data' (See Create and manage roles for more information)

HTTP 请求HTTP request

GET https://api.securitycenter.microsoft.com/api/machineactions/{id}

请求标头Request headers

名称Name 类型Type 说明Description
AuthorizationAuthorization StringString Bearer {token}。Bearer {token}. 必需Required.

请求正文Request body

EmptyEmpty

响应Response

如果成功,此方法使用 Machine Action 实体返回 200 Ok 响应 代码。If successful, this method returns 200, Ok response code with a Machine Action entity. 如果未找到具有指定 ID 的机器操作实体 - 404 未找到。If machine action entity with the specified id was not found - 404 Not Found.

示例Example

请求Request

下面是一个请求示例。Here is an example of the request.

GET https://api.securitycenter.microsoft.com/api/machineactions/2e9da30d-27f6-4208-81f2-9cd3d67893ba

响应Response

下面是一个响应示例。Here is an example of the response.

HTTP/1.1 200 Ok
Content-type: application/json
{
    "@odata.context": "https://api.securitycenter.microsoft.com/api/$metadata#MachineActions/$entity",
    "id": "5382f7ea-7557-4ab7-9782-d50480024a4e",
    "type": "Isolate",
    "scope": "Selective",
    "requestor": "Analyst@TestPrd.onmicrosoft.com",
    "requestorComment": "test for docs",
    "status": "Succeeded",
    "machineId": "7b1f4967d9728e5aa3c06a9e617a22a4a5a17378",
    "computerDnsName": "desktop-test",
    "creationDateTimeUtc": "2019-01-02T14:39:38.2262283Z",
    "lastUpdateDateTimeUtc": "2019-01-02T14:40:44.6596267Z",
    "relatedFileInfo": null
}