ERP ContentServer Service REST interface
The ContentServer Service exposes parts of the ArchiveLink functionality via a REST interface for easy integration not only in SAP but also in other software. An online documentation of the REST service is available in any running ImageMaster installation at the URL:
Details about its usage and each supported resource can be found there [WS ERP REST]. Only a short overview is presented next.
Authentication and authorization
The following conditions apply:
-
Basic authentication is used (which requires HTTPS).
-
A permission on the web service operation “contentserver” is required.
-
Permissions on a specific content repository must be granted:
Using the REST service requires an ImageMaster user having the following dedicated permissions, which are assigned via an ImageMaster role:
-
execute permission to access the web service (web service operation “arlAccess”)
-
any or all of the permissions: create, read, update, delete or execute
This depends on which web service operations are planned to be used in the content repository. The needed permissions are listed below for each operation.
-
Document operations
In summary, the following document operations are supported. For more details see the online documentation:
-
GET https://<host>:<port>/rest/contentserver/status
Get status information of the content server and all available content repositories. The list of returned content repositories depends on the read permissions (on content repositories) of the authenticated user.
-
Required permissions:
-
read permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
-
GET https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}
Get an SAP document identified by content repository and SAP document ID.
-
This request supports additional REST query parameters (see online documentation). Via a query parameter optionally the file content can be obtained.
-
Required permissions:
-
read permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
-
POST https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}
Create an SAP document identified by content repository and SAP document ID.
-
This request supports additional REST body parameters (see online documentation). File attributes and file content data are specified via the body.
-
This request supports additional REST query parameters (see online documentation).
If via one of these additional parameters attributes are provided or if a target document type is specified, the ImageMaster license for “MetadataSync for ERP” (SAPMetadataService) is required!
-
Required permissions:
-
create permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
Conditionally required license: SAPMetadataService
-
-
POST https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}/move
The following cases with optional query parameters are supported:
-
Move from one document type to another. SAP docId and repository remain the same.
POST http://localhost/repositories/{contRep}/documents/{{docId}}/move?targetDocType=DocType
-
Move from one content repository to another. If the document type is not specified, however, original metadata will remain in the document unless metadata are provided in the request.
POST http://localhost/repositories/{contRep}/documents/{docId}/move?targetDocType=DocType&contRep={contRep}
If via one of these additional parameters attributes are provided or if a target document type is specified, the ImageMaster license for “MetadataSync for ERP” (SAPMetadataService) is required!
This request supports additional REST query parameters (see online documentation).
If via one of these additional parameters attributes are provided or if a target document type is specified, the ImageMaster license for “MetadataSync for ERP” (SAPMetadataService) is required!
-
Required permissions:
-
create permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
Conditionally required license: SAPMetadataService
-
-
POST http://localhost/repositories/{{contRep}}/documents/{docId}/copy?targetDocType=DocType&contRep=test&docId={docId}
Copy existing document partially or completely into new ImageMaster document. Original metadata will be copied to the new document unless new metadata are provided in the copy request.
If a new document type is specified in the request any metadata of the original document will not be moved automatically. Instead, metadata can be specified in the request similar to create request.
-
This request supports additional REST body parameters (see online documentation). File attributes and file content data are specified via the body.
If via one of these additional parameters attributes are provided or if a target document type is specified, the ImageMaster license for “MetadataSync for ERP” (SAPMetadataService) is required!
-
Required permissions:
-
create permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
Conditionally required license: SAPMetadataService
-
-
DELETE https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}
Delete an existing SAP document identified by content repository and SAP document ID.
-
Required permissions:
-
delete permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
-
PUT https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}/attributes
Update the attributes of an existing SAP document identified by content repository and SAP document ID.
-
The ImageMaster license for “MetadataSync for ERP” (SAPMetadataService) is required!
-
This request supports additional REST body parameters (see online documentation). The attributes to set are specified via the body.
-
Required permissions:
-
update permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required licenses:
-
ArchiveLinkContentServer
-
SAPMetadataService
-
-
Component operations
In summary, the following component operations are supported. For more details see the online documentation:
-
GET https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}/components/{compId}
Get a specific component of an SAP document in the given content repository with the given SAP document ID.
-
Required permissions:
-
read permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
-
POST https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}/components/{compId}
Create a new component in an SAP document in the given content repository with the given SAP document ID.
-
This request supports additional REST body parameters (see online documentation). File attributes and file content data are specified via the body.
-
Required permissions:
-
create permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
-
PUT https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}/components/{compId}
Update an existing component in an SAP document in the given content repository with the given SAP document ID.
-
This request supports additional REST body parameters (see online documentation). File attributes and file content data are specified via the body.
-
This request supports additional REST query parameters (see online documentation).
-
Required permissions:
-
update permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
-
DELETE https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}/components/{compId}
Delete a specific component of an SAP document in the given content repository with the given SAP document ID.
-
Required permissions:
-
delete permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
-
Required license: ArchiveLinkContentServer
-
Workflow operations
In summary, the following workflow operations are supported. For more details see the online documentation:
-
POST https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}/start/{key}
Start a new workflow for a document. The document must not have an active workflow. This method can start any of the deployed workflows. It does not check the workflow configuration.
-
This request supports additional REST body parameters (see online documentation). Process variables can be supplied for the started workflow to simulate user input into the workflow start form. The variable value must always be supplied as a JSON string regardless of the variable type. Conversion is performed at the server side.
-
Required permissions:
-
execute permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
execute permission on web service operation “workflow”
-
-
Required licenses:
-
ArchiveLinkContentServer
-
WorkflowService
-
-
-
POST https://<host>:<port>/rest/contentserver/repositories/{contRep}/documents/{docId}/signal/{signalName}
Deliver a signal to the workflow (or subworkflows) of the given document. There is no check to verify that the workflow is actually waiting for the signal. If the workflow is not waiting (or there is no workflow at all), the operation returns without performing any action.
-
Required permissions:
-
execute permission on specified content repository
-
execute permission on web service operation “arlAccess”
-
execute permission on web service operation “workflow”
-
-
Required licenses:
-
ArchiveLinkContentServer
-
WorkflowService
-
-