> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.jp/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve security history

> [セキュリティーアクティビティー]（https://knowledge.hubspot.com/account-management/view-and-export-account-activity-history#security-activity-history）に関連するユーザーアクションのログを取得します。

export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

export const SupportedProducts = ({marketing, sales, service, cms, marketingLevel, salesLevel, serviceLevel, cmsLevel}) => {
  const translations = {
    header: "サポートされる製品",
    description: "次のいずれかの製品またはそれ以上が必要です。",
    productNames: {
      marketing: "Marketing Hub",
      sales: "Sales Hub",
      service: "Service Hub",
      cms: "Content Hub"
    },
    tiers: {
      free: "無料ツール",
      starter: "Starter",
      professional: "Professional",
      enterprise: "Enterprise"
    }
  };
  const translateTier = tier => {
    if (!tier) return '';
    const lowerTier = tier.toLowerCase();
    return translations.tiers[lowerTier] || tier;
  };
  const products = [{
    name: marketing ? translations.productNames.marketing : '',
    level: translateTier(marketingLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/marketing-bolt.svg",
    alt: "Marketing Hub"
  }, {
    name: sales ? translations.productNames.sales : '',
    level: translateTier(salesLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/sales-star.svg",
    alt: "Sales Hub"
  }, {
    name: service ? translations.productNames.service : '',
    level: translateTier(serviceLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/service-heart.svg",
    alt: "Service Hub"
  }, {
    name: cms ? translations.productNames.cms : '',
    level: translateTier(cmsLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/content-play.svg",
    alt: "Content Hub"
  }].filter(product => product.name && product.level);
  if (products.length === 0) return null;
  return <div>
      <div className="text-sm mb-2">{translations.description}</div>
      <div className={`grid ${products.length === 1 ? 'grid-cols-1' : 'grid-cols-2'} gap-1.5`}>
        {products.map((product, index) => <div key={index} style={{
    display: 'flex',
    alignItems: 'center'
  }}>
            <img src={product.icon} alt={product.alt} className="w-3.5 h-3.5 mr-1.5 mt-2.5 mb-2.5 flex-shrink-0 align-middle" />
            <span className="font-medium mr-1 text-sm">{product.name} -</span>
            <span className="text-sm">{product.level}</span>
          </div>)}
      </div>
    </div>;
};

<AccordionGroup>
  <Accordion title="Supported products" defaultOpen="true" icon="cubes">
    <SupportedProducts marketing={true} sales={true} service={true} cms={true} marketingLevel="FREE" salesLevel="FREE" serviceLevel="FREE" cmsLevel="FREE" />
  </Accordion>

  <Accordion title="Required Scopes" icon="key">
    <ScopesList
      scopes={[
  'account-info.security.read'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/legacy/v3/account-audit-logs-v3.json GET /account-info/v3/activity/security
openapi: 3.0.1
info:
  title: 監査ログ
  description: Get information about a HubSpot account and its API usage.
  version: v3
  x-hubspot-product-tier-requirements:
    marketing: FREE
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
  x-hubspot-api-use-case: >-
    コンプライアンスチーム向けの内部ツールを構築し、HubSpotアカウントのデータにアクセスする社内の従業員のアクティビティーを定期的にモニタリングしたいと考えています。
  x-hubspot-related-documentation:
    - name: Account activity API guide
      url: >-
        https://developers.hubspot.com/docs/guides/api/settings/account-activity-api
  x-hubspot-introduction: アカウントアクティビティーAPIを使用すれば、HubSpotアカウントのログイン履歴やセキュリティーアクティビティーを取得できます。
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Basic
paths:
  /account-info/v3/activity/security:
    get:
      tags:
        - Basic
      summary: セキュリティー履歴を取得
      description: >-
        [セキュリティーアクティビティー]（https://knowledge.hubspot.com/account-management/view-and-export-account-activity-history#security-activity-history）に関連するユーザーアクションのログを取得します。
      operationId: get-/account-info/v3/activity/security
      parameters:
        - name: after
          in: query
          description: >-
            次の結果のセットを取得するためのカーソルトークン値。これはその他の結果が含まれるページ付けされたレスポンスの「paging.next.after」JSONプロパティーから取得できます。
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: fromTimestamp
          in: query
          description: このエポックタイムスタンプ以降に作成されたアクティビティーに制限します。
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int64
        - name: limit
          in: query
          description: ページごとに表示する結果の最大数。最大値は200です。
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: toTimestamp
          in: query
          description: このエポックタイムスタンプより前に作成されたアクティビティーに制限します。
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int64
        - name: userId
          in: query
          description: アクティビティーを取得するユーザーのID
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CollectionResponseHydratedCriticalActionForwardPaging
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - account-info.security.read
components:
  schemas:
    CollectionResponseHydratedCriticalActionForwardPaging:
      required:
        - results
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/ForwardPaging'
        results:
          type: array
          items:
            $ref: '#/components/schemas/HydratedCriticalAction'
    ForwardPaging:
      type: object
      properties:
        next:
          $ref: '#/components/schemas/NextPage'
    HydratedCriticalAction:
      required:
        - createdAt
        - id
        - type
        - userId
      type: object
      properties:
        actingUser:
          type: string
          description: アクティビティーに関連付けられたユーザーのEメールアドレス。
        countryCode:
          type: string
          description: おおよその国コード
        createdAt:
          type: string
          description: アクティビティーが行われた時刻。
          format: date-time
        id:
          type: string
          description: アクティビティーの固有ID。
        infoUrl:
          type: string
          description: アカウント上でアクションが行われたURLのリンク。
        ipAddress:
          type: string
          description: アクティビティーが発生したIPアドレス。
        location:
          type: string
          description: アクティビティーが行われたおおよその場所。
        objectId:
          type: string
          description: 影響を受けたオブジェクトのID。
        regionCode:
          type: string
          description: おおよその地域コード
        type:
          type: string
          description: アクティビティーのタイプ。
          enum:
            - ACCEPTANCE_TEST
            - ACCOUNT_ADDED_TO_MULTI_ACCOUNT_ORGANIZATION
            - ACCOUNT_REMOVED_FROM_MULTI_ACCOUNT_ORGANIZATION
            - ADD_ADMIN_PERMISSIONS
            - ADD_ADMIN_USER
            - ADD_SINGLE_SIGN_ON
            - ADD_TWO_FACTOR_AUTHENTICATION
            - ADD_USER
            - ADD_WEBHOOK_IN_WORKFLOW
            - ALLOWED_GEOLOCATIONS_DISABLED
            - ALLOWED_GEOLOCATIONS_ENABLED
            - ALLOWED_LOGIN_METHODS_DELETE
            - ALLOWED_LOGIN_METHODS_UPDATE
            - ATTACHMENT_LOGGING_DISABLED
            - ATTACHMENT_LOGGING_ENABLED
            - AUTOMATED_INACTIVE_USER_DEACTIVATION_DISABLED
            - AUTOMATED_INACTIVE_USER_DEACTIVATION_ENABLED
            - BOTS_WEBHOOK_POST
            - BOTS_WEBHOOK_UPDATE
            - BOTS_WEBHOOK_VIEWED
            - BULK_EMAIL_DOMAIN_CHANGE
            - CHANGE_AD_EVENT_CONSENT_SETTING
            - CHANGE_AD_EVENT_DATA_SHARING_SETTING
            - CHANGE_PASSWORD
            - CONTACT_DATA_EXPORT
            - DATA_ACCESS_REQUEST_SUBMITTED
            - DATA_BACKUP_CREATED
            - DATA_BACKUP_DOWNLOADED
            - DATA_BACKUP_SCHEDULE_CREATED
            - DATA_BACKUP_SCHEDULE_DELETED
            - DATA_BACKUP_SCHEDULE_UPDATED
            - DATA_RESTORE_COMPLETED
            - DATA_SHARING_CONNECTION_ADDED
            - DATA_SHARING_CONNECTION_REMOVED
            - DATASET_SYNC
            - DEACTIVATE_USER
            - DOMAIN_BASED_INVITE_CREATED
            - DOMAIN_BASED_INVITE_REMOVED
            - DOMAIN_BASED_INVITES_DISABLED
            - DOMAIN_BASED_INVITES_ENABLED
            - EMAIL_LOGGING_SYNC_SET_ALL
            - EMAIL_LOGGING_SYNC_SET_CONTACTS
            - EMAIL_LOGGING_SYNC_SET_REPLIES
            - EMAIL_TRACKING_DISABLED
            - EMAIL_TRACKING_ENABLED
            - EXPORT
            - EXPORT_APPROVAL
            - EXPORT_DOWNLOAD
            - EXPORT_USERS
            - FORM_SUBMISSIONS_EXPORT
            - GDPR_DELETE
            - GDPR_TOGGLE_DISABLED
            - GDPR_TOGGLE_ENABLED
            - HAPIKEY_CREATE
            - HAPIKEY_DEACTIVATE
            - HAPIKEY_VIEW
            - HUBSPOT_EMPLOYEE_ACCESS_DISABLED
            - HUBSPOT_EMPLOYEE_ACCESS_ENABLED
            - IMPERSONATE_USER
            - IMPORT
            - INSTALL_INTEGRATION
            - IP_RESTRICTIONS_DISABLED
            - IP_RESTRICTIONS_ENABLED
            - JOINED_PORTAL_VIA_DOMAIN_BASED_INVITE
            - LEGAL_BASIS_REQUIREMENT_DISABLED
            - LEGAL_BASIS_REQUIREMENT_ENABLED
            - MANUAL_PASSWORD_RESET_EMAIL_SEND
            - MANUAL_REGISTRATION_EMAIL_SEND
            - MARKETING_CONTACTS_APP_SETTINGS_DISABLED
            - MARKETING_CONTACTS_APP_SETTINGS_ENABLED
            - MERGE_REVERT
            - MODIFY_WEBHOOK_IN_WORKFLOW
            - MULTI_ACCOUNT_REPORTING_CONNECTION_ADDED
            - MULTI_ACCOUNT_REPORTING_CONNECTION_REMOVED
            - MULTI_ACCOUNT_WORKFLOWS_CONNECTION_ADDED
            - MULTI_ACCOUNT_WORKFLOWS_CONNECTION_REMOVED
            - NEVER_LOG_FOR_PORTAL_ADDITION
            - NEVER_LOG_FOR_PORTAL_DELETION
            - NEVER_LOG_FOR_USER_ADDITION
            - NEVER_LOG_FOR_USER_DELETION
            - PASSKEY_ADDED
            - PASSKEY_DELETED
            - PAYMENT_ACCOUNT_CREATION
            - PAYMENT_ACCOUNT_INFO_UPDATE
            - PAYMENT_BANK_ACCOUNT_CHANGE
            - PAYMENT_ONBOARDING_LINK_SEND
            - PERSONAL_ACCESS_KEY_CREATE
            - PERSONAL_ACCESS_KEY_DEACTIVATE
            - PERSONAL_ACCESS_KEY_ROTATE
            - PERSONAL_ACCESS_KEY_VIEW
            - PRIVATE_APP_ACCESS_TOKEN_CREATE
            - PRIVATE_APP_ACCESS_TOKEN_DEACTIVATE
            - PRIVATE_APP_ACCESS_TOKEN_ROTATE
            - PRIVATE_APP_ACCESS_TOKEN_VIEW
            - PRIVATE_APP_CLIENT_SECRET_VIEW
            - PRIVATE_APP_CLIENT_SECRET_WRITE
            - PRIVATE_APP_SCOPE_GROUPS_UPDATE
            - PRODUCTION_DEPLOYMENT
            - PROPERTY_HISTORY_REVISION
            - PUBLIC_APP_CLIENT_SECRET_VIEW
            - PUBLIC_APP_CLIENT_SECRET_WRITE
            - REACTIVATE_USER
            - REMOVE_ADMIN_PERMISSIONS
            - REMOVE_ADMIN_USER
            - REMOVE_SINGLE_SIGN_ON
            - REMOVE_TWO_FACTOR_AUTHENTICATION
            - REMOVE_USER
            - REQUIRE_SINGLE_SIGN_ON
            - RESTRICTED_LIST_ADDED_TO_CONTENT
            - SANDBOX_CREATION
            - SANDBOX_DELETION
            - SANDBOX_SYNC
            - SANDBOX_SYNC_TO_PRODUCTION
            - SECRET_ADDED_TO_SERVERLESS_FUNCTION
            - SENSITIVE_DATA_DISABLED
            - SENSITIVE_DATA_ENABLED
            - SEQUENCE_CLONED
            - SEQUENCE_CREATED
            - SEQUENCE_ENROLLMENT_INITIATED
            - SEQUENCE_ENROLLMENT_STATE_CHANGED
            - SEQUENCE_MODIFIED
            - SERVICE_KEY_CREATE
            - SERVICE_KEY_DEACTIVATE
            - SERVICE_KEY_PERMISSIONS_UPDATE
            - SERVICE_KEY_REVEAL
            - SERVICE_KEY_ROTATE
            - SMTP_TOKEN_CREATED
            - SMTP_TOKEN_DELETED
            - SMTP_TOKEN_PASSWORD_RESET
            - SMTP_TOKEN_RETRIEVED
            - TEAM_ADDED
            - TEAM_DELETED
            - TEAM_USER_ADDED
            - TEAM_USER_DELETED
            - TEMPLATE_DELETED
            - TEMPLATE_MODIFIED
            - TOUCHLESS_PURCHASE
            - UNIFIED_RESTORE_UNDO_EXECUTION
            - UNINSTALL_INTEGRATION
            - UNREQUIRE_SINGLE_SIGN_ON
            - WEBHOOK_SETTINGS_UPDATE
            - WEBHOOK_SUBSCRIPTION_CREATE
            - WEBHOOK_SUBSCRIPTION_UPDATE
        userId:
          type: integer
          description: ユーザーの固有ID。
          format: int32
      description: Details about the a particular security activity for a HubSpot account.
      example:
        actingUser: person3@testdomain.com
        countryCode: ie
        createdAt: '2022-04-01T19:36:24.303Z'
        id: '5432653'
        infoUrl: app.hubspot.com/settings/123/users
        ipAddress: 45.56.67.89
        objectId: '7654'
        regionCode: d
        type: ADD_USER
        userId: 876
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: エラーカテゴリー
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: エラー条件に関する背景状況
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: リクエストの固有ID。エラー報告またはサポートチケットには必ずこの値を含めてください
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: エラーに関する詳細情報
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: エラーまたは推奨の修正手順に関するドキュメントが含まれる関連付けられたURIへのリンク名の対応付け
        message:
          type: string
          description: エラーと修正手順（該当する場合）を記した、人が理解できるメッセージ
          example: An error occurred
        subCategory:
          type: string
          description: エラーに関する具体的な詳細が含まれる特定のカテゴリー
      example:
        message: Invalid input (details will vary based on the error)
        correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf
        category: VALIDATION_ERROR
        links:
          knowledge-base: https://www.hubspot.com/products/service/knowledge-base
    NextPage:
      required:
        - after
      type: object
      properties:
        after:
          type: string
          description: 後続のページを取得するためのページングカーソルトークン。
        link:
          type: string
          description: 次ページの結果を取得するために使用できるURL。
      description: ページ分割されたAPIレスポンスで次の結果セットを取得するために必要なページ設定情報を指定します
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: エラーの詳細に関連付けられているステータスコード
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: エラー条件に関する背景状況
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: エラーが見つかったフィールドまたはパラメーターの名前。
        message:
          type: string
          description: エラーと修正手順（該当する場合）を記した、人が理解できるメッセージ
        subCategory:
          type: string
          description: エラーに関する具体的な詳細が含まれる特定のカテゴリー
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.hubspot.com/oauth/authorize
          tokenUrl: https://api.hubapi.com/oauth/v1/token
          scopes:
            account-info.security.read: ''
            oauth: ''

````