Starting from version 1.20, YottaSnap service can be connected through clients with either REST or SOAP support. Tables below show the details of the API signature,
the arguments to be passed to the service, and the resulting values returned from the service. While API version 1.10 remains effective, we strongly encourage users to
upgrade to version 1.20 if possible.
Task |
Property |
Description |
Default |
UniqueId |
The unique ID assigned to you for your YottaSnap service. This property is mandatory.
|
N/A |
TargetUriString |
The full address to the web page to be snapshot. This property is mandatory.
By default YottaSnap does not care about the final Uri that
this TargetUriString brought it to. If there is a need to verify the final landed Uri, use any of these options:
EnableExactMatch, FinalUriStringPrefix and IgnoreQueryString.
Note: Uri ends with a slash "/" is considered a different address from Uri that does not end
with "/". For instance, http://www.beyotta.com is not the same as http://www.beyotta.com/.
|
N/A |
EnableExactMatch |
Ensure the final Uri that YottaSnap landed at is exactly the same as what had been specified in TargetUriString.
Do note that if this switch is set as true, addresses such as bit.ly or similar uri redirection services will not
work. Besides, YottaSnap will also ignore both the FinalUriStringPrefix and IgnoreQueryString options.
|
false |
FinalUriStringPrefix |
If a value is supplied, YottaSnap will verify if the final landed Uri starts with the given FinalUriStringPrefix.
It is considered "complete" if the verification is successful.
This option works only if the EnableExactMatch is set as false.
|
Empty |
IgnoreQueryString |
Ignore the querystring that was automatically attached to the final landed Uri.
For example, given a TargetUriString "http://www.yahoo.com", it may actually landed at "http://www.yahoo.com/?p=us".
Set this option to true and YottaSnap will treat both of them the "same".
This option works only if the EnableExactMatch is set as false and the FinalUriStringPrefix is empty.
|
false |
Browser (New) |
The browser that the engine uses to take the snapshot. Supported options: InternetExplorer [100], or Chromium [200].
|
IE |
MasterTimeout |
Timeout (in milliseconds) to be applied on the entire snapshot process. Supported range of values: 1000 to 150000.
|
30000 |
PageTimeout |
Timeout (in milliseconds) to be applied on the page loading. Supported range of values: 0 to 150000.
|
25000 |
PageDelay |
Delay (in milliseconds) to be applied once the page is loaded - this could be useful for sites tha are slow,
pages containing many images, or pages with flash contents that takes time to load. Supported range of values:
0 - 15000.
|
3000 |
SnapshotWidth |
Width of the image (in pixel) to be generated. Supported range of values: 128 - 16384.
Note: If the targetted page has a width smaller than the requested
width, width of the page will be used instead. This property has no effect if
SnapshotMode is set as AutoWidthAndHeight.
|
1024 |
SnapshotHeight |
Height of the image (in pixel) to be generated. Supported range of values: 128 - 16384.
Note: If the targetted page has a height shorter than the
requested height, height of the page will be used instead. This property has no effect if
SnapshotMode is set as AutoWidthAndHeight.
|
768 |
SnapshotFormat |
Output format of the snapshot image. Supported value: Jpeg [20], or Png [30].
|
Png |
SnapshotQuality |
Compression quality to be applied to the snapshot image. Supported range of values:
0 - 100.
Note: This property has no effect if SnapshotFormat is set as Png.
|
80 |
SnapshotMode |
The resizing mode of the snapshot, and the default mode is FixedWidthAndHeightRetainRatio.
Please refer to the Snapshot Modes section for more information.
|
- |
UpdateFrequency |
This property has no effect on any fresh new request and will only be referenced in
subsequent requests of the identical snapshot.
It is in fact a cache expiry check. The system performs a validity check by
comparing the date and time of the cached image against the UpdateFrequency value,
and retakes the snapshot if the cached image has expired.
For example, if there was a snapshot taken 1 hour ago, and a second request goes into the
system requesting for the same snapshot with an UpdateFrequency of 6 hours, the cached version
of the snapshot is served. However, if the value of UpdateFrequency is 20 minutes, the cached
snapshot is discarded and a refreshed version will be served instead.
Supported range of values: 5 - 43200 (minutes).
|
1440 |
EnablePostNotify |
Switch the notification method to POST instead of the default GET. Refer to NotifyUriString for more information.
|
false |
NotifyUriString |
This property allows YottaSnap to inform the requestor once the snapshot is ready. It is optional and
will only be enabled if it is supplied with a value.
By default the system generates a GET request to the specified address, but you may set it as POST by using
the EnablePostNotify switch. You may also add query strings to the address.
|
Empty |
TaskCredential |
This is optional. Specify null to this parameter if it is not relevant or not required.
|
Property |
Description |
Default |
EnterActionUriString |
Full address of the login page. This property is mandatory.
|
N/A |
EnterActionElementId |
ID of the DOM element (usually a button) on the login page that triggers the login action.
This property is mandatory.
|
N/A |
EnterFinalUriString |
Uri to the page after the login procedure. This property is optional, however it will
be set as EnterActionUriString if it is omitted.
|
- |
IgnoreQueryString |
Ignore the querystring that was automatically attached to the EnterFinalUriString.
|
false |
CredentialParameters |
A list of TaskCredentialParameters that encapsulates the information to be passed and applied
during the authentication process.
|
- |
ExitActionUriString |
Full address of the logout page. This property is optional.
|
Empty |
TaskCredentialParameter |
Property |
Description |
Default |
ParameterKey |
ID of the DOM element to be passed over for credential authentication. This property is mandatory.
|
N/A |
ParameterValue |
Value of the DOM element to be passed over for credential authentication. This property is mandatory.
|
N/A |
Once the request is submitted, YottaSnap responds to the requesting client by sending over the result wrapped in an SnapshotResult object.
SnapshotResult |
Property |
Description |
ServiceStatus |
The status of the request, which the value can be one of the followings:
- AccountInvalid [500] - The account is either invalid, suspended, or terminated.
- AccountInsufficientCredit [510] - This status is now deprecated.
- ArgumentCredentialParametersRequired [151] - One or more credential parameters are missing. This usually happens if a login URL is supplied without credential information attached.
- ArgumentInvalid [100] - One or more of the supplied arguments contained invalid value, or value of invalid format.
- ArgumentUniqueIdRequired [150] - The unique Id is missing.
- ArgumentOutOfRange [120] - Out-of-range value is detected in at least one of the supplied arguments.
- ProviderDBError [800] - Generic DB error. Contact us if you ever see this error.
- ProviderIOError [810] - Generic IO error. Contact us if you ever see this error.
- SnapshotCached [210] - The snapshot was cached and the UriString should contain the full address to this cached image.
- SnapshotQueued [200] - There is no cached image found or the cached image is due to be refreshed. The request is now in the processing queue.
- SnapshotSuspended [220] - The snapshot engine hit a road block while trying to capture the screen shot. In fact, the service has given up on the request after 5 failed tries.
- TargetUriInvalid [110] - The supplied TargetUriString is empty, invalid, or cannot be reached.
- Unknown [900] - There is an unexpected error somewhere.
|
TaskUniqueId |
This is a unique Id assigned to this particular snapshot request. You may use this Id to inquire the status of the snapshot.
|
UriString |
Full address to the snapshot image if the snapshot was cached. If this is a fresh new request
and the snapshot is not ready to be consumed, value of this property is blank (i.e. empty string).
|
CurrentIndex |
The current queue number of the request in the queue. The value of this property would only make sense if the snapshot is in Queued status.
|
TotalIndexes |
Total number of requests in the queue, which indicates all requests that are to be processed, including requests initiated by other users.
The value of this property would only make sense if the snapshot is in Queued status.
|