# Server

#### Add server:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/add</p>

##### Request:

```
{
  "name": "Phising Server",
  "url": "https://misppriv.circl.lu",
  "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
  "org_id": "12345",
  "push": true,
  "pull": true,
  "push_sightings": true,
  "push_galaxy_clusters": true,
  "pull_galaxy_clusters": true,
  "lastpulledid": "12345",
  "lastpushedid": "12345",
  "organization": "string",
  "remote_org_id": "12345",
  "publish_without_email": true,
  "unpublish_event": true,
  "self_signed": true,
  "pull_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]},\"url_params\":\"\"}",
  "push_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]}}",
  "cert_file": "string",
  "client_cert_file": "string",
  "internal": true,
  "skip_proxy": true,
  "caching_enabled": true,
  "priority": "1",
  "cache_timestamp": true
}
```

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "Server": {
    "id": "12345",
    "name": "Phising Server",
    "url": "https://misppriv.circl.lu",
    "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
    "org_id": "12345",
    "push": true,
    "pull": true,
    "push_sightings": true,
    "push_galaxy_clusters": true,
    "pull_galaxy_clusters": true,
    "lastpulledid": "12345",
    "lastpushedid": "12345",
    "organization": "string",
    "remote_org_id": "12345",
    "publish_without_email": true,
    "unpublish_event": true,
    "self_signed": true,
    "pull_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]},\"url_params\":\"\"}",
    "push_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]}}",
    "cert_file": "string",
    "client_cert_file": "string",
    "internal": true,
    "skip_proxy": true,
    "caching_enabled": true,
    "priority": "1",
    "cache_timestamp": true
  }
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Edit server:

<p class="callout warning">PUT</p>

<p class="callout info">https://misp.local/servers/edit/{serverId}</p>

##### Request:

```
{
  "id": "12345",
  "name": "Phising Server",
  "url": "https://misppriv.circl.lu",
  "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
  "org_id": "12345",
  "push": true,
  "pull": true,
  "push_sightings": true,
  "push_galaxy_clusters": true,
  "pull_galaxy_clusters": true,
  "lastpulledid": "12345",
  "lastpushedid": "12345",
  "organization": "string",
  "remote_org_id": "12345",
  "publish_without_email": true,
  "unpublish_event": true,
  "self_signed": true,
  "pull_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]},\"url_params\":\"\"}",
  "push_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]}}",
  "cert_file": "string",
  "client_cert_file": "string",
  "internal": true,
  "skip_proxy": true,
  "caching_enabled": true,
  "priority": "1",
  "cache_timestamp": true
}
```

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "Server": {
    "id": "12345",
    "name": "Phising Server",
    "url": "https://misppriv.circl.lu",
    "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
    "org_id": "12345",
    "push": true,
    "pull": true,
    "push_sightings": true,
    "push_galaxy_clusters": true,
    "pull_galaxy_clusters": true,
    "lastpulledid": "12345",
    "lastpushedid": "12345",
    "organization": "string",
    "remote_org_id": "12345",
    "publish_without_email": true,
    "unpublish_event": true,
    "self_signed": true,
    "pull_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]},\"url_params\":\"\"}",
    "push_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]}}",
    "cert_file": "string",
    "client_cert_file": "string",
    "internal": true,
    "skip_proxy": true,
    "caching_enabled": true,
    "priority": "1",
    "cache_timestamp": true
  }
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Delete server:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/delete/{serverId}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Server deleted",
  "message": "Server deleted",
  "url": "/servers/delete/1"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Get servers:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
