Retrieving Event Messages with the Event Management API

This procedure describes how to use the Event Management API to retrieve event messages from the Messages tab.

Prerequisites

Context

The GET /events/{eventId}/messages endpoint of the Event Management API enables you to retrieve event messages from the Messages tab.

Procedure

  1. Use one of the following methods to obtain the ID of the event for which you want to retrieve message details.
    • If the event was created using the POST /events endpoint, use the internalId in the response as the event ID.

    • If the event was created from a sourcing request received from an external system, use the GET /events endpoint and specify the RFQ ID sent by the external system (the RequestID sent in the cXML QuoteRequest) as the externalSystemCorrelationId query parameter value. Use the internalId in the response as the event ID.

    • View the event ID in the user interface:

      • The classic SAP Ariba Sourcing user interface shows the event ID below the Overview tab, in the ID field.

      • The guided sourcing user interface shows the event ID in the upper left corner of the event page, below the event name.

  2. Use the GET /events/{eventId}/messages endpoint to retrieve event messages.

    Example:

    GET {{runtime_URL}}/events/DOC4567/messages?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite

    You can specify the locale in which you want the response to return. For more information, refer to About Setting Locale for Event Management API Responses.

    You can paginate responses to manage the display of information returned. For more information, refer to About Paginating Event Management API Responses.

    The Event Management API returns message details for the event. The response includes the following information:
    • participants: Participants in the bidding process who are the message recipients

    • teamGroups: Team groups selected while sending the message

    • teamUsers: Message recipients who are users in a team

    • actionName: Action indicating the type of the system message

    • recipientGroup: Recipient group selected while sending the message

    For example:

    {
        [
            ...,
            {
                "messageId": "MSG3147976",
                "subject": "Doc28345854 - test_0425_1",
                "attachments": [
                    {
                        "id": "AAAKAH42PsY02",
                        "fileName": "image114.png",
                        "contentType": "application/octet-stream",
                        "size": 390749
                    }
                ],
                "createDate": "2022-04-25T08:00:49.074+0000",
                "hasRead": true,
                "canReply": true,
                "canDelete": true,
                "labels": [],
                "from": {
                    "uniqueName": "customersupportadmin",
                    "passwordAdapter": "PasswordAdapter1",
                    "name": "Customer Support Admin",
                    "emailAddress": "aribadocusign@yahoo.com",
                    "organization": "Minerva-NONSM-NONEDS",
                    "orgANId": "AN02000670505",
                    "orgName": "Minerva-NONSM-NONEDS",
                    "timeZoneID": "US/Pacific",
                    "localeID": "en",
                    "isRecommended": false
                },
                "participants": [],
                "teamGroups": [],
                "teamUsers": [],
                "actionName": "rfx.message.create",
                "recipientGroup": "Participants"
            },
            ...
        ]
    }
    					

    To troubleshoot your queries to the Event Management API, refer to Error Messages Returned by the Event Management API.