#39 ✓closed
Ben Hood

Add REST call to list repair actions for a pair

Reported by Ben Hood | 2010-09-28 08:48:31 UTC | in 0.8

The UI needs to

  • Show available repair options for an event/pair
  • Invoke a repair option and then show the result

So the way this will work is that

  • The client will be able to request a list of actions that can be invoked on a pair. This action can either be:
    • An RPC to the agent, in which case the each action will have these attributes:
      • Name - an identifier
      • Type - the type will be "rpc"
      • Action - a REST URL to the agent that has a mandatory entity id attribute
      • Method - the HTTP method for the action
    • An external link to a UI for more complicated repair actions. It has these attributes:
      • Name - see above
      • Type - "external"
      • Link - a link to the external application with the mandatory entity id attribute

The REST API should look like this:

Request:

GET /fastdiff-agent/pair/${pairId}/actions

Response (eg, after request to /fastdiff-agent/pair/PAIR-1/actions):
[

{"name":"Resend Source", "type":"rpc", "action":"/fastdiff-agent/pair/PAIR-1/action/foo/${id}", "method":"POST"},
{"name":"Console", "type":"external", "action":"http://someapp/entities/${id}"},

]

RPC Result:

{

"result":"success",
"output":"foo"

} {

"result":"error",
"output":"bar"

}

Comments and changes to this ticket

  • Ben Hood

    Ben Hood 2010-09-28 08:50:36 UTC

    • Title changed from “Add REST call to list repair actions for a participant” to “Add REST call to list repair actions for a pair”
  • Ben Hood

    Ben Hood 2010-09-28 08:50:53 UTC

    • Tag set to “repairs”
  • Ben Hood

    Ben Hood 2010-09-28 08:54:37 UTC

    • State changed from “new” to “open”
  • Ben Hood

    Ben Hood 2010-09-28 11:28:40 UTC

    I've added the Actions resource to the REST API and have regenerated the website - I've attached the Jekyll output to this ticket.

  • Ben Hood

    Ben Hood 2010-09-28 11:30:08 UTC

    Please also note that the site I generated has the colon stripped out of it - see #40

  • Ben Hood

    Ben Hood 2010-09-28 12:21:38 UTC

    For the 0.8 release we will only offer one action - resend and this will be hard coded. The reason for this is because there is a fair bit of config that we'd need to do to wire this in a dynamic sense. Issue #43 talks about having a scriptable config , which we'll implement, but for the initial release keeping it simple will do the trick.

  • Ben Hood

    Ben Hood 2010-09-28 18:09:37 UTC

    • State changed from “open” to “closed”

    I've hardcoded the resend action into the upstream participant -> hence closing this particular issue.

  • Jonathan Lister

    Jonathan Lister 2010-10-07 12:51:55 UTC

    • Milestone order changed from “3” to “0”

    Note:

    This endpoint is:

    diffa-agent/rest/actions/WEB-1
    

    Not:

    diffa-agent/rest/pair/WEB-1/actions
    

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A Real Time Differencing Tool.

Shared Ticket Bins

People watching this ticket

Tags

Referenced by

Pages