Web API
Reported by Greg Schueler | December 16th, 2010 @ 06:03 PM | 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 December 16th, 2010 @ 06:06 PM
This gist has WIP for proposed API documentation: https://gist.github.com/744366
-
Alex-SF December 29th, 2010 @ 05:47 PM
- Milestone changed from Rundeck 1.1 to Rundeck 1.2
- Milestone order changed from 24 to 0
-
Alex-SF January 20th, 2011 @ 04:21 PM
- Milestone cleared.
- Milestone order changed from 1 to 0
-
Alex-SF February 1st, 2011 @ 11:37 AM
- 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 February 1st, 2011 @ 11:51 AM
- Title changed from RESTful API to Web API
-
Greg Schueler February 1st, 2011 @ 11:53 AM
- Title changed from Web API to RESTful API
For "Project Info",
I propose changing to
/api/project/{project}
(singular /project) -
Greg Schueler February 1st, 2011 @ 11:57 AM
- Title changed from RESTful API to Web API
-
Greg Schueler February 4th, 2011 @ 02:49 PM
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 February 7th, 2011 @ 11:20 AM
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 February 14th, 2011 @ 11:42 AM
- Assigned user set to Greg Schueler
-
Alex-SF February 15th, 2011 @ 10:50 AM
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 February 15th, 2011 @ 02:14 PM
(from [cceca82bc7718048f33f185eadbe14e865c1194a]) Initial api version 1 support [#137] https://github.com/dtolabs/rundeck/commit/cceca82bc7718048f33f185ea...
-
Deleted User February 16th, 2011 @ 05:14 PM
(from [38525116c6e3d0a1ed755eea810a030c46736ce1]) Add status value to report events, update tests. [#137] https://github.com/dtolabs/rundeck/commit/38525116c6e3d0a1ed755eea8...
-
Greg Schueler February 25th, 2011 @ 11:17 AM
Added API endpoint /report/create to supplant use of Log4j for status reports.
-
Greg Schueler February 25th, 2011 @ 11:18 AM
- 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 March 4th, 2011 @ 11:34 AM
(from [3d716f1ee7892b97dd22bb04fcdf20a1b8952dda]) Fix ProjectSelectFilters to bypass logic for api requests [#137] https://github.com/dtolabs/rundeck/commit/3d716f1ee7892b97dd22bb04f...
-
Deleted User March 4th, 2011 @ 05:17 PM
(from [70de8dcae2d2eeb2bf7b714f78bc164c017cc26c]) Add /job/id/executions api [#137] https://github.com/dtolabs/rundeck/commit/70de8dcae2d2eeb2bf7b714f7...
-
Deleted User March 7th, 2011 @ 10:48 AM
(from [2f0591bfee769caee3f5da49c99e3107e21e47d1]) Add paging parameters to /job/id/executions [#137] https://github.com/dtolabs/rundeck/commit/2f0591bfee769caee3f5da49c...
-
victorpatrick December 13th, 2023 @ 12:35 AM
I'm closing this issue and moving the unmet problem requests—JSON format, RESTfulness, and API Key authentication—to future issues. tunnel rush
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...