[
  {
    "Server": {
      "id": "12345",
      "name": "Phising Server",
      "url": "https://misppriv.circl.lu",
      "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
      "org_id": "12345",
      "push": true,
      "pull": true,
      "push_sightings": true,
      "push_galaxy_clusters": true,
      "pull_galaxy_clusters": true,
      "lastpulledid": "12345",
      "lastpushedid": "12345",
      "organization": "string",
      "remote_org_id": "12345",
      "publish_without_email": true,
      "unpublish_event": true,
      "self_signed": true,
      "pull_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]},\"url_params\":\"\"}",
      "push_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]}}",
      "cert_file": "string",
      "client_cert_file": "string",
      "internal": true,
      "skip_proxy": true,
      "caching_enabled": true,
      "priority": "1",
      "cache_timestamp": true
    },
    "Organisation": {
      "id": "12345",
      "name": "ORGNAME",
      "date_created": "2021-06-14 14:29:19",
      "date_modified": "2021-06-14 14:29:19",
      "description": "string",
      "type": "ADMIN",
      "nationality": "string",
      "sector": "string",
      "created_by": "12345",
      "uuid": "string",
      "contacts": "string",
      "local": true,
      "restricted_to_domain": [
        "example.com"
      ],
      "landingpage": "string",
      "user_count": "3",
      "created_by_email": "string"
    },
    "RemoteOrg": {
      "id": "12345",
      "name": "ORGNAME",
      "date_created": "2021-06-14 14:29:19",
      "date_modified": "2021-06-14 14:29:19",
      "description": "string",
      "type": "ADMIN",
      "nationality": "string",
      "sector": "string",
      "created_by": "12345",
      "uuid": "string",
      "contacts": "string",
      "local": true,
      "restricted_to_domain": [
        "example.com"
      ],
      "landingpage": "string",
      "user_count": "3",
      "created_by_email": "string"
    },
    "User": [
      {
        "id": "12345",
        "org_id": "12345",
        "server_id": "12345",
        "email": "user@example.com",
        "autoalert": true,
        "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
        "invited_by": "12345",
        "gpgkey": "string",
        "certif_public": "string",
        "nids_sid": "4000000",
        "termsaccepted": true,
        "newsread": "1617875568",
        "role_id": "3",
        "change_pw": "0",
        "contactalert": true,
        "disabled": true,
        "expiration": "2019-08-24T14:15:22Z",
        "current_login": "1617875568",
        "last_login": "1617875568",
        "force_logout": true,
        "date_created": "1617875568",
        "date_modified": "1617875568"
      }
    ]
  }
]
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Pull server:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers/pull/{serverId}/{pullTechnique}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Pull queued for background execution. Job ID: 1",
  "message": "Pull queued for background execution. Job ID: 1",
  "url": "/servers/pull/1"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Push server:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers/push/{serverId}/{pushTechnique}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Push queued for background execution. Job ID: 1",
  "message": "Push queued for background execution. Job ID: 1",
  "url": "/servers/push/1"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Get current instance version:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers/getVersion</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "version": "2.4.142",
  "perm_sync": true,
  "perm_sighting": true,
  "perm_galaxy_editor": true,
  "request_encoding": [
    "gzip"
  ]
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Get current instance PyMISP version:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers/getPyMISPVersion</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "version": "2.4.142"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Get current instance settings and diagnostics:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers/serverSettings</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "version": {
    "current": "v2.4.142",
    "newest": "v2.4.142",
    "upToDate": "same"
  },
  "phpSettings": {
    "max_execution_time": {
      "explanation": "The maximum duration that a script can run (does not affect the background workers). A too low number will break long running scripts like comprehensive API exports",
      "recommended": 300,
      "unit": "seconds",
      "value": 300
    },
    "memory_limit": {
      "explanation": "The maximum duration that a script can run (does not affect the background workers). A too low number will break long running scripts like comprehensive API exports",
      "recommended": 300,
      "unit": "seconds",
      "value": 300
    },
    "upload_max_filesize": {
      "explanation": "The maximum duration that a script can run (does not affect the background workers). A too low number will break long running scripts like comprehensive API exports",
      "recommended": 300,
      "unit": "seconds",
      "value": 300
    },
    "post_max_size": {
      "explanation": "The maximum duration that a script can run (does not affect the background workers). A too low number will break long running scripts like comprehensive API exports",
      "recommended": 300,
      "unit": "seconds",
      "value": 300
    }
  },
  "gpgStatus": "FAIL: Failed to load GnuPG",
  "proxyStatus": "not configured (so not tested)",
  "zmqStatus": 1,
  "stix": {
    "operational": 1,
    "stix": {
      "version": "1.2.0.11",
      "expected": ">1.2.0.9",
      "status": 1
    },
    "cybox": {
      "version": "1.2.0.11",
      "expected": ">1.2.0.9",
      "status": 1
    },
    "mixbox": {
      "version": "1.2.0.11",
      "expected": ">1.2.0.9",
      "status": 1
    },
    "maec": {
      "version": "1.2.0.11",
      "expected": ">1.2.0.9",
      "status": 1
    },
    "stix2": {
      "version": "1.2.0.11",
      "expected": ">1.2.0.9",
      "status": 1
    },
    "pymisp": {
      "version": "1.2.0.11",
      "expected": ">1.2.0.9",
      "status": 1
    }
  },
  "moduleStatus": {
    "Enrichment": 1,
    "Import": 1,
    "Export": 1,
    "Cortex": 1
  },
  "writeableDirs": {
    "/tmp": 0,
    "/var/www/MISP/app/tmp": 0,
    "/var/www/MISP/app/files": 0,
    "/var/www/MISP/app/files/scripts/tmp": 0
  },
  "writeableFiles": {
    "/var/www/MISP/app/Config/config.php": 0,
    "/var/www/MISP/.git/ORIG_HEAD": 2
  },
  "readableFiles": {
    "/var/www/MISP/app/files/scripts/stixtest.py": 0
  },
  "dbDiagnostics": {
    "admin_settings": {
      "table": "admin_settings",
      "used": "0.03 MB",
      "reclaimable": "0 MB",
      "data_in_bytes": 16384,
      "index_in_bytes": 16384,
      "reclaimable_in_bytes": 0
    },
    "allowedlist": {
      "table": "allowedlist",
      "used": "0.02 MB",
      "reclaimable": "0 MB",
      "data_in_bytes": 16384,
      "index_in_bytes": 0,
      "reclaimable_in_bytes": 0
    }
  },
  "dbSchemaDiagnostics": {
    "dataSource": "Database/Mysql",
    "actual_db_version": "68",
    "checked_table_column": [
      "column_name"
    ],
    "diagnostic": {},
    "diagnostic_index": {
      "event_reports": {
        "event_id": {
          "message": "Column `event_id` is indexed but should not",
          "sql": "DROP INDEX `event_id` ON event_reports;"
        }
      }
    },
    "expected_db_version": "70",
    "error": "string",
    "update_locked": true,
    "remaining_lock_time": 0,
    "update_fail_number_reached": true,
    "indexes": {
      "admin_settings": {
        "id": true,
        "setting": false
      }
    },
    "columnPerTable": {
      "admin_settings": [
        "id",
        "setting",
        "value"
      ]
    }
  },
  "redisInfo": {
    "extensionVersion": "5.1.1",
    "connection": true,
    "redis_version": "5.0.7",
    "redis_git_sha1": 0,
    "redis_git_dirty": 0,
    "redis_build_id": "636cde3b5c7a3923",
    "redis_mode": "standalone",
    "os": "Linux 5.8.0-50-generic x86_64",
    "arch_bits": 64,
    "multiplexing_api": "epoll",
    "atomicvar_api": "atomic-builtin",
    "gcc_version": "9.2.1",
    "process_id": 1051,
    "run_id": "f894944d92c978df93a18821fb5ebe30dfd0b257",
    "tcp_port": 6379,
    "uptime_in_seconds": 327116,
    "uptime_in_days": 3,
    "hz": 10,
    "configured_hz": 10,
    "lru_clock": 10365184,
    "executable": "/usr/bin/redis-server",
    "config_file": "/etc/redis/redis.conf",
    "connected_clients": 18,
    "client_recent_max_input_buffer": 2,
    "client_recent_max_output_buffer": 0,
    "blocked_clients": 0,
    "used_memory": 1309488,
    "used_memory_human": "1.25M",
    "used_memory_rss": 5541888,
    "used_memory_rss_human": "5.29M",
    "used_memory_peak": 1410464,
    "used_memory_peak_human": "1.35M",
    "used_memory_peak_perc": "92.84%",
    "used_memory_overhead": 1200800,
    "used_memory_startup": 796232,
    "used_memory_dataset": 108688,
    "used_memory_dataset_perc": "21.18%",
    "allocator_allocated": 1480176,
    "allocator_active": 1896448,
    "allocator_resident": 5890048,
    "total_system_memory": 33406590976,
    "total_system_memory_human": "31.11G",
    "used_memory_lua": 41984,
    "used_memory_lua_human": "41.00K",
    "used_memory_scripts": 0,
    "used_memory_scripts_human": "0B",
    "number_of_cached_scripts": 0,
    "maxmemory": 0,
    "maxmemory_human": "0B",
    "maxmemory_policy": "noeviction",
    "allocator_frag_ratio": 1.28,
    "allocator_frag_bytes": 416272,
    "allocator_rss_ratio": 3.11,
    "allocator_rss_bytes": 3993600,
    "rss_overhead_ratio": 0.94,
    "rss_overhead_bytes": -348160,
    "mem_fragmentation_ratio": 4.24,
    "mem_fragmentation_bytes": 4233432,
    "mem_not_counted_for_evict": 0,
    "mem_replication_backlog": 0,
    "mem_clients_slaves": 0,
    "mem_clients_normal": 402912,
    "mem_aof_buffer": 0,
    "mem_allocator": "jemalloc-5.2.1",
    "active_defrag_running": 0,
    "lazyfree_pending_objects": 0,
    "loading": 0,
    "rdb_changes_since_last_save": 0,
    "rdb_bgsave_in_progress": 0,
    "rdb_last_save_time": 1620977919,
    "rdb_last_bgsave_status": "ok",
    "rdb_last_bgsave_time_sec": 0,
    "rdb_current_bgsave_time_sec": -1,
    "rdb_last_cow_size": 446464,
    "aof_enabled": 0,
    "aof_rewrite_in_progress": 0,
    "aof_rewrite_scheduled": 0,
    "aof_last_rewrite_time_sec": -1,
    "aof_current_rewrite_time_sec": -1,
    "aof_last_bgrewrite_status": "ok",
    "aof_last_write_status": "ok",
    "aof_last_cow_size": 0,
    "total_connections_received": 289,
    "total_commands_processed": 252747,
    "instantaneous_ops_per_sec": 7,
    "total_net_input_bytes": 12111506,
    "total_net_output_bytes": 1232466,
    "instantaneous_input_kbps": 0.36,
    "instantaneous_output_kbps": 0.03,
    "rejected_connections": 0,
    "sync_full": 0,
    "sync_partial_ok": 0,
    "sync_partial_err": 0,
    "expired_keys": 17,
    "expired_stale_perc": 0,
    "expired_time_cap_reached_count": 0,
    "evicted_keys": 0,
    "keyspace_hits": 70,
    "keyspace_misses": 62805,
    "pubsub_channels": 0,
    "pubsub_patterns": 0,
    "latest_fork_usec": 168,
    "migrate_cached_sockets": 0,
    "slave_expires_tracked_keys": 0,
    "active_defrag_hits": 0,
    "active_defrag_misses": 0,
    "active_defrag_key_hits": 0,
    "active_defrag_key_misses": 0,
    "role": "master",
    "connected_slaves": 0,
    "master_replid": "d5e7afcf4fd1a31e539a4eadd5caf2a7da6d121c",
    "master_replid2": 0,
    "master_repl_offset": 0,
    "second_repl_offset": -1,
    "repl_backlog_active": 0,
    "repl_backlog_size": 1048576,
    "repl_backlog_first_byte_offset": 0,
    "repl_backlog_histlen": 0,
    "used_cpu_sys": 195.014281,
    "used_cpu_user": 217.352183,
    "used_cpu_sys_children": 0.050885,
    "used_cpu_user_children": 0.076436,
    "cluster_enabled": 0,
    "db0": "keys=15,expires=0,avg_ttl=0",
    "db13": "keys=12,expires=4,avg_ttl=21265731140"
  },
  "finalSettings": [
    {
      "level": 0,
      "value": "string",
      "errorMessage": "The currently set baseurl does not match the URL through which you have accessed the page. Disregard this if you are accessing the page via an alternate URL (for example via IP address).",
      "test": "testBaseURL",
      "type": "string",
      "null": true,
      "subGroup": "Enrichment",
      "cli_only": 1,
      "redacted": true,
      "optionsSource": {},
      "afterHook": "cleanCacheFiles",
      "error": 1,
      "tab": "MISP",
      "setting": "MISP.baseurl",
      "options": {}
    }
  ],
  "extensions": {
    "cli": {
      "phpversion": "7.4.3"
    },
    "extensions": {
      "json": {
        "web_version": "7.4.3",
        "web_version_outdated": false,
        "cli_version": "7.4.3",
        "cli_version_outdated": false,
        "required": true,
        "info": null
      }
    }
  },
  "workers": {
    "cache": {
      "ok": true,
      "workers": [
        {
          "pid": 1233,
          "user": "www-data",
          "alive": true,
          "correct_user": true,
          "ok": true
        }
      ],
      "jobCount": 0
    },
    "default": {
      "ok": true,
      "workers": [
        {
          "pid": 1233,
          "user": "www-data",
          "alive": true,
          "correct_user": true,
          "ok": true
        }
      ],
      "jobCount": 0
    },
    "email": {
      "ok": true,
      "workers": [
        {
          "pid": 1233,
          "user": "www-data",
          "alive": true,
          "correct_user": true,
          "ok": true
        }
      ],
      "jobCount": 0
    },
    "prio": {
      "ok": true,
      "workers": [
        {
          "pid": 1233,
          "user": "www-data",
          "alive": true,
          "correct_user": true,
          "ok": true
        }
      ],
      "jobCount": 0
    },
    "update": {
      "ok": true,
      "workers": [
        {
          "pid": 1233,
          "user": "www-data",
          "alive": true,
          "correct_user": true,
          "ok": true
        }
      ],
      "jobCount": 0
    },
    "scheduler": {
      "ok": true,
      "workers": [
        {
          "pid": 1233,
          "user": "www-data",
          "alive": true,
          "correct_user": true,
          "ok": true
        }
      ],
      "jobCount": 0
    },
    "proc_accessible": true,
    "controls": true
  }
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Get workers:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers/getWorkers</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "cache": {
    "ok": true,
    "workers": [
      {
        "pid": 1233,
        "user": "www-data",
        "alive": true,
        "correct_user": true,
        "ok": true
      }
    ],
    "jobCount": 0
  },
  "default": {
    "ok": true,
    "workers": [
      {
        "pid": 1233,
        "user": "www-data",
        "alive": true,
        "correct_user": true,
        "ok": true
      }
    ],
    "jobCount": 0
  },
  "email": {
    "ok": true,
    "workers": [
      {
        "pid": 1233,
        "user": "www-data",
        "alive": true,
        "correct_user": true,
        "ok": true
      }
    ],
    "jobCount": 0
  },
  "prio": {
    "ok": true,
    "workers": [
      {
        "pid": 1233,
        "user": "www-data",
        "alive": true,
        "correct_user": true,
        "ok": true
      }
    ],
    "jobCount": 0
  },
  "update": {
    "ok": true,
    "workers": [
      {
        "pid": 1233,
        "user": "www-data",
        "alive": true,
        "correct_user": true,
        "ok": true
      }
    ],
    "jobCount": 0
  },
  "scheduler": {
    "ok": true,
    "workers": [
      {
        "pid": 1233,
        "user": "www-data",
        "alive": true,
        "correct_user": true,
        "ok": true
      }
    ],
    "jobCount": 0
  },
  "proc_accessible": true,
  "controls": true
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Start worker:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/startWorker/{workerType}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Worker start signal sent",
  "message": "Worker start signal sent",
  "url": "/servers/startWorker/email"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Stop worker:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/stopWorker/{workerPid}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Worker stop signal sent",
  "message": "Worker stop signal sent",
  "url": "/servers/startWorker/1234"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Kill all workers:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/killAllWorkers</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Killing workers.",
  "message": "Killing workers.",
  "url": "/servers/killAllWorkers"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Restart workers:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/restartWorkers</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Restarting workers.",
  "message": "Restarting workers.",
  "url": "/servers/restartWorkers"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Restart dead workers:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/restartDeadWorkers</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Restarting workers.",
  "message": "Restarting workers.",
  "url": "/servers/restartDeadWorkers"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Update server:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/update</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "results": [
    {
      "input": "cd $(git rev-parse --show-toplevel) && git checkout app/composer.json 2>&1",
      "output": [
        "Updated 1 path from the index"
      ],
      "status": 0
    }
  ]
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Cache server:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/cache</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Server caching job initiated.",
  "message": "Server caching job initiated.",
  "url": "/servers/cache"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Create sync:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/createSync</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "Server": {
    "url": "https://misppriv.circl.lu",
    "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
    "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
    "Organisation": {
      "name": "ORGNAME",
      "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b"
    }
  }
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Get instance UUID:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers/getInstanceUUID</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Get server setting by name:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/servers/getSetting/{settingName}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "level": 0,
  "value": "string",
  "errorMessage": "The currently set baseurl does not match the URL through which you have accessed the page. Disregard this if you are accessing the page via an alternate URL (for example via IP address).",
  "test": "testBaseURL",
  "type": "string",
  "null": true,
  "subGroup": "Enrichment",
  "cli_only": 1,
  "redacted": true,
  "optionsSource": {},
  "afterHook": "cleanCacheFiles",
  "error": 1,
  "tab": "MISP",
  "setting": "MISP.baseurl",
  "options": {}
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Edit server setting:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/serverSettingsEdit/{settingName}</p>

