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

Context

The POST /jobs endpoint of the Event Management API enables you to create an event by copying details from an existing event.

Procedure

Use the POST /jobs endpoint with "resourceType": "EVENT" and "actionName": "COPY" in the body to create a copy of an existing event.

Example:

POST {{runtime_URL}}/jobs?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite
At a minimum, the request body must contain the following elements:
  • 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"
}