Trait

io.keen.client.scala

Master

Related Doc: package scala

Permalink

trait Master extends Reader with Writer

A Client mixing in Master can make Keen IO API calls requiring a master key, such as deleting data, creating saved queries, and performing administrative functions.

A Master client can also perform all Reader and Writer API calls and does not require additional keys configured for these. However, this should not be considered a shortcut! Please keep your master key as secure as possible by not deploying it where it isn't strictly needed.

A master key must be configured in the Client's Settings or the masterKey field must otherwise be set e.g. with an anonymous class override.

Self Type
Master with Client
Source
Client.scala
Example:
  1. Initializing a Client with master access

    val keen = new Client with Master {
      override val masterKey = "myMasterKey"
    }
Exceptions thrown

MissingCredential if a master key is not configured.

See also

https://keen.io/docs/security/

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Master
  2. Writer
  3. Reader
  4. AccessLevel
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val authority: String

    Permalink
    Definition Classes
    AccessLevel
  2. abstract val scheme: String

    Permalink
    Definition Classes
    AccessLevel
  3. abstract val version: String

    Permalink
    Definition Classes
    AccessLevel

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addEvent(collection: String, event: String): Future[Response]

    Permalink

    Publish a single event.

    Publish a single event.

    collection

    The collection to which the event will be added.

    event

    The event

    Definition Classes
    Writer
    See also

    Record a single event API Reference

  5. def addEvents(events: String): Future[Response]

    Permalink

    Publish multiple events.

    Publish multiple events.

    events

    The events to add to the project.

    Definition Classes
    Writer
    See also

    Record multiple events API Reference

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def average(collection: String, targetProperty: String, filters: Option[String] = None, timeframe: Option[String] = None, timezone: Option[String] = None, groupBy: Option[String] = None): Future[Response]

    Permalink

    Returns the average across all numeric values for the target property in the event collection matching the given criteria.

    Returns the average across all numeric values for the target property in the event collection matching the given criteria.

    collection

    The name of the event collection you are analyzing.

    targetProperty

    The name of the property you are analyzing.

    filters

    Filters are used to narrow down the events used in an analysis request based on event property values. See Filters.

    timeframe

    A Timeframe specifies the events to use for analysis based on a window of time. If no timeframe is specified, all events will be counted. See Timeframes.

    timezone

    Modifies the timeframe filters for Relative Timeframes to match a specific timezone.

    groupBy

    The group_by parameter specifies the name of a property by which you would like to group the results. Using this parameter changes the response format. See Group By.

    Definition Classes
    Reader
    See also

    Average API Reference

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def count(collection: String, filters: Option[String] = None, timeframe: Option[String] = None, timezone: Option[String] = None, groupBy: Option[String] = None): Future[Response]

    Permalink

    Returns the number of resources in the event collection matching the given criteria.

    Returns the number of resources in the event collection matching the given criteria.

    collection

    The name of the event collection you are analyzing.

    filters

    Filters are used to narrow down the events used in an analysis request based on event property values. See Filters.

    timeframe

    A Timeframe specifies the events to use for analysis based on a window of time. If no timeframe is specified, all events will be counted. See Timeframes.

    Definition Classes
    Reader
    See also

    Count API Reference

  10. def countUnique(collection: String, targetProperty: String, filters: Option[String] = None, timeframe: Option[String] = None, timezone: Option[String] = None, groupBy: Option[String] = None): Future[Response]

    Permalink

    Returns the number of unique resources in the event collection matching the given criteria.

    Returns the number of unique resources in the event collection matching the given criteria.

    collection

    The name of the event collection you are analyzing.

    targetProperty

    The name of the property you are analyzing.

    filters

    Filters are used to narrow down the events used in an analysis request based on event property values. See Filters.

    timeframe

    A Timeframe specifies the events to use for analysis based on a window of time. If no timeframe is specified, all events will be counted. See Timeframes.

    timezone

    Modifies the timeframe filters for Relative Timeframes to match a specific timezone.

    groupBy

    The group_by parameter specifies the name of a property by which you would like to group the results. Using this parameter changes the response format. See Group By.

    Definition Classes
    Reader
    See also

    Count Unique API Reference

  11. def deleteCollection(collection: String): Future[Response]

    Permalink

    Deletes the entire event collection.

    Deletes the entire event collection. This is irreversible and will only work for collections under 10k events.

    collection

    The name of the collection.

    See also

    Delete a Collection API Reference

  12. def deleteProperty(collection: String, name: String): Future[Response]

    Permalink

    Removes a property and deletes all values stored with that property name.

    Removes a property and deletes all values stored with that property name.

    See also

    Delete a Property API Reference

  13. def doRequest(path: String, method: String, key: String, body: Option[String] = None, params: Map[String, Option[String]] = Map.empty): Future[Response]

    Permalink
    Attributes
    protected
    Definition Classes
    AccessLevel
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def extraction(collection: String, filters: Option[String] = None, timeframe: Option[String] = None, email: Option[String] = None, latest: Option[String] = None, propertyNames: Option[String] = None): Future[Response]

    Permalink

    Creates an extraction request for full-form event data with all property values.

    Creates an extraction request for full-form event data with all property values.

    If the email parameter is given, the extraction will be processed asynchronously and an email will be sent to the specified address when complete. Otherwise events are returned in a synchronous JSON response with a limit of 100,000 events.

    collection

    The name of the event collection you are analyzing.

    filters

    Filters are used to narrow down the events used in an analysis request based on event property values. See Filters.

    timeframe

    A Timeframe specifies the events to use for analysis based on a window of time. If no timeframe is specified, all events will be counted. See Timeframes.

    email

    Email address to notify when asynchronous extraction is ready for download.

    latest

    An integer containing the number of most recent events to extract.

    propertyNames

    An array of strings containing properties you wish to extract. If this parameter is omitted, all properties will be returned.

    Definition Classes
    Reader
    To do

    Should accept timezone parameter: https://github.com/keenlabs/KeenClient-Scala/issues/37

    See also

    Extractions API Reference

  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getCollection(collection: String): Future[Response]

    Permalink

    Returns available schema information for this event collection, including properties and their type.

    Returns available schema information for this event collection, including properties and their type. It also returns links to sub-resources.

    collection

    The name of the collection.

    To do

    This only requires a read key, move to Reader

    See also

    Inspect a single collection API Reference

  20. def getEvents: Future[Response]

    Permalink

    Returns schema information for all the event collections in this project.

    Returns schema information for all the event collections in this project.

    To do

    This only requires a read key, move to Reader

    See also

    Inspect all collections API Reference

  21. def getProject: Future[Response]

    Permalink

    Returns detailed information about the specific project, as well as links to related resources.

    Returns detailed information about the specific project, as well as links to related resources.

    See also

    Inspect a single project API Reference

  22. def getProjects: Future[Response]

    Permalink

    Returns the projects accessible to the API user, as well as links to project sub-resources for discovery.

    Returns the projects accessible to the API user, as well as links to project sub-resources for discovery.

    See also

    Inspect all projects API Reference

  23. def getProperty(collection: String, name: String): Future[Response]

    Permalink

    Returns the property name, type, and a link to sub-resources.

    Returns the property name, type, and a link to sub-resources.

    To do

    This only requires a read key, move to Reader

    See also

    Inspect a single property API Reference

  24. def getQueries: Future[Response]

    Permalink

    Returns the list of available query resources as paths to their endpoints.

    Returns the list of available query resources as paths to their endpoints.

    See also

    Query Availability API Reference

  25. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. val masterKey: String

    Permalink

    A master key required to make API calls of administrative nature.

  28. def maximum(collection: String, targetProperty: String, filters: Option[String] = None, timeframe: Option[String] = None, timezone: Option[String] = None, groupBy: Option[String] = None): Future[Response]

    Permalink

    Returns the maximum numeric value for the target property in the event collection matching the given criteria.

    Returns the maximum numeric value for the target property in the event collection matching the given criteria.

    collection

    The name of the event collection you are analyzing.

    targetProperty

    The name of the property you are analyzing.

    filters

    Filters are used to narrow down the events used in an analysis request based on event property values. See Filters.

    timeframe

    A Timeframe specifies the events to use for analysis based on a window of time. If no timeframe is specified, all events will be counted. See Timeframes.

    timezone

    Modifies the timeframe filters for Relative Timeframes to match a specific timezone.

    groupBy

    The group_by parameter specifies the name of a property by which you would like to group the results. Using this parameter changes the response format. See Group By.

    Definition Classes
    Reader
    See also

    Maximum API Reference

  29. def minimum(collection: String, targetProperty: String, filters: Option[String] = None, timeframe: Option[String] = None, timezone: Option[String] = None, groupBy: Option[String] = None): Future[Response]

    Permalink

    Returns the minimum numeric value for the target property in the event collection matching the given criteria.

    Returns the minimum numeric value for the target property in the event collection matching the given criteria.

    collection

    The name of the event collection you are analyzing.

    targetProperty

    The name of the property you are analyzing.

    filters

    Filters are used to narrow down the events used in an analysis request based on event property values. See Filters.

    timeframe

    A Timeframe specifies the events to use for analysis based on a window of time. If no timeframe is specified, all events will be counted. See Timeframes.

    timezone

    Modifies the timeframe filters for Relative Timeframes to match a specific timezone.

    groupBy

    The group_by parameter specifies the name of a property by which you would like to group the results. Using this parameter changes the response format. See Group By.

    Definition Classes
    Reader
    See also

    Minimum API Reference

  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. val projectId: String

    Permalink

    Project identifier for the Keen project that an AccessLevel's API key is associated with.

    Project identifier for the Keen project that an AccessLevel's API key is associated with.

    Definition Classes
    AccessLevel
  34. val readKey: String

    Permalink

    A read key required to make API calls for querying and extracting data.

    A read key required to make API calls for querying and extracting data.

    Definition Classes
    MasterReader
  35. def selectUnique(collection: String, targetProperty: String, filters: Option[String] = None, timeframe: Option[String] = None, timezone: Option[String] = None, groupBy: Option[String] = None): Future[Response]

    Permalink

    Returns a list of unique resources in the event collection matching the given criteria.

    Returns a list of unique resources in the event collection matching the given criteria.

    collection

    The name of the event collection you are analyzing.

    targetProperty

    The name of the property you are analyzing.

    filters

    Filters are used to narrow down the events used in an analysis request based on event property values. See Filters.

    timeframe

    A Timeframe specifies the events to use for analysis based on a window of time. If no timeframe is specified, all events will be counted. See Timeframes.

    timezone

    Modifies the timeframe filters for Relative Timeframes to match a specific timezone.

    groupBy

    The group_by parameter specifies the name of a property by which you would like to group the results. Using this parameter changes the response format. See Group By.

    Definition Classes
    Reader
    See also

    Select Unique API Reference

  36. def sum(collection: String, targetProperty: String, filters: Option[String] = None, timeframe: Option[String] = None, timezone: Option[String] = None, groupBy: Option[String] = None): Future[Response]

    Permalink

    Returns the sum across all numeric values for the target property in the event collection matching the given criteria.

    Returns the sum across all numeric values for the target property in the event collection matching the given criteria.

    collection

    The name of the event collection you are analyzing.

    targetProperty

    The name of the property you are analyzing.

    filters

    Filters are used to narrow down the events used in an analysis request based on event property values. See Filters.

    timeframe

    A Timeframe specifies the events to use for analysis based on a window of time. If no timeframe is specified, all events will be counted. See Timeframes.

    timezone

    Modifies the timeframe filters for Relative Timeframes to match a specific timezone.

    groupBy

    The group_by parameter specifies the name of a property by which you would like to group the results. Using this parameter changes the response format. See Group By.

    Definition Classes
    Reader
    See also

    Sum API Reference

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. val writeKey: String

    Permalink

    A write key required to make API calls that write data.

    A write key required to make API calls that write data.

    Definition Classes
    MasterWriter

Inherited from Writer

Inherited from Reader

Inherited from AccessLevel

Inherited from AnyRef

Inherited from Any

Ungrouped