Base Operations Change Detection API

The Change Detection API from Base Operations — 13 operation(s) for change detection.

OpenAPI Specification

base-operations-change-detection-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Customer API - Base Operations Analytics Change Detection 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: Change Detection
paths:
  /v1/public/change/prior-year:
    get:
      description: This endpoint compares the volume of events within a specified location for each month or quarter to the same period in the prior year.<br><br><br>      - The `locationId` is required to identify the location.<br><br>      - The `type` parameter specifies the event type, such as crime or unrest.<br><br>      - The `fromDate` and `toDate` are required [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) query parameters that determine the time range for the analysis.<br><br>      - Optional query parameters include `categories`, `months`, `daytimes`, and `timeAggregation` to further refine the analysis.<br><br>      - The change values are powered by BaseEngine (formerly BaseGTM).
      operationId: PublicChangeController_getLocationPriorYear_v1
      parameters:
      - name: locationId
        required: true
        in: query
        schema:
          type: number
      - name: types
        required: false
        in: query
        schema:
          default:
          - crime
          - unrest
          type: array
          items:
            type: string
            enum:
            - crime
            - unrest
            - customer
            - uas_sighting
      - name: fromDate
        required: true
        in: query
        schema:
          type: string
      - name: toDate
        required: true
        in: query
        schema:
          type: string
      - name: sources
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: months
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: daytimes
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: isGTM
        required: false
        in: query
        schema:
          default: false
          type: boolean
      - name: timeAggregation
        required: true
        in: query
        schema:
          type: string
          enum:
          - monthly
          - quarterly
          - yearly
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PublicChangeChartDto'
                - properties:
                    chartData:
                      type: array
                      items:
                        $ref: '#/components/schemas/TrendLineNormalizedData'
            text/csv:
              schema:
                type: string
                example: 'date,value,previousCount,currentCount,percentage,normalizedValue,sourceId,source

                  2023-01-01,77,31.54,26.52,-14.88,0.85,1,Source Name'
          description: ''
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Location not found | Boundary not found | Saved Location not found
        '432':
          description: Not enough data available
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Yearly Event Change Analysis by Location
      tags:
      - Change Detection
  /v1/public/change/radius/prior-year:
    get:
      description: This endpoint compares the volume of events within a specified radius each month or quarter to the same period in the prior year.<br><br><br>      - The `latitude`, `longitude`, and `radius` are required parameters to define the area of interest. The `radius` must be 5 miles, 8 kilometers, or 8000 meters or less.<br><br>      - The `units` parameter is used to specify the measurement unit of the radius.<br><br>      - The `type` parameter specifies the event type, such as crime or unrest.<br><br>      - The `fromDate` and `toDate` are required [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) query parameters that determine the time range for the analysis.<br><br>      - Optional query parameters include `categories`, `months`, `daytimes`, and `timeAggregation` to further refine the analysis.<br><br>      - The change values are powered by BaseEngine.
      operationId: PublicChangeController_getRadiusPriorYear_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: types
        required: false
        in: query
        schema:
          default:
          - crime
          - unrest
          type: array
          items:
            type: string
            enum:
            - crime
            - unrest
            - customer
            - uas_sighting
      - name: fromDate
        required: true
        in: query
        schema:
          type: string
      - name: toDate
        required: true
        in: query
        schema:
          type: string
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: months
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: daytimes
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: isGTM
        required: false
        in: query
        schema:
          default: false
          type: boolean
      - name: timeAggregation
        required: true
        in: query
        schema:
          type: string
          enum:
          - monthly
          - quarterly
          - yearly
      - name: savedLocationId
        required: false
        in: query
        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
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PublicChangeChartDto'
                - properties:
                    chartData:
                      type: array
                      items:
                        $ref: '#/components/schemas/TrendLineNormalizedData'
            text/csv:
              schema:
                type: string
                example: 'date,value,previousCount,currentCount,percentage,normalizedValue,sourceId,source

                  2023-01-01,77,31.54,26.52,-14.88,0.85,1,Source Name'
          description: ''
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Location not found | Boundary not found | Saved Location not found
        '432':
          description: Not enough data available
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Yearly Event Change Analysis by Radius
      tags:
      - Change Detection
  /v1/public/change/{savedLocationId}/prior-year:
    get:
      description: This endpoint compares the volume of events within a specified saved location for each month or quarter to the same period in the prior year.<br><br><br>      - The `savedLocationId` is required to identify the saved location.<br><br>      - The `type` parameter specifies the event type, such as crime or unrest.<br><br>      - The `fromDate` and `toDate` are required [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) query parameters that determine the time range for the analysis.<br><br>      - Optional query parameters include `categories`, `months`, `daytimes`, and `timeAggregation` to further refine the analysis.<br><br>      - The change values are powered by BaseEngine (formerly BaseGTM).
      operationId: PublicChangeController_getPriorYear_v1
      parameters:
      - name: savedLocationId
        required: true
        in: path
        schema:
          type: number
      - name: types
        required: false
        in: query
        schema:
          default:
          - crime
          - unrest
          type: array
          items:
            type: string
            enum:
            - crime
            - unrest
            - customer
            - uas_sighting
      - name: fromDate
        required: true
        in: query
        schema:
          type: string
      - name: toDate
        required: true
        in: query
        schema:
          type: string
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: months
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: daytimes
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: isGTM
        required: false
        in: query
        schema:
          default: false
          type: boolean
      - name: timeAggregation
        required: true
        in: query
        schema:
          type: string
          enum:
          - monthly
          - quarterly
          - yearly
      - name: granularity
        required: true
        in: query
        schema:
          default: city
          type: string
          enum:
          - city
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PublicChangeChartDto'
                - properties:
                    chartData:
                      type: array
                      items:
                        $ref: '#/components/schemas/TrendLineNormalizedData'
            text/csv:
              schema:
                type: string
                example: 'date,value,previousCount,currentCount,percentage,normalizedValue,sourceId,source

                  2023-01-01,77,31.54,26.52,-14.88,0.85,1,Source Name'
          description: ''
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Location not found | Boundary not found | Saved Location not found
        '432':
          description: Not enough data available
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Yearly Event Change Analysis for Saved Locations
      tags:
      - Change Detection
  /v1/public/change/prior-period:
    get:
      description: This endpoint compares the volume of events within a specified saved location for one period to the previous period (e.g., this month to last month, this quarter to last quarter, or this year to last year).<br><br><br>      - The `type` parameter specifies the event type, such as crime or unrest.<br><br>      - The `fromDate` and `toDate` are required [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) query parameters that determine the time range for the analysis.<br><br>      - Optional query parameters include `categories`, `months`, `daytimes`, and `timeAggregation` to further refine the analysis.<br><br>      - The change values are powered by BaseEngine (formerly BaseGTM).
      operationId: PublicChangeController_getLocationPriorPeriod_v1
      parameters:
      - name: locationId
        required: true
        in: query
        schema:
          type: number
      - name: types
        required: false
        in: query
        schema:
          default:
          - crime
          - unrest
          type: array
          items:
            type: string
            enum:
            - crime
            - unrest
            - customer
            - uas_sighting
      - name: fromDate
        required: true
        in: query
        schema:
          type: string
      - name: toDate
        required: true
        in: query
        schema:
          type: string
      - name: sources
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: months
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: daytimes
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: isGTM
        required: false
        in: query
        schema:
          default: false
          type: boolean
      - name: timeAggregation
        required: true
        in: query
        schema:
          type: string
          enum:
          - monthly
          - quarterly
          - yearly
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PublicChangeChartDto'
                - properties:
                    chartData:
                      type: array
                      items:
                        $ref: '#/components/schemas/TrendLineNormalizedData'
            text/csv:
              schema:
                type: string
                example: 'date,value,previousCount,currentCount,percentage,normalizedValue,sourceId,source

                  2023-01-01,77,31.54,26.52,-14.88,0.85,1,Source Name'
          description: ''
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Location not found | Boundary not found | Saved Location not found
        '432':
          description: Not enough data available
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Periodic Event Change Analysis by Location
      tags:
      - Change Detection
  /v1/public/change/radius/prior-period:
    get:
      description: This endpoint compares the volume of events within a specified radius for one period to the previous period (e.g., this month to last month, this quarter to last quarter, or this year to last year).<br><br><br>      - The `latitude`, `longitude`, and `radius` are required parameters to define the area of interest. The `radius` must be 5 miles, 8 kilometers, or 8000 meters or less.<br><br>      - The `units` parameter is used to specify the measurement unit of the radius.<br><br>      - The `type` parameter specifies the event type, such as crime or unrest.<br><br>      - The `fromDate` and `toDate` are required [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) query parameters that determine the time range for the analysis.<br><br>      - Optional query parameters include `categories`, `months`, `daytimes`, and `timeAggregation` to further refine the analysis.<br><br>      - The change values are powered by BaseEngine (formerly BaseGTM).
      operationId: PublicChangeController_getRadiusPriorPeriod_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: types
        required: false
        in: query
        schema:
          default:
          - crime
          - unrest
          type: array
          items:
            type: string
            enum:
            - crime
            - unrest
            - customer
            - uas_sighting
      - name: fromDate
        required: true
        in: query
        schema:
          type: string
      - name: toDate
        required: true
        in: query
        schema:
          type: string
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: months
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: daytimes
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: isGTM
        required: false
        in: query
        schema:
          default: false
          type: boolean
      - name: timeAggregation
        required: true
        in: query
        schema:
          type: string
          enum:
          - monthly
          - quarterly
          - yearly
      - name: savedLocationId
        required: false
        in: query
        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
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PublicChangeChartDto'
                - properties:
                    chartData:
                      type: array
                      items:
                        $ref: '#/components/schemas/TrendLineNormalizedData'
            text/csv:
              schema:
                type: string
                example: 'date,value,previousCount,currentCount,percentage,normalizedValue,sourceId,source

                  2023-01-01,77,31.54,26.52,-14.88,0.85,1,Source Name'
          description: ''
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Location not found | Boundary not found | Saved Location not found
        '432':
          description: Not enough data available
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Periodic Event Change Analysis by Radius
      tags:
      - Change Detection
  /v1/public/change/{savedLocationId}/prior-period:
    get:
      description: This endpoint compares the volume of events within a specified saved location for one period to the previous period (e.g., this month to last month, this quarter to last quarter, or this year to last year).<br><br><br>      - The `savedLocationId` is required to identify the saved location.<br><br>      - The `type` parameter specifies the event type, such as crime or unrest.<br><br>      - The `fromDate` and `toDate` are required [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) query parameters that determine the time range for the analysis.<br><br>      - Optional query parameters include `categories`, `months`, `daytimes`, and `timeAggregation` to further refine the analysis.<br><br>      - The change values are powered by BaseEngine (formerly BaseGTM).
      operationId: PublicChangeController_getPriorPeriod_v1
      parameters:
      - name: savedLocationId
        required: true
        in: path
        schema:
          type: number
      - name: types
        required: false
        in: query
        schema:
          default:
          - crime
          - unrest
          type: array
          items:
            type: string
            enum:
            - crime
            - unrest
            - customer
            - uas_sighting
      - name: fromDate
        required: true
        in: query
        schema:
          type: string
      - name: toDate
        required: true
        in: query
        schema:
          type: string
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: months
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: daytimes
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: isGTM
        required: false
        in: query
        schema:
          default: false
          type: boolean
      - name: timeAggregation
        required: true
        in: query
        schema:
          type: string
          enum:
          - monthly
          - quarterly
          - yearly
      - name: granularity
        required: true
        in: query
        schema:
          default: city
          type: string
          enum:
          - city
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PublicChangeChartDto'
                - properties:
                    chartData:
                      type: array
                      items:
                        $ref: '#/components/schemas/TrendLineNormalizedData'
            text/csv:
              schema:
                type: string
                example: 'date,value,previousCount,currentCount,percentage,normalizedValue,sourceId,source

                  2023-01-01,77,31.54,26.52,-14.88,0.85,1,Source Name'
          description: ''
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Location not found | Boundary not found | Saved Location not found
        '432':
          description: Not enough data available
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Periodic Event Change Analysis for Saved Locations
      tags:
      - Change Detection
  /v1/public/change/category-contribution:
    get:
      description: "\n      This endpoint compares the volume of events within a specified location over time and returns the change by category. The comparison can be either period-over-period (e.g., this month to last month) or year-over-year (e.g., this month to the same month last year), based on the `processType` parameter.<br><br><br>      - The `type` parameter specifies the event type, such as crime or unrest.<br><br>      - The `fromDate` and `toDate` are required [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) query parameters that determine the time range for the analysis.<br><br>      - The `processType` parameter is required and accepts either `periodOverPeriod` or `yearOverYear` to specify the type of comparison.<br><br>      - Optional query parameters include `categories`, `months`, `daytimes`, and `timeAggregation` to further refine the analysis.<br><br>      - The change values are powered by BaseEngine."
      operationId: PublicChangeController_getLocationThreatCategoryContribution_v1
      parameters:
      - name: locationId
        required: true
        in: query
        schema:
          type: number
      - name: types
        required: false
        in: query
        schema:
          default:
          - crime
          - unrest
          type: array
          items:
            type: string
            enum:
            - crime
            - unrest
            - customer
            - uas_sighting
      - name: fromDate
        required: true
        in: query
        schema:
          type: string
      - name: toDate
        required: true
        in: query
        schema:
          type: string
      - name: sources
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: months
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: daytimes
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: isGTM
        required: false
        in: query
        schema:
          default: false
          type: boolean
      - name: timeAggregation
        required: true
        in: query
        schema:
          type: string
          enum:
          - monthly
          - quarterly
          - yearly
      - name: processType
        required: true
        in: query
        schema:
          type: string
          enum:
          - yearOverYear
          - periodOverPeriod
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ChartDto'
                - properties:
                    chartData:
                      type: array
                      items:
                        $ref: '#/components/schemas/TrendLineCategoryContributionData'
            text/csv:
              schema:
                type: string
                example: 'date,value,previousCount,currentCount,percentage,normalizedValue,categoryId

                  2023-01-01,77,31.54,26.52,-14.88,0.85,56'
          description: ''
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Location not found | Boundary not found | Saved Location not found
        '432':
          description: Not enough data available
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Category-Based Event Change Analysis by Location
      tags:
      - Change Detection
  /v1/public/change/radius/category-contribution:
    get:
      description: This endpoint compares the volume of events within a specified radius over time and returns the change by category. The comparison can be either period-over-period (e.g., this month to last month) or year-over-year (e.g., this month to the same month last year), based on the `processType` parameter.<br><br><br>      - The `latitude`, `longitude`, and `radius` are required parameters to define the area of interest. The `radius` must be 5 miles, 8 kilometers, or 8000 meters or less.<br><br>      - The `units` parameter is used to specify the measurement unit of the radius.<br><br>      - The `type` parameter specifies the event type, such as crime or unrest.<br><br>      - The `fromDate` and `toDate` are required [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) query parameters that determine the time range for the analysis.<br><br>      - The `processType` parameter is required and accepts either `periodOverPeriod` or `yearOverYear` to specify the type of comparison.<br><br>      - Optional query parameters include `categories`, `months`, `daytimes`, and `timeAggregation` to further refine the analysis.<br><br>      - The change values are powered by BaseEngine (formerly BaseGTM).
      operationId: PublicChangeController_getRadiusThreatCategoryContribution_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: types
        required: false
        in: query
        schema:
          default:
          - crime
          - unrest
          type: array
          items:
            type: string
            enum:
            - crime
            - unrest
            - customer
            - uas_sighting
      - name: fromDate
        required: true
        in: query
        schema:
          type: string
      - name: toDate
        required: true
        in: query
        schema:
          type: string
      - name: categories
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: months
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: daytimes
        required: false
        in: query
        schema:
          type: array
          items:
            type: number
      - name: isGTM
        required: false
        in: query
        schema:
          default: false
          type: boolean
      - name: timeAggregation
        required: true
        in: query
        schema:
          type: string
          enum:
          - monthly
          - quarterly
          - yearly
      - name: processType
        required: true
        in: query
        schema:
          type: string
          enum:
          - yearOverYear
          - periodOverPeriod
      - name: savedLocationId
        required: false
        in: query
        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
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PublicChangeChartDto'
                - properties:
                    chartData:
                      type: array
                      items:
                        $ref: '#/components/schemas/TrendLineCategoryContributionData'
            text/csv:
              schema:
                type: string
                example: 'date,value,previousCount,currentCount,percentage,normalizedValue,categoryId

                  2023-01-01,77,31.54,26.52,-14.88,0.85,56'
          description: ''
        '401':
          description: Unauthorized. Your API Key may be invalid or expired.
        '404':
          description: Location not found | Boundary not found | Saved Location not found
        '432':
          description: Not enough data available
        '500':
          description: Internal Server Error
      security:
      - ApiKey: []
      summary: Category-Based Event Change Analysis by Radius
      tags:
      - Change Detection
  /v1/public/change/{savedLocationId}/category-contribution:
    get:
      description: "\n      This endpoint compares the volume of events within a specified saved location over time and returns the change 

# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/base-operations/refs/heads/main/openapi/base-operations-change-detection-api-openapi.yml