Skip to content

Change requests

Okke Harsta edited this page Feb 18, 2022 · 10 revisions

Change requests

In order to request changes there there are new endpoints to create, query or rejects change requests.

Create change request

Create a change request with a POST containing path-updates similar to the merge endpoint. The structure is flattened metaData, but can also top-level data attributes like entityid or allowedall.

POST: /manage/api/internal/change-requests
{
  "metaDataId" : "1",
  "type" : "saml20_sp",
  "pathUpdates" : {
    "allowedall": true,
    "metaDataFields.description:en" : "New description",
    "metaDataFields.name:nl" : "Nieuwe naam"
  },
  "auditData" : {
    "user" : "jdoe"
  }
}

The auditData part is required, but the value can be either urn, name, email etc.

Get all outstanding change requests

To retrieve all outstanding change requests for an entity you must specify the ID of the entity and the type of the entity as path parameters:

GET: /manage/api/internal/change-requests/saml20_sp/1
[
{
  "id" : "620f904ab451045ee60eda74",
  "metaDataId" : "1",
  "type" : "saml20_sp",
  "pathUpdates" : {
    "metaDataFields.description:en" : "New description",
    "metaDataFields.coin:application_url" : "https://nice"
  },
  "auditData" : {
    "user" : "jdoe",
    "userName" : "sp-portal",
    "apiUser" : true
  },
  "created" : "2022-02-18T12:25:46.032Z",
  "metaDataSummary" : {
    "organizationName" : "Organization name en",
    "name" : "OpenConext Valid SP",
    "entityid" : "Duis ad do",
    "state" : "testaccepted"
  }
}]

The metaDataSummary is used by the Manage GUI and can be ignored.

Reject

Rejecting a change request requires the ID of the change request, the ID of the entity and the type of the entity.

PUT: /manage/api/internal/change-requests/reject
{
   "id" : "620f904ab451045ee60eda74",
   "metaDataId": "1",
   "type": "saml20_sp"
}
Clone this wiki locally