Uppsala University OneSided API

The OneSided API from Uppsala University — 1 operation(s) for onesided.

OpenAPI Specification

uppsala-onesided-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: UCDP - The Public BattleDeaths OneSided API
  description: 'Uppsala Conflict Data Program (UCDP) RESTful HTTP API returning JSON for UCDP conflict datasets: georeferenced events, UCDP/PRIO armed conflict, dyadic, non-state, one-sided violence, battle-related deaths, and organized violence country-year. Access requires a free token supplied in the x-ucdp-access-token header (quota 5,000 requests/day).'
  version: '1.0'
  contact:
    name: Uppsala Conflict Data Program
    url: https://ucdp.uu.se/apidocs/
servers:
- url: https://ucdpapi.pcr.uu.se
  description: UCDP Public API
security:
- ApiToken: []
tags:
- name: OneSided
paths:
  /api/OneSided/{version}:
    get:
      tags:
      - OneSided
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: pagesize
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: string
      - name: Country
        in: query
        schema:
          type: string
      - name: Dyad
        in: query
        schema:
          type: string
      - name: Year
        in: query
        schema:
          type: string
      - name: Key
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/OneSidedDbAPIResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/OneSidedDbAPIResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/OneSidedDbAPIResponse'
components:
  schemas:
    OneSidedDb:
      type: object
      properties:
        conflict_id:
          type: string
          nullable: true
        dyad_id:
          type: string
          nullable: true
        actor_id:
          type: string
          nullable: true
        coalition_components:
          type: string
          nullable: true
        actor_name:
          type: string
          nullable: true
        actor_name_fulltext:
          type: string
          nullable: true
        actor_name_mothertongue:
          type: string
          nullable: true
        year:
          type: integer
          format: int32
          nullable: true
        best_fatality_estimate:
          type: integer
          format: int32
          nullable: true
        low_fatality_estimate:
          type: integer
          format: int32
          nullable: true
        high_fatality_estimate:
          type: integer
          format: int32
          nullable: true
        is_government_actor:
          type: integer
          format: int32
          nullable: true
        location:
          type: string
          nullable: true
        gwno_location:
          type: string
          nullable: true
        gwnoa:
          type: string
          nullable: true
        region:
          type: string
          nullable: true
        version:
          type: string
          nullable: true
      additionalProperties: false
    OneSidedDbAPIResponse:
      type: object
      properties:
        TotalCount:
          type: integer
          format: int32
          nullable: true
        TotalPages:
          type: integer
          format: int32
          nullable: true
        PreviousPageUrl:
          type: string
          nullable: true
        NextPageUrl:
          type: string
          nullable: true
        Result:
          type: array
          items:
            $ref: '#/components/schemas/OneSidedDb'
          nullable: true
      additionalProperties: false
  securitySchemes:
    ApiToken:
      type: apiKey
      description: UCDP API token sent in x-ucdp-access-token header
      name: x-ucdp-access-token
      in: header