Retrieving the IDs of Events Created or Modified During a Specified Time Period by Using the Event Management API

This procedure describes how buyers using SAP Ariba Sourcing solutions can use the Event Management API to retrieve the list of event IDs, event template IDs, and parent project IDs of events created, modified, or both created and modified within a specified time period.

Prerequisites

Context

You can use the GET /events/identifiers endpoint along with the $filter query parameter to retrieve the list of event IDs (internalId), event template IDs, and parent project IDs (parentProjectId) for events created or modified or both created and modified in a given time period, which is specified in the $filter parameter of the query as date ranges in the Unix epoch time format.

Procedure

Use the GET /events/identifiers endpoint with the $filter query parameter to fetch the list of event IDs, event template IDs, and parent project IDs within a specified time period.

When You Want to Retrieve Events...

Send a Request with the $filterQuery Parameter...

Example

Created within a specified time period

$filter=(createDateFrom gt dateTime and createDateTo lt otherDateTime)

GET {{runtime_URL}}/events/identifiers?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite&$filter=(createDateFrom gt 1691677865000 and createDateTo lt 1691764282000)

Modified within a specified time period

$filter=(modificationDateFrom gt dateTime and modificationDateTo lt otherDateTime)

GET {{runtime_URL}}/events/identifiers?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite&$filter=(modificationDateFrom gt 1691677865000 and modificationDateTo lt 1691764282000)

Created and modified within specified time periods

$filter=((createDateFrom gt dateTime and createDateTo lt otherDateTime) and (modificationDateFrom gt dateTime and modificationDateTo lt otherDateTime))

GET {{runtime_URL}}/events/identifiers?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite&$filter=((createDateFrom gt 1691677865000 and createDateTo lt 1691764282000) and (modificationDateFrom gt 1691677865000 and modificationDateTo lt 1691764282000))
where,
  • dateTime is the start date and time stamp in milliseconds in the Unix epoch time format for created date (createDateFrom) or modified date (modificationDateFrom)

  • otherDateTime is the end date and time stamp in milliseconds in the Unix epoch time format for created date (createDateTo) or modified date (modificationDateTo)

Specify the following mandatory parameters:
  • user: It is the ID of the user for whom the Event Management API will perform the action.

  • passwordAdapter: It is the password for authenticating the user, such as PasswordAdapter1.

  • realm: It is your site name.

You can include the following optional query parameters:
  • $select: Specify attributes to return in the response. If no attribute is specified, all attributes are returned.

    You can specify a list of attributes, delimited by commas.

    Valid values: internalId (the event ID), parentProjectId, createDate, lastModified.

    Example: $select=internalId,createDate

  • $top: Specify the maximum number of events to return. For example, if $top=10 and the results set contains 100 records, the response will contain the first 10 records.

  • $skip: Specify the number of events to skip. If no number is specified, no events are skipped and the response starts with the first event.

    For example, if $top=10 and the results set contains 100 records, the response will contain the first 10 records. To retrieve the next set of records in the results set, submit a new query with $skip=10. For the following page, $skip=20 and so on. If $top=10 and $skip=30, the query directly loads the fourth page of results.

The Event Management API returns a list of event IDs (internalId), event template IDs, parent project IDs, created dates, and last modified dates for events occurring within the specified time period.

Example:

Events: {
    [
        {
          "title": "Test_Special character", 

          "description": "TDF İÇİN AÇIKLAMA", 

          "internalId": "Doc4838444560", 

          "currency": "USD", 

          "status": "Pending Selection", 

          "baseLanguage": "en", 

          "eventTypeName": "RFP", 

          "eventStateName": "PendingSelectionState", 

          "eventState": 6, 

          "owner": { 

          "uniqueName": "customersupportadmin", 

          "passwordAdapter": "PasswordAdapter1", 

          "name": "Customer Support Admin", 

          "isRecommended": false 

          }, 

          "requestId": "", 

          "documentVersion": 1, 

          "hasAward": false, 

          "eventOrigin": "0", 

          "templateProjectInternalId": "WS3066901272", 

          "templateEventInternalId": "Doc3067223575", 

          "regions": [ 

          { 

            "uniqueName": "TR", 

            "name": "Turkey" 

          } 

        ], 

        "departments": [], 

        "commodities": [], 

        "compositeEventStateName": "PendingSelectionState", 

        "parentProjectId": "WS4838444557", 

        "openDate": "2024-10-18T09:51:14.228+0000", 

        "closeDate": "2024-10-18T10:21:14.228+0000", 

        "timingMultiple": 30, 

        "timingUnit": 0, 

        "timingPublishType": 0, 

        "isTest": true, 

        "awardApprovalRequired": false, 

        "isVersionPinned": true, 

        "lastModified": "2024-10-18T10:21:14.346+0000", 

        "createDate": "2024-10-18T09:49:55.648+0000", 

        "isMulticurrencyEnabled": false, 

        "gbProjectUrl": "", 

        "buyerSystemID": "", 

        "autoPublish": false, 

        "webJumperURL": "https://aribasupportteam-T.sourcing.ariba.com/ad/webjumper?    enc=true&pl=%7B*ESD4%7DPwVK%2Bqh5T4rtKl1…, 

        "webJumperURLForSupplier": "https://aribasupportteam-T.supplier.ariba.com/ad/webjumper?itemID=AJsyAHSJQu6ZzIl&awcharset=UTF-8", 

        "availableExternalSystemIntegrationTypes": [], 

        "isSupplierAnonymizationActive": false, 

        "isManualInterventionActive": false, 

        "abacEnabled": false, 

        "externalIntegrationSupported": false, 

        "subProject": true 
        }
    ],
}  

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