Idea ID: 2809684

REST Driver Publisher Enhancements

Status : New Idea
11 months ago

REST Publisher enhancements:

1. Specification

The REST publisher API should have a Swagger/ OpenAPI specification.It seems to me the current PUT/ modify syntax is difficult to describe with Swagger, therefore it might be better to change it:

Current PUT payload according to docs:

{"Title":[{"add":["Manager"]}]}

New approach:

{"name":"Title",

  [ 

    {"operation":"add",

    "values":["Manager"]},

    {"operation":"remove",

    "values":["Consultant"]}

  ]

}

It would make sense to also support the "operation":"replace" (replaceAllValues).

2. HTTP Methods

- HTTP PATCH is recommended for the kind of modify operation (add/remove attribute dedicated values) that we currently support for PUT

- HTTP PUT is recommended for an object "replacement", i.e. the kind of modify operation we are currently supporting with POST on an existing object

3. HTTP Return Codes

More control on HTTP return codes, we can't set the codes at all in the current driver version

4. Publisher URL

It would be great to have more flexibility regarding the URL, e.g. a mapping from "/sfum/users/v1" to "/User"