logging.squibble.me


Einbindung

Es stehen verschiedene Versionen der embedded.js zur Verfügung.

  1. https://logging.squibble.me/assets/embedded-with-lodash.js?id=1573701749
  2. https://logging.squibble.me/assets/embedded-with-lodash-without-jquery.js?id=1573701749
  3. https://logging.squibble.me/assets/embedded-with-underscore.js?id=1573701749
  4. https://logging.squibble.me/assets/embedded-with-underscore-without-jquery.js?id=1573701749

Aktuelle Verwendung

Loading...

URI POST /api/v1/:tier/applications/:application_id/entries

Request Options

Execute a POST request as form-data with the following options within its body.

Required Params

The following parameter entry[level] is required on each request.

entry[level]:debug

Optional Params

entry[message]:PageView: https://squibble.me
entry[options][type]:pageview
entry[options][title]:Verbindet, was zusammen gehört | Squibble
...

Automatically filled attributes

tier
This option is filled with the :tier param from the request url. Serverside it will be downcased and underscored. So an input my-custom-tier will be transformed to my_custom_tier .
application
This option is filled with the :application_id param from the request url. Serverside it will be downcased and underscored. So an input my-custom-application will be transformed to my_custom_application .
referer / referer_domain
The referer and it's referer domain will be read from the request.
request
The request hash is read from the request.

Response

{
  "data" : {
    "resource" : {
      "_id"                : "5b0d3db9c4af82437f6e83b5",
      "additional_options" : {
        "type"     : "pageview",
        "title"    : "Verbindet, was zusammen gehört | Squibble",
        "pathname" : "/"
      },
      "application"        : "engine_frontend.production",
      "created_at"         : "2018-05-29T13:47:05.201+02:00",
      "level"              : "debug",
      "message"            : "PageView: https://squibble.me",
      "referer"            : null,
      "referer_domain"     : null,
      "request"            : {
        "remote_ip"    : "127.0.0.1",
        "referer"      : null,
        "media_type"   : "multipart/form-data",
        "original_url" : "http://localhost:3000/api/v1/client/applications/engine_frontend.production/entries",
        "method"       : "POST"
      },
      "tier"               : "client",
      "updated_at"         : "2018-05-29T13:47:05.201+02:00"
    }
  },
  "meta" : {
    "resource_class" : "Entry",
    "created_at"     : "2018-05-29T13:47:05.201+02:00",
    "updated_at"     : "2018-05-29T13:47:05.201+02:00"
  }
}

Exception handling

Missing :entry

When you don't pass a entry object within the requests body you'll get a 400 Bad Request json response:

{
  "message" : "param is missing or the value is empty: entry",
  "options" : {
    "params" : {
      "controller"     : "api/v1/application/entries",
      "action"         : "create",
      "tier"           : "client",
      "application_id" : "testing"
    }
  },
  "status"  : 400,
  "request" : {
    "method" : "post",
    "params" : {
      "controller"     : "api/v1/application/entries",
      "action"         : "create",
      "tier"           : "client",
      "application_id" : "testing"
    },
    "path"   : "/api/v1/client/applications/testing/entries"
  }
}

Missing / invalid entry[level]

When you don't pass a valid entry[level] you'll get a 400 Bad Request json response:

{
  "message" : "Unable to persist Entry #5b0d47cec4af824513675651: {:level=>[\"muss ausgefüllt werden\", \"ist kein gültiger Wert\"]}",
  "errors"  : {"level" : ["muss ausgefüllt werden","ist kein gültiger Wert"]}
}

Ruby Version
2.4.1
Rails Version
5.1.6.1