Evrim costs API

The costs API from Evrim — 8 operation(s) for costs.

OpenAPI Specification

evrim-costs-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Evrim answers costs API
  version: 0.5.18
  description: Data when and how you want it.
tags:
- name: costs
paths:
  /prod/v0/costs/answer/:
    get:
      operationId: costs_answer_list
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - costs
      security:
      - knoxApiToken: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAnswerCostsList'
          description: ''
  /prod/v0/costs/answer/{id}/:
    get:
      operationId: costs_answer_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this answer.
        required: true
      tags:
      - costs
      security:
      - knoxApiToken: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerCosts'
          description: ''
  /prod/v0/costs/average/answer/:
    get:
      operationId: costs_average_answer_retrieve
      description: Get avg answer cost for all answers
      tags:
      - costs
      security:
      - knoxApiToken: []
      responses:
        '200':
          description: No response body
  /prod/v0/costs/average/field/:
    get:
      operationId: costs_average_field_retrieve
      description: Get avg field cost for all fields
      tags:
      - costs
      security:
      - knoxApiToken: []
      responses:
        '200':
          description: No response body
  /prod/v0/costs/average/field/type/:
    get:
      operationId: costs_average_field_type_retrieve
      description: Get avg field cost for all fields by field type
      tags:
      - costs
      security:
      - knoxApiToken: []
      responses:
        '200':
          description: No response body
  /prod/v0/costs/created-field/:
    get:
      operationId: costs_created_field_list
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - costs
      security:
      - knoxApiToken: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCreatedFieldCostsList'
          description: ''
  /prod/v0/costs/created-field/{id}/:
    get:
      operationId: costs_created_field_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this created field.
        required: true
      tags:
      - costs
      security:
      - knoxApiToken: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedFieldCosts'
          description: ''
  /prod/v0/costs/snapshot/{id}/:
    get:
      operationId: costs_snapshot_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this snapshot.
        required: true
      tags:
      - costs
      security:
      - knoxApiToken: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SnapshotCost'
          description: ''
components:
  schemas:
    PaginatedAnswerCostsList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=400&limit=100
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=200&limit=100
        results:
          type: array
          items:
            $ref: '#/components/schemas/AnswerCosts'
    AnswerCosts:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        answer_id:
          type: integer
          writeOnly: true
        total:
          type: number
          format: double
          readOnly: true
      required:
      - answer_id
      - id
      - total
    CreatedFieldCosts:
      type: object
      properties:
        field_id:
          type: integer
          writeOnly: true
        id:
          type: integer
          readOnly: true
        total:
          type: number
          format: double
          readOnly: true
      required:
      - field_id
      - id
      - total
    SnapshotCost:
      type: object
      properties:
        id:
          type: integer
          writeOnly: true
        field_costs:
          type: number
          format: double
          readOnly: true
        answer_costs:
          type: number
          format: double
          readOnly: true
        total_cost:
          type: number
          format: double
          readOnly: true
      required:
      - answer_costs
      - field_costs
      - id
      - total_cost
    PaginatedCreatedFieldCostsList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=400&limit=100
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?offset=200&limit=100
        results:
          type: array
          items:
            $ref: '#/components/schemas/CreatedFieldCosts'
  securitySchemes:
    knoxApiToken:
      type: http
      scheme: bearer