##### Request: 

```
{
  "value": "string"
}
```

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Field updated",
  "message": "Field updated",
  "url": "/servers/serverSettingsEdit"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```



#### Import server:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/servers/import</p>

##### Request: 

```
{
  "name": "Phising Server",
  "url": "https://misppriv.circl.lu",
  "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
  "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
  "Organisation": {
    "name": "ORGNAME"
  }
}
```

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "Server": {
    "id": "12345",
    "name": "Phising Server",
    "url": "https://misppriv.circl.lu",
    "authkey": "894c8d095180c7ea28789092e96ca6424199aa4f",
    "org_id": "12345",
    "push": true,
    "pull": true,
    "push_sightings": true,
    "push_galaxy_clusters": true,
    "pull_galaxy_clusters": true,
    "lastpulledid": "12345",
    "lastpushedid": "12345",
    "organization": "string",
    "remote_org_id": "12345",
    "publish_without_email": true,
    "unpublish_event": true,
    "self_signed": true,
    "pull_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]},\"url_params\":\"\"}",
    "push_rules": "{\"tags\":{\"OR\":[],\"NOT\":[]},\"orgs\":{\"OR\":[],\"NOT\":[]}}",
    "cert_file": "string",
    "client_cert_file": "string",
    "internal": true,
    "skip_proxy": true,
    "caching_enabled": true,
    "priority": "1",
    "cache_timestamp": true
  }
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```