Can an org admin update org properties with the Edge management API?

Can the org admin call the Edge management API to update the properties of an organization:

http://docs.apigee.com/management/apis/put/organizations/%7Borg_name%7D

After trying it as an org admin, I can set some properties, such as:

  • features.devportalDisabled
  • features.devportalUrl

But to call it, you have to pass all properties, even those that the org admin is not allowed to change.

Should this API be restricted to sys admin only? Or, should the doc be updated to specify the list of properties that an org admin can set?

Stephen

0 1 198
1 REPLY 1

Good question!

If you're asking for opinions, I've got one...

It would be OK to allow the orgadmin to change properties.

But we'd need to document the properties available and their meanings.

I don't feel that it's an undue burden to require the orgadmin to also specify properties that cannot be changed - that's sort of RESTful, I guess. But it might be nicer to not require the orgadmin to POST those.

This is what is known as "partial PUT". Partial PUT has been the source of some controversy in the space. Some people (including Roy Fielding) feel that it violates the basic premise of REST. Other people feel that a simpler API results, when you allow Partial PUT. BUT: whatever the design, it's got to be sensible behavior whether you are orgadmin or sysadmin. Suppose you are orgadmin and you cannot change some properties. You do a POST of property1 and property2. Those properties get added to the existing set of properties.

Now, do the same action as sysadmin. What happens to the existing properties? do they get wiped out? is it still additive? If the latter, then how does a sysadmin ever remove property?