James Bromberger > Net-Dynect-REST-0.09 > Net::Dynect::REST::info

Download:
Net-Dynect-REST-0.09.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Source  

NAME ^

Net::Dynect::REST::info - Information about the Net::Dynect::REST modules

DESCRIPTION ^

The Net::Dynect::REST, Net::Dynect::REST::Request and Net::Dynect::REST::Response implemnt a basic framework for the sending and recieving of queries to Dynect. While you're free to use that, a more polished API exists to permit you to deal with objects. This more polished API is an implementation of the (majority of) the Dynect REST API.

The modules that can be used correspond to the documentation of the REST API:

In addition, the following classes exist:

IMPLEMENTATION OVERVIEW ^

The basic idea to interact is:

1. Get an Auth Token by establishing a Session object. This happens when you call Net::Dynect::REST with sufficient authentication parameters. You can expore the session by looking at your object's session() method. See Net::Dynect::REST::Session.
2. Perform any other requests you want, using this Auth Token (handled transparently by this Perl implementation). Eachof the abstractions need to be passed the Net::Dynect::REST object which should have your session established.
3. Save any changes in your objects so they are ready to publish. Generally this is the save() method on each object.
4. Commit those changes by publishing the corresponding Zone. This will increment the zone serial according to the update style chosen automatically.
5. Logout using the logout() method on the Net::Dynect::REST object.

For example:

 my $dynect = Net::Dynect::REST->new(user_name => 'me', customer_name => 'myco', password => 'mysecret');
 my $zone = Net::Dynect::REST::Zone->new(connection => $dynect, zone => 'example.com');
 my $new_address = Net::Dynect::REST::ARecord->new(connection => $dynect, zone => 'example.com', fqdn => 'www.example.com', rdata => { address => '1.2.3.4' } );
 $new_address->save;
 $zone->publish;
 $dynect->logout;

JOBS ^

Every Request that is submitted (except one type, see later) is assigned a unique Job ID. You can fetch that by looking at the Request Objects job_id() method. If you wish to get the resquest's response again, you can call the Net::Dynect::REST::Job function with the relevant Job ID - it is thi call to /REST/Job/ that will not have a unique JobID, but the Job ID of the original request. This is useful for long running jobs - the client can disconnect (with its Job ID) and check back later for the eventual return data.

SEE ALSO ^

Net::Dynect::REST, Net::Dynect::Request, Net::Dynect::Response.

AUTHOR ^

James Bromberger, james@rcpt.to.

syntax highlighting: