martinmulder/openapi-crowdstrike-falcon-php

使用此API规范作为参考,以使用与您的Falcon环境交互的API端点。这些端点支持通过OAuth2进行身份验证,并与检测和网络隔离进行交互。有关详细的使用指南和示例,请参阅我们的[在Falcon控制台中的文档](https://falcon.eu-1.crowdstrike.com/support/documentation)。

dev-master 2021-01-05 22:52 UTC

This package is auto-updated.

Last update: 2024-09-06 07:05:52 UTC


README

使用此API规范作为参考,以使用与您的Falcon环境交互的API端点。这些端点支持通过OAuth2进行身份验证,并与检测和网络隔离进行交互。有关详细的使用指南和示例,请参阅我们的[在Falcon控制台中的文档](https://falcon.eu-1.crowdstrike.com/support/documentation)。

要使用以下描述的API,请将基本URL与每个API端点的路径组合。对于商业云客户,您的基本URL是https://api.eu-1.crowdstrike.com

每个API端点都需要通过OAuth2令牌进行授权。您的第一个API请求应使用oauth2/token端点获取OAuth2令牌,例如https://api.eu-1.crowdstrike.com/oauth2/token。对于后续请求,请在HTTP授权头中包含OAuth2令牌。令牌在30分钟后过期,之后您应发出新的令牌请求以继续进行API请求。

安装和用法

要求

PHP 7.2及更高版本。

Composer

要通过Composer安装绑定,请在composer.json中添加以下内容

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/MartinMulder/openapi-crowdstrike-falcon-php.git"
    }
  ],
  "require": {
    "MartinMulder/openapi-crowdstrike-falcon-php": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

入门

请按照安装过程进行操作,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: oauth2
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\CloudConnectAwsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \OpenAPI\Client\Model\ModelsModifyAWSCustomerSettingsV1(); // \OpenAPI\Client\Model\ModelsModifyAWSCustomerSettingsV1

try {
    $result = $apiInstance->createOrUpdateAWSSettings($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CloudConnectAwsApi->createOrUpdateAWSSettings: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI均相对于https://api.eu-1.crowdstrike.com

模型

Authorization

basicAuth

  • 类型:HTTP基本认证

oauth2

  • 类型OAuth
  • 流程application
  • 授权URL: ``
  • 作用域:
    • cloud-connect-aws:read:授予对cloud-connect-aws资源的读取访问权限
    • cloud-connect-aws:write:授予对cloud-connect-aws资源的写入访问权限
    • cspm-registration:read:授予对cspm-registration资源的读取访问权限
    • cspm-registration:write:授予对cspm-registration资源的写入访问权限
    • custom-ioa:read:授予对custom-ioa资源的读取访问权限
    • custom-ioa:write:授予对custom-ioa资源的写入访问权限
    • d4c-registration:read:授予对d4c-registration资源的读取访问权限
    • d4c-registration:write:授予对d4c-registration资源的写入访问权限
    • detects:read:授予对detects资源的读取访问权限
    • detects:write:授予对detects资源的写入访问权限
    • device-control-policies:read:授予对device-control-policies资源的读取访问权限
    • device-control-policies:write:授予对device-control-policies资源的写入访问权限
    • devices:read:授予对devices资源的读取访问权限
    • devices:write:授予对devices资源的写入访问权限
    • falconx-actors:read:授予对falconx-actors资源的读取访问权限
    • falconx-indicators:read:授予对falconx-indicators资源的读取访问权限
    • falconx-reports:read:授予对falconx-reports资源的读取权限
    • falconx-rules:read:授予对falconx-rules资源的读取权限
    • firewall-management:read:授予对firewall-management资源的读取权限
    • firewall-management:write:授予对firewall-management资源的写入权限
    • host-group:read:授予对host-group资源的读取权限
    • host-group:write:授予对host-group资源的写入权限
    • incidents:read:授予对incidents资源的读取权限
    • incidents:write:授予对incidents资源的写入权限
    • installation-tokens:read:授予对installation-tokens资源的读取权限
    • installation-tokens:write:授予对installation-tokens资源的写入权限
    • iocs:read:授予对iocs资源的读取权限
    • iocs:write:授予对iocs资源的写入权限
    • ml-exclusions:read:授予对ml-exclusions资源的读取权限
    • ml-exclusions:write:授予对ml-exclusions资源的写入权限
    • prevention-policies:read:授予对prevention-policies资源的读取权限
    • prevention-policies:write:授予对prevention-policies资源的写入权限
    • real-time-response-admin:write:授予对real-time-response-admin资源的写入权限
    • real-time-response:read:授予对real-time-response资源的读取权限
    • real-time-response:write:授予对real-time-response资源的写入权限
    • self-service-ioa-exclusions:read:授予对self-service-ioa-exclusions资源的读取权限
    • self-service-ioa-exclusions:write:授予对self-service-ioa-exclusions资源的写入权限
    • sensor-installers:read:授予对sensor-installers资源的读取权限
    • sensor-update-policies:read:授予对sensor-update-policies资源的读取权限
    • sensor-update-policies:write:授予对sensor-update-policies资源的写入权限
    • sensor-visibility-exclusions:read:授予对sensor-visibility-exclusions资源的读取权限
    • sensor-visibility-exclusions:write:授予对sensor-visibility-exclusions资源的写入权限
    • spotlight-vulnerabilities:read:授予对spotlight-vulnerabilities资源的读取权限
    • streaming:read:授予对streaming资源的读取权限
    • usermgmt:read:授予对usermgmt资源的读取权限
    • usermgmt:write:授予对usermgmt资源的写入权限

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包的信息

此PHP包由OpenAPI Generator项目自动生成

  • API版本:1.0.0-beta
  • 构建包:org.openapitools.codegen.languages.PhpClientCodegen