Base Operations Base Score API

The Base Score API from Base Operations — 9 operation(s) for base score.

OpenAPI Specification

base-operations-base-score-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Customer API - Base Operations Analytics Base Score API
  description: 'Welcome to the Base Operations Customer API! This API allows you to interact with our data and perform detailed analysis. In this documentation, we''ll explain how to use the API, including the available endpoints and the expected request bodies or query parameters.


    ### Authentication


    To use this API, you''ll need to authenticate using an API key. Please reach out to Base Operations to have an API key provisioned for your user. Once you have your API key, you can use it to authorize the Swagger docs.


    To authenticate on the Swagger docs, follow these steps:


    1.  Click on the "Authorize" button on the top right corner of the Swagger docs.

    2.  In the "Value" field, enter your API key.

    3.  Click "Authorize" to authenticate.


    ### Helpful Hints


    When using the API, you may see the following query parameters:


    - `savedLocationId`: This is an internal identifier for a saved location. You can acquire this identifier by using the `GET /v1/public/saved-locations` endpoint.


    - `categoryId`: This is an internal identifier for a threat category. You can acquire this identifier by using the `GET /v1/public/threat-categories` endpoint.<br><br>


    That''s it! You''re now authenticated and can start using the API. If you have any questions or issues, please contact Base Operations support.

    '
  version: '1.0'
  contact: {}
servers:
- url: https://api.baseoperationsenterprise.com/
tags:
- name: Base Score
paths:
  /v1/public/base-scores:
    get:
      operationId: PublicBaseScoreController_getThreatScoreLocation_v1
      parameters:
      - name: locationId
        required: true
        in: query
        schema:
          type: number
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      responses:
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Base Score is not available.
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Get aggregate BaseScore for a city using a city id
      tags:
      - Base Score
  /v1/public/base-scores/radius:
    get:
      description: This endpoint computes the base score for a given radius. The query dto should include the following fields:<br><br>      - The `latitude`, `longitude`, and `radius` are required parameters to define the area of interest.<br><br>      - The `units` parameter is used to specify the measurement unit of the radius.<br><br>      - The `normalizedBy` parameter is used to specify the normalization method for the base score either through area or populateion.<br><br>
      operationId: PublicBaseScoreController_getThreatScoreRadius_v1
      parameters:
      - name: latitude
        required: true
        in: query
        schema:
          type: number
      - name: longitude
        required: true
        in: query
        schema:
          type: number
      - name: radius
        required: true
        in: query
        schema:
          type: number
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: units
        required: true
        in: query
        description: 'NB: miles, kilometers and meters will be deprecated soon.'
        schema:
          default: mi
          type: string
          enum:
          - mi
          - km
          - m
          - miles
          - kilometers
          - meters
      responses:
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Base Score is not available.
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Get aggregate BaseScore for a given radius using location coordinates
      tags:
      - Base Score
  /v1/public/base-scores/hex:
    get:
      operationId: PublicBaseScoreController_getThreatScoreHexes_v1
      parameters:
      - name: hexIds
        required: true
        in: query
        schema:
          type: array
          items:
            type: string
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      responses:
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Base Score is not available.
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Get aggregate BaseScore for a hex using a hex id
      tags:
      - Base Score
  /v1/public/base-scores/saved-locations/{savedLocationId}:
    get:
      description: This endpoint computes the base score of the radius of a saved location. Radius defaults to `0.5 mi`.
      operationId: PublicBaseScoreController_getSavedLocationsRadiusThreatScore_v1
      parameters:
      - name: savedLocationId
        required: true
        in: path
        schema:
          type: number
      - name: units
        required: true
        in: query
        description: 'NB: miles, kilometers and meters will be deprecated soon.'
        schema:
          default: mi
          type: string
          enum:
          - mi
          - km
          - m
          - miles
          - kilometers
          - meters
      - name: radius
        required: true
        in: query
        schema:
          default: 0.5
          type: number
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      responses:
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Saved location not found | Base Score is not available.
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Get aggregate BaseScore for a given radius using a saved location id
      tags:
      - Base Score
  /v1/public/base-scores/saved-locations/{savedLocationId}/location:
    get:
      deprecated: true
      description: This endpoint computes the base score for a saved location. Granularity is defaults to `city`.
      operationId: PublicBaseScoreController_getSavedLocationsLocationThreatScore_v1
      parameters:
      - name: savedLocationId
        required: true
        in: path
        schema:
          type: number
      responses:
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Saved location not found | Location not found | Base Score is not available.
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Get aggregate BaseScore for a city using a city id
      tags:
      - Base Score
  /v1/public/base-scores/saved-locations/{savedLocationId}/categories:
    get:
      operationId: PublicBaseScoreController_getSavedLocationsRadiusCategories_v1
      parameters:
      - name: savedLocationId
        required: true
        in: path
        schema:
          type: number
      - name: units
        required: true
        in: query
        description: 'NB: miles, kilometers and meters will be deprecated soon.'
        schema:
          default: mi
          type: string
          enum:
          - mi
          - km
          - m
          - miles
          - kilometers
          - meters
      - name: radius
        required: true
        in: query
        schema:
          default: 0.5
          type: number
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      responses:
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Saved location not found | Base Score is not available.
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Get the BaseScore category breakdown within a specified radius using a saved location id
      tags:
      - Base Score
  /v1/public/base-scores/categories:
    get:
      operationId: PublicBaseScoreController_getScoreCategoriesByLocation_v1
      parameters:
      - name: locationId
        required: true
        in: query
        schema:
          type: number
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ThreatCategoriesDownloadData'
      security:
      - ApiKey: []
      summary: Get the BaseScore category breakdown within a specified city using a city id
      tags:
      - Base Score
  /v1/public/base-scores/radius/categories:
    get:
      operationId: PublicBaseScoreController_getScoreCategoriesByRadius_v1
      parameters:
      - name: latitude
        required: true
        in: query
        schema:
          type: number
      - name: longitude
        required: true
        in: query
        schema:
          type: number
      - name: radius
        required: true
        in: query
        schema:
          type: number
      - name: units
        required: true
        in: query
        schema:
          type: string
          enum:
          - km
          - mi
          - m
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ThreatCategoriesDownloadData'
      security:
      - ApiKey: []
      summary: Get the BaseScore category breakdown within a specified radius using location coordinates
      tags:
      - Base Score
  /v1/public/base-scores/hex/categories:
    get:
      operationId: PublicBaseScoreController_getScoreCategoriesByHexes_v1
      parameters:
      - name: hexIds
        required: true
        in: query
        schema:
          type: array
          items:
            type: string
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ThreatCategoriesDownloadData'
      security:
      - ApiKey: []
      summary: Get the BaseScore category breakdown within a specified hex using a hex id
      tags:
      - Base Score
components:
  schemas:
    ThreatCategoriesDownloadData:
      type: object
      properties:
        categoryId:
          type: number
        category:
          type: string
        score:
          type: number
      required:
      - categoryId
      - category
      - score
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-KEY