Mataara report format (JSON)¶
This file documents the format used for reports in the modern JSON format, with the intent of moving to a standardised, versioned API in future.
See also
There is also a legacy XML-based report format that is only supported for Drupal 7.
Encryption¶
Encryption uses OpenSSL with an RC4 stream cipher. The HTTP endpoint receives a JSON blob with two fields containing BASE64-encoded values:
- ek
- Envelope key for the public key specified
- enc
- The encrypted data payload
JSON Format¶
All timestamps are expected to be in UNIX time, i.e. the number of seconds since 1 January 1970 UTC.
- AdminRole{}
Details of the Drupal website administration role.
- RoleName
- Name of role (e.g.
administrator). - RoleID
- Drupal rid (role identifier)
- RoleUsers[]
Set of users with this role.
- uid{}
User’s unique identifier
- Name
- User’s Drupal site username.
- User’s email address, if defined.
- Status
- Is the account marked as active inside Drupal? (0 = blocked, 1 = active).
- LastLogin
- Timestamp of the user’s last login to the Drupal site.
- Databases{}
Set of databases that the Drupal site is connected to.
- key{}
Database key (usually default).
- target{}
Database target (usually default).
- Driver
- Database driver (e.g. mysql, pgsql).
- Database
- Name of the database to connect to.
- Host
- Hostname of the database server.
- DirectoryHash
- MD5 hash of the
DRUPAL_ROOTdirectory and files inside to allow for detection of code changes. - DrupalVersion
- Version number for the Drupal core, e.g. 7.34
- Environment{}
Drupal environment in use.
- Label
- user-friendly display name for the environment.
- Name
- Internal machine name for the environment.
- Modules[{}]
List of installed Drupal modules.
- Module
- Internal machine name of module.
- Name
- User-friendly display name of module.
- Description
- Typically one-line description of module behaviour.
- Package
- Package name (used to group projects, e.g.
Corefor Drupal Core related modules). - Project
- Machine name of project (used to group modules).
- Version
- Module version string (e.g.
7.x-2.3,7.x-dev,7.x-1.0-beta3,7.x-1.0-alpha4+1-dev). - Url
- External URL for module, if provided.
- Nodes{}
Summary of the Drupal content nodes in the site.
- Nodes
- Number of nodes in the site.
- Revisions
- Number of node revisions in the site.
- ReportExpiry
- Timestamp at which point the report should be considered stale and ignored if received after this time.
- ReportGenerated
- Timestamp when the report was generated.
- ReportType
- Type of report (e.g.
drupal7). - ServerHostName
- Server’s hostname.
- SiteKey
- Unique identifier for site.
- SiteSlogan
- An optional site description that may be converted in Drupal.
- SiteTitle
- Drupal site title.
- Themes[{}]
List of installed Drupal front-end themes.
Theme properties are the same as for Modules.
- Users
- Number of users on site.
Example report¶
{
"Databases": {
"default": {
"default": {
"Host": "127.0.0.1",
"Database": "vagrant",
"Driver": "mysql"
}
}
},
"ServerHostname": "archclient",
"DrupalVersion": "7.51",
"Environment": {
"Name": "production",
"Label": "Production"
},
"ReportGenerated": 1478730113,
"ServerName": "http:\/\/archclient.vagrant-local\/",
"ReportExpiry": 1478731913,
"SiteRoot": "\/var\/www\/archclient",
"SiteSlogan": false,
"Nodes": {
"Revisions": "0",
"Nodes": "0"
},
"DirectoryHash": "3c4926153b2a5ffbceec2a464033de30",
"Themes": [
{
"Version": "7.51",
"Theme": "bartik",
"Url": "",
"Description": "A flexible, recolorable theme with many regions.",
"Name": "Bartik",
"Project": ""
}
],
"AdminRole": {
"RoleUsers": [
],
"RoleID": 0,
"RoleName": ""
},
"Modules": [
{
"Package": "",
"Description": "Sets the environment variable for a site instance",
"Url": "",
"Version": "7.x-1.0",
"Name": "Environment",
"Module": "environment",
"Project": "environment"
},
{
"Package": "Core",
"Description": "Controls the visual building blocks a page is constructed with. Blocks are boxes of content rendered into an area, or region, of a web page.",
"Url": "",
"Version": "7.51-dev",
"Name": "Block",
"Module": "block",
"Project": ""
},
{
"Package": "Archimedes",
"Description": "Client module for reporting to a Mataara Server",
"Url": "",
"Version": "7.x-dev",
"Name": "Mataara Client",
"Module": "archimedes_client",
"Project": ""
},
{
"Package": "Core",
"Description": "Logs and records system events to the database.",
"Url": "",
"Version": "7.51-dev",
"Name": "Database logging",
"Module": "dblog",
"Project": ""
},
{
"Package": "Core",
"Description": "Field API to add fields to entities like nodes and users.",
"Url": "",
"Version": "7.51-dev",
"Name": "Field",
"Module": "field",
"Project": ""
},
{
"Package": "Core",
"Description": "Stores field data in an SQL database.",
"Url": "",
"Version": "7.51-dev",
"Name": "Field SQL storage",
"Module": "field_sql_storage",
"Project": ""
},
{
"Package": "Core",
"Description": "Filters content in preparation for display.",
"Url": "",
"Version": "7.51-dev",
"Name": "Filter",
"Module": "filter",
"Project": ""
},
{
"Package": "Core",
"Description": "Allows content to be submitted to the site and displayed on pages.",
"Url": "",
"Version": "7.51-dev",
"Name": "Node",
"Module": "node",
"Project": ""
},
{
"Package": "Core",
"Description": "Handles general site configuration for administrators.",
"Url": "",
"Version": "7.51-dev",
"Name": "System",
"Module": "system",
"Project": ""
},
{
"Package": "Core",
"Description": "Defines simple text field types.",
"Url": "",
"Version": "7.51-dev",
"Name": "Text",
"Module": "text",
"Project": ""
},
{
"Package": "Core",
"Description": "Checks for available updates, and can securely install or update modules and themes via a web interface.",
"Url": "",
"Version": "7.51-dev",
"Name": "Update manager",
"Module": "update",
"Project": ""
},
{
"Package": "Core",
"Description": "Manages the user registration and login system.",
"Url": "",
"Version": "7.51-dev",
"Name": "User",
"Module": "user",
"Project": ""
},
{
"Package": "",
"Description": "Start with only a few modules enabled.",
"Url": "",
"Version": "7.51-dev",
"Name": "Minimal",
"Module": "minimal",
"Project": ""
}
],
"SiteTitle": "Archimedes Client",
"SiteKey": "d2e1e62ce90c3b4f2a6602209eb6ac29",
"Users": "2",
"ReportType": "drupal7"
}