Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Web API

#137

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).

Reported by Greg Schueler · December 16th, 2010 @ 06:03 PM

State: resolved
Milestone: Rundeck 1.2
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Greg Schueler
    Greg Schueler

    This gist has WIP for proposed API documentation: https://gist.github.com/744366

    December 16th, 2010 @ 06:06 PM

  2. Alex-SF
    Alex-SF
    • Milestone changed from Rundeck 1.1 to Rundeck 1.2
    • Milestone order changed from 24 to 0

    December 29th, 2010 @ 05:47 PM

  3. Alex-SF
    Alex-SF
    • Milestone cleared.
    • Milestone order changed from 1 to 0

    January 20th, 2011 @ 04:21 PM

  4. Alex-SF
    Alex-SF
    • 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:

    Run a job

    • Proposed 1.2:
      • /api/job/{jobId}/run
    • Existing 1.1:

    Job export

    • Proposed 1.2:
      • /api/job/{id}

    Executions

    Listing

    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:

    Projects

    Project listing

    • Proposed 1.2:
      • GET /api/projects

    Project info

    • Proposed 1.2:
      • GET /api/projects/{project} (includes: description, resource model provider)

    February 1st, 2011 @ 11:37 AM

  5. Alex-SF
    Alex-SF
    • Title changed from RESTful API to Web API

    February 1st, 2011 @ 11:51 AM

  6. Greg Schueler
    Greg Schueler
    • Title changed from Web API to RESTful API

    For "Project Info",

    I propose changing to /api/project/{project} (singular /project)

    February 1st, 2011 @ 11:53 AM

  7. Greg Schueler
    Greg Schueler
    • Title changed from RESTful API to Web API

    February 1st, 2011 @ 11:57 AM

  8. Deleted User
    Deleted User

    What happened to including a version in the URL?

    February 1st, 2011 @ 01:32 PM

  9. Alex-SF
    Alex-SF

    We were in favor of specifying it in the request header.

    February 1st, 2011 @ 01:34 PM

  10. Deleted User
    Deleted User

    Hmm...must have missed that conversation.

    February 1st, 2011 @ 01:38 PM

  11. Alex-SF
    Alex-SF

    We also talked about specifying it in the query params

    February 1st, 2011 @ 01:43 PM

  12. Greg Schueler
    Greg Schueler

    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.

    February 4th, 2011 @ 02:49 PM

  13. Alex-SF
    Alex-SF

    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.

    February 7th, 2011 @ 11:20 AM

  14. Greg Schueler
    Greg Schueler
    • Assigned user set to Greg Schueler

    February 14th, 2011 @ 11:42 AM

  15. Alex-SF
    Alex-SF

    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

    ^twitter api

    February 15th, 2011 @ 10:50 AM

  16. Deleted User
  17. Deleted User
  18. Greg Schueler
    Greg Schueler

    Added API endpoint /report/create to supplant use of Log4j for status reports.

    February 25th, 2011 @ 11:17 AM

  19. Greg Schueler
    Greg Schueler
    • 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.

    February 25th, 2011 @ 11:18 AM

  20. Deleted User
  21. Deleted User
  22. Deleted User

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.