API/Services commands

From DreamHost
Jump to: navigation, search

Contents

Service Control commands

Any change to your account that requires some time to setup or cannot be accomplished immediately will run as a service. The services API allows you to check on the status of those services. When an API command needs to run a service, it will return a unique token to identify the service.

Related Commands

The following commands will return a "token" on success which can be used to check on the status.

Commands

services-progress

Use this command to get a status report on the job being scheduled. If the token is for a service that completed more than several days ago, it may return the error 'too_old'.

Required value:

token

Result:

success
status	scheduled	executed	finished
success	2010-01-15 14:47:05	2010-01-15 14:47:16	2010-01-15 14:47:17

  • scheduled is the time this command was added to the service queue.
  • executed is the time this command started running.
  • finished is the time this command finished.
  • status may be:
    • "waiting": this command has been scheduled to run, and is currently waiting its turn to run.
    • "running": this command is currently being executed
    • "success": this command completed, successfully
    • "failure": this command completed, unsuccessfully

Possible errors:

invalid_token
too_old

services-flvencoder

Launches the Flash Video converter on a video specified by a URL.

Required values:

url (full URL of a video or directory to convert)

Optional values:

dim (size of video in "400x300" format)
snap (number of seconds into the video to generate the preview at)
ab (audio bitrate)
ar (audio sample rate)
batch (set if you pass a path to a directory to convert all files)
quiet (only send one email for a batch conversion)
noemail (send no emails at all)

Returns a service queue token, usable with services-progress.

Personal tools