API Reference
API v1 Introduction

Welcome to the SaferWall API documentation.

The SaferWall API allows you to leverage detection services and resources within the SaferWall cloud in a simple, programmatic way using conventional HTTP requests. The endpoints are intuitive and powerful, allowing you to easily make calls to retrieve information or to execute actions.

All of the functionality that you are familiar with in the SaferWall web interface is also available through the API, allowing you to script the complex actions that your situation requires.

The API documentation will start with a general overview about the design and technology that has been implemented, followed by reference information about specific endpoints.

Requests

Any tool that can speak the HTTP protocom can communicate with the API simply by requesting the correct URI. Requests should be made using the HTTPS protocol so that traffic is encrypted. The interface responds to different methods depending on the action required.

Method Usage
GET For simple retrieval of information about a sample, url, or a user, you should use the GET method. The information you request will be returned to you as a JSON object. The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the objects you are querying.
DELETE To delete sample, url or to remove a user from your organization, the DELETE method should be used. This will remove the specified object if it is found. If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource's availability prior to issuing a delete command, the final state will be the same regardless of its existence.
PUT To update the information about a sample, url or a user in your account, the PUT method is available. Like the DELETE Method, the PUT method is idempotent. It sets the state of the target using the provided values, regardless of their current values. Requests using the PUT method do not need to check the current attributes of the object.
POST To create a new object (like a sample), your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object. When you wish to create a new object, send a POST request to the target endpoint.
HEAD Finally, to retrieve metadata information, you should use the HEAD method to get the headers. This returns only the header of what would be returned with an associated GET request. Response headers contain some useful information about your API access and the results that are available for your request. For instance, the headers contain your current rate-limit value and the amount of time available until the limit resets. It also contains metrics about the total number of objects found, pagination information, and the total content length.
Users (/v1/users/)

A user represent an account in SaferWall service. By sending requests to the Users endpoint, you can list, update, or delete users.

Retrieve information about the all users.
API Key Required: Yes
Request Type: GET

Parameters
No Parameters.

Example Request
curl -H 'API-Key: EXAMPLE' https://api.saferwall.com/v1/users/

Example Response
								
{
  "items": [
    {
      "kathygordon": {
        "api_quota": 10,
        "bio": "I hack stuff.",
        "confirmed": false,
        "email": "hharrison@hotmail.com",
        "first_name": "Robert",
        "last_name": "Cain",
        "last_seen": 1497630586,
        "member_since": 842618537,
      }
    },
    {
      "michael08": {
        "api_quota": 10,
        "bio": "Hacking is not a crime.",
        "confirmed": true,
        "email": "qgibbs@lewis.com",
        "first_name": "Alexander",
        "last_name": "Mcfarland",
        "last_seen": 1497630585,
        "member_since": 196385200,
      }
    },
    {
      "roger01": {
        "api_quota": 10,
        "bio": "Malware enthusiast.",
        "confirmed": false,
        "email": "emejia@stewart.com",
        "first_name": "Anthony",
        "last_name": "Mcdonald",
        "last_seen": 1497630585,
        "member_since": 1462160404,
      }
    }
  ]
}
								
							

/v1/users/

Delete all users in your organization.
API Key Required: Yes
Request Type: DELETE

Example Request:
curl -X DELETE -H 'API-Key: EXAMPLE' https://api.saferwall.com/v1/users/

Parameters
No parameters.