GET /api/jobs/limit/20 - get records first 20 jobs.
-GET /jobs/8 - get records only for job with jobid equal 8.
+GET /api/jobs/8 - get records only for job with jobid equal 8.
+
+GET /api/jobs/tasks/ - get job names for all directors
+
+GET /api/jobs/tasks/type/B - get backup job names
+
+GET /api/jobs/tasks/type/R/limit/5 - get first 5 restore job names
+
+GET /api/jobs/recent/myjob/client/myclient-fd/filesetid/62/ - get most
+recent job identifiers for job "myjob", client "myclient-fd" and fileset
+with filesetid 62
+
+GET /api/jobs/recent/myjob/clientid/31/filesetid/62/ - get most
+recent job identifiers for job "myjob", client with clientid 21 and fileset
+with filesetid 62
POST /jobs/estimate/ - call estimate action on a job.
* - required field
\end{verbatim}
-POST /jobs/run/ - call run action on job (run job).
+POST /api/jobs/run/ - call run action on job (run job).
\begin{verbatim}
+-----------------------------------------------------------------------------+
* - required field
\end{verbatim}
-POST /jobs/restore/ - call restore action.
+POST /api/jobs/restore/ - call restore action.
\begin{verbatim}
+-----------------------------------------------------------------------------+
| create[rpath] * | string | Bvfs temporary table name for restore purpose |
| | | in form: b2[0-9]+ |
+-------------------+---------+-----------------------------------------------+
-| create[fileset] * | string | FileSet resource name |
-| | | |
-+-------------------+---------+-----------------------------------------------+
| create[clientid] *| integer | Client identifier |
| | | (used instead of client name) |
+-------------------+---------+-----------------------------------------------+
| | | - ifnewer |
| | | - always |
+-------------------+---------+-----------------------------------------------+
+| create[restorejob]| string | Restore job name |
+| * | | |
++-------------------+---------+-----------------------------------------------+
* - required field
\end{verbatim}
-DELETE /jobs/8 - delete by bconsole job with jobid equal 8.\\
+DELETE /api/jobs/8 - delete by bconsole job with jobid equal 8.\\
Errors:
+-----------------------------------------------------------------------------+
| /api/bvfs/restore/ POST request |
+-------------------+---------+-----------------------------------------------+
-| Name | Type | Description |
+| Name | Type | Description |
+-------------------+---------+-----------------------------------------------+
| create[jobids] * | string | job identifiers comma separated |
| | | |
1000 - Internal error.
+\subsection{Config}
+
+To configure the Bacula resources is used request in the following URL form:\\
+
+PUT /api/config/COMPONENT\_TYPE/RESOURCE\_TYPE/RESOURCE\_NAME
+
+\begin{itemize}
+\item COMPONENT\_TYPE: dir for Director, sd for Storage Daemon, fd for
+ File Daemon and bcons for Consoles
+\item RESOURCE\_TYPE: Job, Client, Pool, Messages, Schedule, Storage...etc.
+\item RESOURCE\_NAME: Resource name from 'Name' resource directive like
+ 'My Client 123', 'Device-01', 'Pool-Incremental-2' ...etc.
+\end{itemize}
+
+Example config URLs:\\
+
+PUT /api/config/dir/Client/myclient-fd - editing client 'myclient-fd'. If
+ the Client doesn't exist, it is created in config.
+
+PUT /api/config/sd/Device/Drive-01 - editing device 'Drive-01'. If
+ the Device doesn't exist, it is created in config.
+
+\begin{verbatim}
++-----------------------------------------------------------------------------+
+| /api/config/component_type/resource_type/resource_name/ PUT request |
++-------------------+---------+-----------------------------------------------+
+| Name | Type | Description |
++-------------------+---------+-----------------------------------------------+
+| update[config] * | string | Bacula config in JSON format. |
+| | (JSON) | |
+| | | In versions lower than 9.0.6 instead of JSON |
+| | | string there was used serialized associative |
+| | | PHP array |
++-------------------+---------+-----------------------------------------------+
+
+* - required field
+\end{verbatim}
+
+Example cURL commands to test:
+
+\begin{verbatim}
+curl -X PUT -d update["config"]='{"AutoPrune":false,"Catalog":"MyCatalog",
+"FdPort":9102,"MaximumConcurrentJobs":5,"Name":"easystar-fd","Address":
+"172.16.10.12","Password":"mypass"}'
+ http://user:pass@apihost:9096/api/config/dir/Client/easystar-fd
+
+curl -X PUT -d update["config"]='{"RemovableMedia":true,"RandomAccess":false,
+"AutomaticMount":true,"AlwaysOpen":true,"OfflineOnUnmount":true,"DeviceType":
+"Tape","Name":"TapeDrive","MediaType":"LTO5","ArchiveDevice":"/dev/nst0",
+"SpoolDirectory":"/mnt/backup","MaximumOpenWait":300}'
+ http://user:pass@apihost:9096/api/config/sd/Device/TapeDrive
+\end{verbatim}
+
\section{Installation from the Source Tar File}
You may also install Baculum from the source bacula-gui tar archive.