Web API
Reported by Greg Schueler | 2010-12-16 18:03:16 UTC | in Rundeck 1.2
RunDeck should provide a RESTful API for common data types and actions: Jobs, Executions, Resources, Events. Certain data types have different available actions.
The API should accept and return results in JSON and XML format.
The API should be authenticated using an API Key generated for a user. The API Key should be used in API Requests, instead of requiring a username and password. API Keys should be configurable when generated to provide read-only or read-write access to selected sets of data (certain data types, or by project).
In addition to common CRUD actions on Jobs, Resources, and Read actions on Executions, Events, there should be API endpoints for all actions provided by CLI tools: Execute Adhoc Job, List running executions, Execute Stored Job, Kill running execution.
As a secondary point, the API should supplant use of Log4j for submitting Events (e.g. from dispatch --noqueue).
Comments and changes to this ticket
-

Greg Schueler 2010-12-16 18:06:47 UTC
This gist has WIP for proposed API documentation: https://gist.github.com/744366
-

Alex-SF 2010-12-29 17:47:35 UTC
- Milestone changed from Rundeck 1.1 to Rundeck 1.2
- Milestone order changed from 24 to 0
-

Alex-SF 2011-01-20 16:21:00 UTC
- Milestone cleared.
- Milestone order changed from 1 to 0
-

Alex-SF 2011-02-01 11:37:45 UTC
- Milestone set to Rundeck 1.2
- Milestone order changed from 29 to 0
API proposal
Jobs
List jobs
- Proposed 1.2:
- Summary list: /api/jobs?project={project}
- Exporting:
/api/jobs/export?project={project}&format={format}
- Importing: POST /api/jobs/import?format={format} * (job content)
- Existing 1.1:
- Query rundeck jobs list for a project, optionally save the xml file
- Listing: "/menu/workflows.xml?projFilter={project}"
- Uploading: /scheduledExecution/upload
Run a job
- Proposed 1.2:
- /api/job/{jobId}/run
- Existing 1.1:
- How to run a job using curl
- Run job: "/scheduledExecution/runJobByName.xml?id={jobId}"
Job export
- Proposed 1.2:
- /api/job/{id}
Executions
Listing
- Proposed 1.2:
- /api/executions/running
- /api/executions/running
- Existing 1.1:
- Script to query queue list using curl
- Existing URL: "/menu/queueList.xml?id={jobId}"
Control
- Proposed 1.2:
- Show: /api/execution/{id}
- Stop: /api/execution/{id}/abort
- Run command: GET/POST /api/run/command?exec={commands}&project={project}
- Run script: POST /api/run/script?project={project} * (script content)
- Existing 1.1:
- Dispatch execution using curl
- Existing URL: "POST
/scheduledExecution/uploadAndExecute.xml"
Projects
Project listing
- Proposed 1.2:
- GET /api/projects
Project info
- Proposed 1.2:
- GET /api/projects/{project} (includes: description, resource model provider)
-

Alex-SF 2011-02-01 11:51:57 UTC
- Title changed from RESTful API to Web API
-

Greg Schueler 2011-02-01 11:53:05 UTC
- Title changed from Web API to RESTful API
For "Project Info",
I propose changing to
/api/project/{project}(singular /project) -

Greg Schueler 2011-02-01 11:57:50 UTC
- Title changed from RESTful API to Web API
-

-

-

-

-

Greg Schueler 2011-02-04 14:49:41 UTC
Addendum to protocol for accessing history content:
History listing
- Proposed 1.2:
- GET /api/history?project=x&title=z
- Support history content output in xml format, allowing filters available to RSS feed/history filter.
- GET /api/history?project=x&title=z
- Proposed 1.2:
-

Alex-SF 2011-02-07 11:20:12 UTC
Addendum to protocol for accessing resources content:
List resources for project
* GET /api/resources?project={project}&format=[yaml/xml]Adding support for filters would also be useful
* GET /api/resources?project={project}&includeTags={rexp}&includeNames={rexp}Get information for a resource
* GET /api/resource/{id}?project={project}&format=[yaml/xml]The delete and modify actions are not included at this time.
-

Greg Schueler 2011-02-14 11:42:35 UTC
- Assigned user set to Greg Schueler
-

Alex-SF 2011-02-15 10:50:56 UTC
Versioning scheme
- Opaque version identifiers making no implication to compatibility
- Use whole numbers for version identifiers inside the URL without the use of sub-version identifiers
-
Scheme:
/api/{version}/{resource}
Example: Version 1
/api/1/resources?project={project}Reference
-

Deleted User 2011-02-15 14:14:06 UTC
(from [cceca82bc7718048f33f185eadbe14e865c1194a]) Initial api version 1 support [#137] https://github.com/dtolabs/rundeck/commit/cceca82bc7718048f33f185ea...
-

Deleted User 2011-02-16 17:14:55 UTC
(from [38525116c6e3d0a1ed755eea810a030c46736ce1]) Add status value to report events, update tests. [#137] https://github.com/dtolabs/rundeck/commit/38525116c6e3d0a1ed755eea8...
-

Greg Schueler 2011-02-25 11:17:30 UTC
Added API endpoint /report/create to supplant use of Log4j for status reports.
-

Greg Schueler 2011-02-25 11:18:37 UTC
- State changed from new to resolved
Closing this issue, and pushing the unfulfilled issue request items to future issues, namely: JSON format, REST-fulness, API Key authentication.
-

Deleted User 2011-03-04 11:34:54 UTC
(from [3d716f1ee7892b97dd22bb04fcdf20a1b8952dda]) Fix ProjectSelectFilters to bypass logic for api requests [#137] https://github.com/dtolabs/rundeck/commit/3d716f1ee7892b97dd22bb04f...
-

Deleted User 2011-03-04 17:17:58 UTC
(from [70de8dcae2d2eeb2bf7b714f78bc164c017cc26c]) Add /job/id/executions api [#137] https://github.com/dtolabs/rundeck/commit/70de8dcae2d2eeb2bf7b714f7...
-

Deleted User 2011-03-07 10:48:49 UTC
(from [2f0591bfee769caee3f5da49c99e3107e21e47d1]) Add paging parameters to /job/id/executions [#137] https://github.com/dtolabs/rundeck/commit/2f0591bfee769caee3f5da49c...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues
People watching this ticket
Tags
Referenced by
-
182
Documented network API
See
RESTful api ticket
-
137
Web API
(from [cceca82bc7718048f33f185eadbe14e865c1194a])
Initial...
-
137
Web API
(from [38525116c6e3d0a1ed755eea810a030c46736ce1])
Add sta...
-
137
Web API
(from [3d716f1ee7892b97dd22bb04fcdf20a1b8952dda])
Fix Pro...
-
137
Web API
(from [70de8dcae2d2eeb2bf7b714f78bc164c017cc26c])
Add /jo...
-
137
Web API
(from [2f0591bfee769caee3f5da49c99e3107e21e47d1])
Add pag...