12. REST APIs For Developers (BETA)

These APIs are marked as BETA for feedback. We may not be able to keep backward compatibility until it is officially released.

This chapter describes the REST API calls that can be used with MetaDefender Vault. Through the Application’s Interface, any 3rd party application can interact and communicate directly with MetaDefender Vault. This allows you to add MetaDefender Vault to your automated workflow. Each call should include an authentication token or user credentials (username and password) or use API Tokens.

About this REST API

The exposed endpoint is located by default at http://localhost:8000/vault_rest/ (i.e. for 1. Initialize Group Transfer the endpoint is http://localhost:8000/vault_rest/transfer).

All endpoints require you to provide the Authorization header. The value for this header should be obtained by calling Request An Authentication Token. Please note that an authentication token has a limited lifetime and it should be refreshed to avoid expiration policy.

This value can be changed from the configuration file by following these steps:

  1. Go to the installation directory (by default C:\Program Files\OPSWAT\MetaDefender Vault)

  2. Navigate to the Services folder

  3. Open the file called pp.sft.rest.service.exe.config using administrative privileges

  4. Edit the following section of the configuration file as you wish:

    <setting name="RestHostAddress" serializeAs="String">
    <value>http://{computer_name}:8000/vault_rest</value>
    </setting>

    Note: {computer_name} is a placeholder that will be dynamically replaced at run time with the corresponding value(i.e the name of the computer as seen on the network).

  5. Here we have specified that the REST API should be starting on localhost and port 8000.

  6. Restart MetaDefender Vault REST Service (vaultREST) for changes to apply.