<commit_before>var rel = require('../../api_rels');
var device_format = require('./device.siren');

module.exports = function(context) {
  var server = context.server;
  var devices = context.devices;
  var loader = context.loader;
  var env = context.env;

  var entity = {
    class: ['server'],
    properties: {
      id: server.id,
      name: server._name
    },
    actions: [
      {
        name: 'register-device',
        method: 'POST',
        href: env.helpers.url.path(loader.path + '/devices'),
        type: 'application/x-www-form-urlencoded',
        fields: [
          {
            name: 'type',
            type: 'text'
          },
          {
            name: 'id',
            type: 'text'
          },
          {
            name: 'name',
            type: 'text'
          }
        ]
      }
    ],
    links: [
      { rel: ['self'], href: env.helpers.url.current() },
      { rel: ['monitor'], href: env.helpers.url.path(loader.path + '/events?topic=logs').replace(/^http/, 'ws') }
    ]
  };
<commit_msg>Removed `id` from server's api response.<commit_after>var rel = require('../../api_rels');
var device_format = require('./device.siren');

module.exports = function(context) {
  var server = context.server;
  var devices = context.devices;
  var loader = context.loader;
  var env = context.env;

  var entity = {
    class: ['server'],
    properties: {
      name: server._name
    },
    actions: [
      {
        name: 'register-device',
        method: 'POST',
        href: env.helpers.url.path(loader.path + '/devices'),
        type: 'application/x-www-form-urlencoded',
        fields: [
          {
            name: 'type',
            type: 'text'
          },
          {
            name: 'id',
            type: 'text'
          },
          {
            name: 'name',
            type: 'text'
          }
        ]
      }
    ],
    links: [
      { rel: ['self'], href: env.helpers.url.current() },
      { rel: ['monitor'], href: env.helpers.url.path(loader.path + '/events?topic=logs').replace(/^http/, 'ws') }
    ]
  };

{'fraction_non_alphanumeric': 0.1685878962536023, 'fraction_numerical': 0.0, 'mean_word_length': 1.6705128205128206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4316487', 'n_tokens_mistral': 641, 'n_tokens_neox': 639, 'n_words': 129}