Connect Solutions - REST API for SAP Solution Manager
Endpoints (REST API for SAP Solution Manager)
This chapter describes the available endpoints of the Connect Solution Manager addon. The base URL of the endpoints is composed of the protocol used (http or https), the hostname, the port and the service as follows:
http(s)://<sap_hostname>:<sap_port>/gal/solman/api/rest/1/
Information about the hostname and ports of your Solution Manager can be viewed via transaction SICF by selecting "Port Information" from the "Goto" menu.
The endpoints can also be passed through the Connect application. The effective endpoints would then essentially look like the following:
http(s)://<connect_hostname>:<connect_port>/repositories/<repository_name>/connections/<connection_name>/events/<event_name>.
Path and query parameters are passed as query parameters when calling web services via the Connect application. The query parameters must always be passed in the Camel Case format. For example, if the path parameter "object_id" exists for an SAP endpoint, this must be passed as the query parameter “objectId” via the Connect application.
Sample response for the "requests" node:
GET /data/external_ids/{external_id}
The GET /data/external_ids/{external_id} endpoint returns the same information as the GET /data/objects/{object_id} endpoint except that the object is determined based on the linked External ID.
GET /data/objects/{object_id}/children
This endpoint provides all associated linked objects based on an object ID, e.g., if the object ID corresponds to a change request ID, the endpoint provides information about the linked change documents.
The endpoint provides the following information in tabular form.
Name | Type | Description |
parentGuid | Value | Global unique ID of the object whose children were requested |
parentObjectId | Value | Object ID |
parentProcessType | Value | Document type |
totalChildren | Value | Number of child objects |
children | Array | List of child objects, see next section |
Tabular view of the information inside the "children" array.
Name | Type | Description |
guid | Value | Global unique ID |
objectId | Value | Object ID |
processType | Value | Document type |
description | Value | Short description |
userStatus | Value | Current status |
userStatusText | Value | Text of the current status |
userStatusFinal | Value | Flag ("X" = True, "" = False) indicating whether the current status can no longer be changed |
Sample Response:
GET /data/external_ids/{external_id}/children
This endpoint returns identical information as the GET /data/objects/{object_id}/children endpoint with the difference that the parent object is determined using the External ID.
GET /data/objects/{object_id}/action
This endpoint provides information of the available PPF actions of the action profile belonging to the object based on a specified object ID. In addition, the endpoint provides an indicator for each PPF action as to whether the action can be executed for the current status.
You can find the PPF actions in Customizing using transaction SPRO via the path “SAP Solution Manager -> Capabilities (Optional) -> Change Control Management -> Transactions -> Actions -> Change Actions and Conditions -> Define Action Profiles and Actions”. The action profile for ChaRM operations is usually as follows <Transaction Type>_ACTIONS, z. B. ZMCR_ACTIONS. Via the customizing path “SAP Solution Manager -> Capabilities (Optional) -> Change Control Management -> Transactions -> Actions -> Assign Action Profile to the Business Transaction Type” can additionally determine exactly what the action profile is for a particular transaction type.
The endpoint returns some information about the requested object ID and an array of PPF actions, which look like the following.
Name | Type | Description |
actions | Array | List of available object actions |
description | Value | Short description |
externalID | Value | External ID |
objectGuid | Value | Global unique ID |
objectId | Value | Oject ID |
processType | Value | Document type |
The elements of the "actions" array contain the following information about PPF actions.
Name | Type | Description |
guid | Value | Global unique ID of the PPF action |
ttype | Value | Name |
ttypedescr | Value | Short description |
context | Value | Action profile |
executable | Value | Flag indicating whether the PPF action can be executed for the current object status. The value "X" corresponds to "True" and the value "" corresponds to "False". |
Sample Response:
GET /data/external_ids/{external_id}/action
This endpoint returns the same information based on an External ID about PPF actions of a given object as the GET /data/objects/{object_id}/action endpoint.
GET /data/objects/search
This endpoint is used to search for objects in Solution Manager using predefined filter criteria.
The filter criteria are passed completely as query parameters for this endpoint. The following query parameters can be specified.
Name | Possible values | Description |
description | Any case-insensitive text. “*" and "%" can be used as replacement characters for pattern-based searches. | Object description |
only_active_status | "true" or "false" | Flag indicating whether only objects with a non-final status are to be returned. |
object_id | 10-digit object number. A pattern-based search is possible by specifying "*" or "%". | Object ID |
configuration_item | The configuration item as a string. A pattern-based search for the configuration item is not possible. | Configuration item |
product_id | The configuration item as a string. A pattern-based search for the configuration item is not possible. | Configuration item (alternative name) |
posting_date | Date in the form YYYY-MM-DD | Creation date |
object_type | The following fixed values are allowed: | Object type |
The response of the endpoint corresponds to the table below.
Name | Type | Description |
totalObjects | Value | Number of objects found |
objects | Array | Object list of the found objects |
The objects from the array "objects" contain the following values.
Name | Type | Description |
guid | Value | Global unique ID |
objectId | Value | Object ID |
processType | Value | Document type |
postingDate | Value | Creation date |
description | Value | Short description |
userStatus | Value | Current status |
userStatusText | Value | Display text of the current status |
userStatusFinal | Value | Flag ("X" = True, "" = False) indicating whether the current status can no longer be changed |
configItem | Value | Configuration item if the object is not a change cycle |
configItemText | Value | Configuration item description, if object is not a change cycle |
cycleId | Value | Object ID of the associated change cycle |
cycleText | Value | Description of the associated change cycle |
totalCycleConfigItems | Value | Number of assigned configuration items, if object is a change cycle |
cycleConfigItems | Array | List of assigned configuration items, if objects is a change cycle |
The items from the cycleConfigItems field correspond to the following format:
Name | Type | Description |
configItem | Value | Configuration item |
configItemText | Value | Description of the configuration item |
Sample Response:
POST /data
This endpoint can be used to create new objects in Solution Manager. The endpoint additionally accepts the query parameter "simulation" to simulate the creation of an object. To simulate the creation of an object, the parameter must be assigned either the value "True" or "X", e.g. "http(s)//: ... /data?simulation=True"
The request must contain at least one value for the transaction type via the "processType" property in order to create an object.
The following object values are currently supported if they are included in the request.
Configuration item
The configuration item or IBase component is a JSON object named "configurationItem" with properties "productId" for the configuration item and "textIbComp" for the description of the configuration item, where only the value for "productId" is relevant for creation or modification.
Custom fields
All custom fields that exist in the CRMD_CUSTOMER_H table and begin with either ZZ or YY can be passed when creating an object.
For example, if the custom field ZZEXTERNAL_URI should contain the URL of a linked Jira issue, the following can be passed in the request. Basically, the customFields field is an array but it can also be addressed as an object if only one custom field needs to be updated. If the one custom field is passed like an object, the technical field name must be specified in camel case, i.e. all lowercase except for characters after an underscore; these must be specified in uppercase, see example below.
If more custom fields need to be filled, the request should look like this.
Change cycle
When assigning a change cycle, either its ID or the description of the cycle can be passed via the JSON object "cycleInfo". The property "releaseCrmId" corresponds to the ID of the cycle and "projectTitle" corresponds to the description of the cycle.
If you want to assign a cycle with ID 8000000211 with description "Release 2022-3" to an object, you can supply either the ID or the description, provided that the description is unique.
Short description/title of the object
The short description or title of the object can be passed via the "description" property.
Desired start, Desired end, Due date
The date fields Desired start, Desired end or Due date can be passed via the properties "startDate", "endDate" and "dueDate". The date format corresponds to the pattern YYYY-MM-DD.
External ID
An External ID, such as a Jira Issue ID or a ServiceNow Incident ID, can be set using the "externalId" property.
Multiple External IDs
If the assignment of multiple external IDs is allowed for certain transaction types, a set of external IDs can be passed directly via the array property "externalIds".
Impact of a requirement, change or problem
The impact of a requirement, change or problem can be assigned via the "impact" property. Permissible values for the impact, can be found in table CRMC_SRQM_IMPACT.
Priority
The priority of the document can be assigned via the "priority" property. Permissible priority values can be looked up in table SCPRIO.
Urgency
The urgency of a document will be assigned via the "urgency" property. The CRMC_SRQM_URGENC table contains the allowed values of this field.
Long text
The long text of an object can be assigned with the "longtext" property. Since the associated text type depends on the transaction type and customer-specific text types may be used, a text type must be assigned in advance in the configuration of the add-on for each transaction type that is to be used as long text, see https://galileogroup.atlassian.net/wiki/spaces/CONNECTDOCEN/pages/712343577/REST+API+Configuration+REST+API+for+Solution+Manager#Default-text-objects-for-a-transaction-type .
Additional text objects
The "texts" array can be used to transfer further texts in addition to the long text via the web service. You must look up the required text IDs in Customizing for the "CRM_ORDERH" object beforehand.
Business Partner
Business partners relevant in the process can be assigned via the "partner" property. The property is an array with objects, whereby at least the partner function "partnerFct" and a search text "partnerLookup" must be specified for an object. The search text works in the same way as entering a partner in the web frontend of the Solution Manager and, for example, the number or the last name of the partner can be specified. It is also possible to implement customer-specific mapping rules for business partners.
Please note that the partner function depends on the transaction type. The available partner functions for a transaction type can be found in table AIC_PARTNER_FCT. In the following example, the role "Requester" is assigned to business partner 151 and the role "Change Manager" is assigned to business partner 102.
PUT/data/objects/{object_id}
This endpoint is used to update an object based on its object ID. Which values can be updated can be found in the previous chapter POST /data.
PUT/data/external_ids/{external_id}
This endpoint corresponds to the previous one with the difference that the object is addressed via its External ID. This endpoint can only be used if External IDs is always uniquely associated with a Solution Manager object.
POST /data/objects/{object_id}/action/{action_id}/execute
This endpoint can be used to trigger a status transition of an object. The path parameter object_id is the object ID of the object for which the status transition is to be executed and the path parameter action_id must be a valid PPF action name. A list of available PPF actions for an object is provided by the GET /data/objects/{object_id}/action endpoint.
If the action can be executed without errors, the object for which the action was executed is returned. The scheme here corresponds to the endpoint GET /data/objects/{object_id}.
POST /data/external_ids/{external_id}/action/{action_id}/execute
This endpoint works analogously to the previous one with the difference that the object is identified by the External ID.
Endpoint “Cycles”
Using the Cycles endpoint, information about change cycles can be retrieved from Solution Manager.
GET /cycles
This endpoint returns an array with the following information about all change cycles in the system. The return format is still used by another endpoint, which is why identical values are returned in different fields for change cycles. The response of the endpoint contains the following fields.
Name | Type | Description |
totalObjects | Value | Number of change cycles found |
objects | Array | List with details of the change cycles found |
The objects from the array "objects" contain the following values.
Name | Type | Description |
guid | Value | Global unique ID |
objectId | Value | Object ID |
processType | Value | Document type |
postingDate | Value | Creation date |
description | Value | Object description |
userStatus | Value | Current status |
userStatusText | Value | Display text of the current status |
userStatusFinal | Value | Flag ("X" = True, "" = False) indicating whether the current status can no longer be changed |
configItem | Value | Will not be filled at this endpoint! |
configItemText | Value | Will not be filled at this endpoint! |
cycleId | Value | Same as object ID |
cycleText | Value | Same as object description |
totalCycleConfigItems | Value | Number of assigned configuration items |
cycleConfigItems | Array | List of assigned configuration items |
The items from the cycleConfigItems field correspond to the following format:
Name | Type | Description |
configItem | Value | Configuration item |
configItemText | Value | Description of the configuration item. |
Sample Response:
GET /cycles/transaction_types/{transaction_type}
This endpoint returns all change cycles that may be used for a specific document type, e.g., SMCR. The response is structured identically to the response of the GET /cycles endpoint.
Endpoint “Partner”
Using the "Partner" endpoint, information on business partners can be retrieved from Solution Manager.
GET /data/partner?email={emailAddress)
This endpoint provides detailed information about a business partner based on the email address from Solution Manager in the "partner" return field.
Name | Type | Description |
number | Value | Business partner number |
guid | Value | GUID of the business partner |
firstname | Value | First name of the business partner |
lastname | Value | Last name of the business partner |
Value | E-mail address of the business partner | |
validFrom | Value | Valid-from date of the business partner |
validTo | Value | Valid-to date of the business partner |
Sample Response:
Endpoint “Ping”
The "Ping" endpoint is used to test connections.
GET /ping
This endpoint is mainly used for testing connections and returns the following information about the called SAP system and includes the following fields.
Name | Type | Description |
serverInfo | Object | Information on the SAP Server |
systemTime | Value | Current system time |
The object "serverInfo" contains the following information.
Name | Type | Description |
name | Value | Application Server Instance |
host | Value | Name of the host server |
serv | Value | Service |
msgtypes | Value | Services of the Application Server Instance |
hostadr | Value | Host IP address |
servno | Value | Port number of the service |
state | Value | Server status |
hostnamelong | Value | Host name |
hostaddrV4Str | Value | IPv4 address |
hostaddrV6Str | Value | IPv6 address |
sysservervice0 | Value | System Services Registered on Message Server |
sysservervice1 | Value | System Services Registered on Message Server |
sysservervice2 | Value | System Services Registered on Message Server |
sysservervice3 | Value | System Services Registered on Message Server |
Sample Response:
Endpoint “Tables”
Via this endpoint, contents of "any" SAP tables can be requested. However, the tables whose contents may be read must be specified beforehand via the configuration program /GAL/SM_API_CONFIG.
GET /tables/{table_name}
This endpoint is the basic endpoint to resolve contents of SAP tables. The endpoint has the following variations to specify up to 4 filter criteria. As a filter option only the check for equality or for a pattern is currently supported. If a pattern check is to be performed, the substitution characters "*" and "%" can be specified.
The following endpoint variants exist.
/tables/{table_name}/filter/column/{filter_column}/value/{filter_value} |
/tables/{table_name}/filter/column/{filter_column}/value/{filter_value}/column2/{filter_column2}/value2/{filter_value2} |
/tables/{table_name}/filter/column/{filter_column}/value/{filter_value}/column2/{filter_column2}/value2/{filter_value2}/column3/{filter_column3}/value3/{filter_value3} |
/tables/{table_name}/filter/column/{filter_column}/value/{filter_value}/column2/{filter_column2}/value2/{filter_value2}/column3/{filter_column3}/value3/{filter_value3}/column4/{filter_column4}/value4/{filter_value4} |
If the specified table exists and is allowed to be read via the endpoint, the return will contain the following two fields.
Name | Type | Description |
totalRecords | Value | Number of records read |
records | Array | Array of the read records, where the field names correspond to the column names of the table (in Camel Case) |
Sample Response:
The above example returns the field values of a table with the columns MANDT, PRODUCT_ID, CONFIG_ITEM, GXP_CLASS, PROCESS_TEAM and SCR_REVIEWER_DL.