Macrometa Visitors API

The Visitors API from Macrometa — 1 operation(s) for visitors.

OpenAPI Specification

macrometa-visitors-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Macrometa API Reference Activity Metrics Visitors API
  version: 0.17.17
  description: API reference for the Macrometa Global Data Network.
  license:
    name: Macrometa License, Version 2.0
servers:
- url: https://api-play.paas.macrometa.io
  description: GDN API
host: api-play.paas.macrometa.io
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Visitors
paths:
  /api/ds/v1/visitors:
    get:
      summary: Retrieve visitor data
      description: Retrieves all visit data for a given visitor using the supplied visitor ID.
      operationId: getAllVisitorData
      tags:
      - Visitors
      security:
      - ApiKeyAuth: []
      parameters:
      - name: visitorId
        in: query
        description: Visitor ID.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful retrieved visitor data.
          headers:
            x-photoniq-vid:
              schema:
                type: string
              description: The visitor ID.
              example: 062b8104-6a71-4ac3-ac7f-6cd1ba6f2fa1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllVisitsResponse'
        '400':
          description: Bad request
        '401':
          description: Authorization failure due to invalid authentication credentials.
components:
  schemas:
    PlatformDetails:
      type: object
      properties:
        browser:
          type: object
          properties:
            name:
              type: string
            version:
              type: string
            major:
              type: string
        engine:
          type: object
          properties:
            name:
              type: string
            version:
              type: string
        os:
          type: object
          properties:
            name:
              type: string
            version:
              type: string
        device:
          type: object
          properties:
            vendor:
              type: string
            model:
              type: string
        ua:
          type: string
    VisitDetail:
      type: object
      properties:
        signature:
          type: string
        visitId:
          type: string
        timestamp:
          type: number
          format: date-time
        platformDetails:
          $ref: '#/components/schemas/PlatformDetails'
        incognito:
          type: boolean
        ip:
          type: string
        url:
          type: string
        confidence:
          $ref: '#/components/schemas/Confidence'
    Confidence:
      type: object
      properties:
        matchScore:
          type: number
    AllVisitsResponse:
      type: object
      properties:
        visitorId:
          type: string
        firstSeenAt:
          type: string
          format: date-time
        lastSeenAt:
          type: string
          format: date-time
        visits:
          type: array
          items:
            $ref: '#/components/schemas/VisitDetail'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Provide an API Key to the `Authorization` header, prefixed with "apikey".


        Example: `Authorization: apikey <key>`'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Provide a JSON Web Token (JWT) to the `Authorization` header, prefixed with "bearer".


        Example: `Authorization: bearer <jwt>`'