Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Easy way to set/unset allowedConnection from API #580

Open
baszoetekouw opened this issue May 12, 2015 · 2 comments
Open

Easy way to set/unset allowedConnection from API #580

baszoetekouw opened this issue May 12, 2015 · 2 comments

Comments

@baszoetekouw
Copy link
Contributor

Using the current API, it is possible to change the list of allowedConnection/blockedConnections using a PUT request:

curl -k -u user:pass -H "Content-type: application/json" --data-binary '{ "allowedConnections": [ {"id": 2} ] }' -v -X PUT https://serviceregistry.test2.surfconext.nl/janus/app.php/api/connections/21.json

This works well, but only allows replacement of the entire list.

It would be convenient if there were a way to set or unset one specific entry in the allowedConnection/blockedConnections list. For example, introduce an endpoint

/api/connections/21/allowedConnections/
/api/connections/21/allowedConnections/17.json

That would allow easy operations like

curl -k -u user:pass -v -X DELETE https://serviceregistry.test2.surfconext.nl/janus/app.php/api/connections/21/allowedConnections/17.json

to remove an entry and

curl -k -u user:pass -v -X POST -H "Content-type: application/json" --data-binary ' {"id": 2}' https://serviceregistry.test2.surfconext.nl/janus/app.php/api/connections/21/allowedConnections/

to add an entry to the list.

@thijskh
Copy link
Contributor

thijskh commented May 12, 2015

This would certainly be useful.

@relaxnow
Copy link
Contributor

relaxnow commented Nov 3, 2015

Seems doable.

@thijskh thijskh removed their assignment Jul 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants