Creating an Event by Copying from an Existing Event with the Event Management API
This procedure describes how to use the Event Management API to create an event by copying from an existing event.
Prerequisites
-
To create an application and request access to use the SAP Ariba APIs relevant to this feature, you must have access to the SAP Ariba Developer Portal. For details refer to Steps to Start Using the SAP Ariba APIs in Help for the SAP Ariba Developer Portal.
-
All queries made to this API must be authenticated using OAuth authentication. For details refer to SAP Ariba Developer Portal Authentication in Help for the SAP Ariba Developer Portal.
Context
The POST /jobs endpoint of the Event Management API enables you to create an event by copying details from an existing event.
Procedure
Example:
POST {{runtime_URL}}/jobs?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite
-
title: Title (name) of the event
-
isTest: Specifies if this is a test project (Test Project header field)
Specify the ID of the event from which you want to copy details in the eventId element in the request body. For example, Doc28215943.
You can also specify the information that needs to be copied in the itemsToIncludeForCopy element. Valid values: all, teams, contents, suppliers, lineItems, questions, supplierBids.
Default value: all.
You can specify multiple values, delimited by commas.
Specify parentProjectId in the actionBody to copy an event under a parent project.
The values in the request ovewrite any values specified for baseLanguage, currency, region, department, and commodity header fields.
Use the following data model for the request body:
{
"resourceType": "EVENT",
"ids": {
"eventId": "Doc28215943"
},
"actionName": "COPY",
"actionBody": {
"title": "Sourcing_Project_Copy_event_job_1",
"description": "Sourcing_Project_Copy_event Testing",
"isTest": false,
"itemsToIncludeForCopy": [
"teams",
"contents",
"suppliers",
"supplierbids"
]
}
}
The Event Management API returns eventId of the new event.
For example:
{
"message": "Successfully copied an event",
"eventId": "Doc28588942"
}