REST HTTP Software Development Kit (SDK):
The Null FTP Server REST HTTP SDK was built to give your application full control of the Null FTP Server. In fact the Null FTP Administrator was built fully with the Null FTP REST HTTP SDK.
The Null FTP Server REST HTTP SDK is built on top of HTTP/S and works by simply passing HTTP/S requests to the server's administrative access point. All requests operate on resources which are XML representations of server objects.
You can access the Null FTP REST HTTP SDK reference here
Adding or updating a resource:
To add or update a resource, the following HTTP method is used:
PUT /%resource-type-name%/%resource-name%
<Resource>%resource-representation-XML%</Resource>
- %resource-type-name% is one of the resource types described in the documentation, such as “users”, “accesspoints”, “virtualdirectories”, etc;
- %resource-name% is a specific resource name – user name, access point name, etc;
- %resource-representation-XML% is a resource type specific XML containing data for the resource to be added.
If the specified resource already exists, it will be updated, otherwise it will be added.
To rename a resource, specify the URL to the old resource and add a <Name>resource new name</Name> tag to the resource representation XML.
Other than for renaming, the “Name” tag can be omitted when adding / updating a resource.
Setting all resources at once
To set all resources with a single call, specify an empty resource name and put all the resources as a sequence of elements. This will remove any existing resources and replace them with the newly specified ones.
Retrieving a resource
To retrieve the resource, the following HTTP method can be used:
GET /%resource-type-name%/%resource-name%
- %resource-name% can be empty, in which case will all available resources of this type will be retrieved.
The response is one or several resource XMLs as follows:
<Response>
<Resource>%resource-representation-XML%</Resource>
<Resource>%resource-representation-XML%</Resource>
………
</Response>
Deleting a resource
To delete a resource, use the HTTP DELETE method:
DELETE /%resource-type-name%/%resource-name%
Controlling a resource
To control a resource state, such as starting or stopping an access point, the POST method is used:
POST /%resource-type-name%/%resource-name%?parameter1=value1¶meter2=value2…
Where parameter / value pairs specify resource type specific commands.
|