Sending Requests

Also see:  

Using Windows PowerShell as a REST Client

URL Structure Request Examples

Supported Methods

  • The GET method retrieves object data, counters, and state information for the resources specified in the URI request structure. Optional parameters are generally provided as filters to fine-tune the amount of data returned in the response.
  • The POST method is used for two purposes:
    • To create a new resource in the server group. Properties of the resource are specified in the request body.
    • To execute an operation on an existing resource. The information pertaining to the operation is specified in the request body.
  • The PUT method is used to change properties of an existing resource in the server group. The specific resource must be specified in the request. The data to change is in the request body.
  • The DELETE method is used to remove existing resources in the server group. A specific resource or a group of resources can be deleted.
  • The OPTIONS method is used to return the methods available for the resource specified in the URI request structure. The request can contain query a specific resource or a group of resources.

Using the DataCore REST Support API

  • Your REST client or application will make an HTTP request and parse the response.
  • Two headers should be passed in every request:
    • First header is ServerHost and it is specifying the DataCore Server in the server group to connect to. The DataCore Server can be identified by full computer name or IP address. The ServerHost header identifies the server group from which data is requested.
      • Second header is Authorization and it is used to pass the credentials for the ServerHost. The usage is:
      • Basic UsernamePassword.
      • Replace Username and Password with a valid local user name and corresponding password. For example: Basic Administrator MyPassword1
    • The user name and password provided in the header should be identical to the credentials used to connect to the server group. If the computer running DataCore REST Support is "outside" the network of the server group that it is connecting to, then public IP addresses may be required for the connection. Proper name resolution to IP address is required.

  • The body of the client request should be in Java Script Object Notation (JSON) format. The body provides additional information for the requested resource.
  • The REST server responses are returned in JSON.
  • The time outputs  are shown in milliseconds (ms).