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

# 呼び出し元の場所を取得

> IP アドレスに基づいてユーザーの地理的位置を特定します。

この API はデバッグ目的で提供されており、将来的に利用できなくなる可能性があります。



## OpenAPI

````yaml /ja/weave/reference/service-api/openapi.json get /geolocate
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /geolocate:
    get:
      tags:
        - Service
      summary: 呼び出し元の場所を取得
      description: |-
        IP アドレスに基づいてユーザーの地理的位置を特定します。

        この API はデバッグ目的で提供されており、将来的に利用できなくなる可能性があります。
      operationId: get_caller_location_geolocate_get
      parameters:
        - description: 地理的位置を特定する対象の IP アドレス。デフォルトではクライアントの IP アドレスが使用されます
          in: query
          name: ip
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 地理的位置を特定する対象の IP アドレス。デフォルトではクライアントの IP アドレスが使用されます
            examples:
              - 1.2.3.4
            title: Ip
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeolocationRes'
          description: 正常なレスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 検証エラー
components:
  schemas:
    GeolocationRes:
      properties:
        allowed:
          default: false
          description: この IP アドレスを Inference に使用できるかどうか。
          title: Allowed
          type: boolean
        ip:
          description: 解決済みの IP アドレス。デバッグに役立ちます
          title: Ip
          type: string
        location:
          anyOf:
            - $ref: '#/components/schemas/Geolocation'
            - type: 'null'
          description: IP アドレスの位置情報。特定できない場合は None
      required:
        - ip
      title: GeolocationRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    Geolocation:
      properties:
        country_code:
          description: ISO 3166-1 Alpha 2 形式の 2 文字の国コード
          title: Country Code
          type: string
        country_name:
          anyOf:
            - type: string
            - type: 'null'
          description: 国名。特定できない場合は None
          title: Country Name
        file_index:
          description: CSV ファイル内の行
          title: File Index
          type: integer
        range_end_int:
          description: 整数として表した IP 範囲の終了位置
          title: Range End Int
          type: integer
        range_end_ip:
          description: ドット区切りの 10 進表記での IP 範囲の終了位置
          title: Range End Ip
          type: string
        range_start_int:
          description: 整数として表した IP 範囲の開始位置
          title: Range Start Int
          type: integer
        range_start_ip:
          description: ドット区切りの 10 進表記での IP 範囲の開始位置
          title: Range Start Ip
          type: string
      required:
        - file_index
        - range_start_int
        - range_end_int
        - range_start_ip
        - range_end_ip
        - country_code
      title: Geolocation
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````