<commit_before>openapi: "3.0.0"
info:
  title: Influx API Service
  version: 0.1.0
servers:
  - url: /v1
paths:
  /:
    get:
      summary: Map of all top level routes available
      responses:
        default:
          description: All routes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Routes"
  /write:
    post:
      tags:
        - Write
      summary: write time-series data into influxdb
      parameters:
        - in: header
          name: Content-Encoding
          description: when present, its value indicates to the database that compression is applied to the line-protocol body.
          schema:
            type: string
            description: specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
            default: identity
            enum:
              - gzip
              - identity
        - in: header
          name: Content-Type
          description: Content-Type is used to indicate the format of the data sent to the server.
          schema:
            type: string
            description: text/plain specifies the text line protocol; charset is assumed to be utf-8.
            default: text/plain; charset=utf-8
            enum:
              - text/plain
              - text/plain; charset=utf-8
              - application/vnd.influx.arrow
        - in: header
          name: Content-Length
          description: Content-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent.
          schema:
            type: integer
            description: The length in decimal number of octets.
        - in: header
          name: Accept
          description: specifies the return content format.
          schema:
            type: string
            description: return format of any errors
            default: application/json
            enum:
              - application/json
        - in: query
          name: org
          description: specifies the destination organization for writes
          required: true
          schema:
            type: string
            description: all points within batch are written to this organization.
        - in: query
          name: bucket
          description: specifies the destination bucket for writes
          required: true
          schema:
            type: string
            description: all points within batch are written to this bucket.
        - in: query
          name: precision
          description: specifies the precision for the unix timestamps within the body line-protocol
          schema:
            type: string
            default: ns
            description: specifies the unit of time
            enum:
              - ns
              - us
              - u
              - ms
              - s
      responses:
        '204':
          description: write data is correctly formatted and accepted for writing to the bucket.
        '400':
          description: line protocol poorly formed and no points were written.  Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LineProtocolError"
        '401':
          description: token does not have sufficient permissions to write to this organization and bucket.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        '403':
          description: no token was sent and they are required.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        '413':
          description: write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LineProtocolLengthError"
        '429':
          description: token is temporarily over quota. The Retry-After header describes when to try the write again.
          headers:<commit_msg>docs(http): add further description for 401 on /write<commit_after>openapi: "3.0.0"
info:
  title: Influx API Service
  version: 0.1.0
servers:
  - url: /v1
paths:
  /:
    get:
      summary: Map of all top level routes available
      responses:
        default:
          description: All routes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Routes"
  /write:
    post:
      tags:
        - Write
      summary: write time-series data into influxdb
      parameters:
        - in: header
          name: Content-Encoding
          description: when present, its value indicates to the database that compression is applied to the line-protocol body.
          schema:
            type: string
            description: specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
            default: identity
            enum:
              - gzip
              - identity
        - in: header
          name: Content-Type
          description: Content-Type is used to indicate the format of the data sent to the server.
          schema:
            type: string
            description: text/plain specifies the text line protocol; charset is assumed to be utf-8.
            default: text/plain; charset=utf-8
            enum:
              - text/plain
              - text/plain; charset=utf-8
              - application/vnd.influx.arrow
        - in: header
          name: Content-Length
          description: Content-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent.
          schema:
            type: integer
            description: The length in decimal number of octets.
        - in: header
          name: Accept
          description: specifies the return content format.
          schema:
            type: string
            description: return format of any errors
            default: application/json
            enum:
              - application/json
        - in: query
          name: org
          description: specifies the destination organization for writes
          required: true
          schema:
            type: string
            description: all points within batch are written to this organization.
        - in: query
          name: bucket
          description: specifies the destination bucket for writes
          required: true
          schema:
            type: string
            description: all points within batch are written to this bucket.
        - in: query
          name: precision
          description: specifies the precision for the unix timestamps within the body line-protocol
          schema:
            type: string
            default: ns
            description: specifies the unit of time
            enum:
              - ns
              - us
              - u
              - ms
              - s
      responses:
        '204':
          description: write data is correctly formatted and accepted for writing to the bucket.
        '400':
          description: line protocol poorly formed and no points were written.  Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LineProtocolError"
        '401':
          description: token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        '403':
          description: no token was sent and they are required.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        '413':
          description: write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LineProtocolLengthError"
        '429':
          description: token is temporarily over quota. The Retry-After header describes when to try the write again.
          headers:
{'fraction_non_alphanumeric': 0.0546681664791901, 'fraction_numerical': 0.007311586051743532, 'mean_word_length': 1.594397432156405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5475741', 'n_tokens_mistral': 2019, 'n_tokens_neox': 1939, 'n_words': 876}