Symptom
When attempting to retrieve the dictionary or glossary items for the published revision of a model from the API, the dictionary or glossary items being returned are from the latest revision of the model.
The parameter signavio-rev-mode with the value PUBLISHED is being used in the call.
The API endpoint used is {baseUrl}/spm/v1/model/<id>/glossary?signavio-rev-mode=PUBLISHED
Cause
As stated in the Help Documentation:
"All endpoints that take the ID of a model or dictionary entry as a parameter by default include information about the latest revision (also called head revision) of the object in the response.
To retrieve information about the published revision for these endpoints, you can add the parameter signavio-rev-mode with the value PUBLISHED to the request."
When using the endpoint /model/<id>/glossary, the objects being returned are dictionary or glossary items, not models, using signavio-rev-mode=PUBLISHED returns the published revisions of the glossary item's associated with the latest revision of the model, not the published revision of the model.
Resolution
At the time of writing this, there is no single call that will return the dictionary or glossary items of the published revision of a model.
To obtain the required information, 2 API calls would be required.
The 1st API call is to find out and store the revision ID of the published version of the model:
GET /model/<id>/info and store the value that is returned for "granted_revision" (granted_revision will be returned as "revision/ad49104e0645643765476c24bd47ce4")
E.g. GET https://api.eu.signavio.cloud.sap/spm/v1/model/<id>/info
The 2nd API call uses the /revision/<revision ID>/glossary endpoint to obtain dictionary or glossary information only relating to the specific revision, in this case, the published revision:
GET <granted_revision>/glossary
E.g. GET https://api.eu.signavio.cloud.sap/spm/v1/revision/<revisionID>/glossary
See Also
SAP Signavio Process Manager API Guide | SAP Help Portal
Overview | SAP Signavio Process Manager | SAP Business Accelerator Hub
Keywords
API, SAP Signavio Process Manager, SPM, Process Manager, signavio-rev-mode, PUBLISHED, glossary, dictionary, soe, published revision , KBA , BPI-SIG-CA-API , REST-API for SAP Signavio , BPI-SIG-PM-DIC , Dictionary for SAP Signavio Process Manager , How To
SAP Knowledge Base Article - Public