Edit Event

Allows an event from the Workflow module to be updated.

 

URL

{WSUrl}/api/events/<EventCode>

 

REQUEST METHOD

PUT

 

URL PARAMETER

EventCode: This parameter is provided in the URL and does not need to be sent through PUT.

 

FORM CONTENT

Title (Optional): Name of the event to be updated in the Workflow module. Limit of 2,500 characters.

Description (Optional): Description of the event to be updated in the Workflow module. Limit of 5,500 characters.

Progress (Optional): The percentage of progress for the event. Valid values: from 0 to 100. This value can only be modified for open events.

Urgency (Optional): Urgency of the event to be updated in the Workflow module. Valid values: whole numbers between 1 and 5, with 1 (Very Low), 2 (Low), 3 (Medium), 4 (High), and 5 (Very High).

Relevance (Optional): Relevance of the event to be updated in the Workflow module. Valid values: whole numbers between 1 and 5, with 1 (Very Low), 2 (Low), 3 (Medium), 4 (High), and 5 (Very High).

Severity (Optional): Severity of the event to be updated in the Workflow module. Valid values: whole numbers between 1 and 5, with 1 (Very Low), 2 (Low), 3 (Medium), 4 (High), and 5 (Very High).

Status (Optional): Allows the status of the event to be changed. Valid values:

    0 – Cancels an event (once cancelled, its status and progress can no longer be edited);

    1 – Reopens a closed event;

    2 – Closes an event (once closed, its progress can no longer be edited but the event can be reopened).

Latitude (Optional; Required if the "Longitude" field is completed): Latitude of the event's location in the Workflow module. Valid values: from -90.0 to +90.0.

Longitude (Optional; Required if the "Latitude" field is completed): Longitude of the event's location in the Workflow module. Valid values: from -180.0 to +180.0.

GeolocationDescription (Optional): Description of the event’s geographic location in the Workflow module. Limit of 1,000 characters.

ExpectedStartDate (Optional): Expected start date for the event. Valid format: see Technical Orientations -> Valid Format for Date and Time Fields.

ExpectedEndDate (Optional): Expected end date for the event. Valid format: see Technical Orientations -> Valid Format for Date and Time Fields.

StartDate (Optional): Real start date for the event. Valid format: see Technical Orientations -> Valid Format for Date and Time Fields.

EndDate (Optional): Real end date for the event. Valid format: see Technical Orientations -> Valid Format for Date and Time Fields.

Deadline (Optional): Deadline set for the event. Valid format: see Technical Orientations -> Valid Format for Date and Time Fields.

Value (Optional): Numeric value for the event. Valid values: positive real numbers.

Notify (Optional): Notify users via e-mail when the event is updated. Valid values: true or false.

ParentEvent (Optional): Code of the parent event. Valid values: registered event codes. Limitations: the parent event cannot be the child of another event.

Coordinator (Optional): Coordinator assigned to event created. Valid format: {"Name": "Person name", "Type": "Person"} or {"Name": "Group name", "Type": "Group"}.

Responsible (Optional): Person or group assigned as responsible for event created. Valid format: {"Name": "Person name", "Type": "Person"} or {"Name": "Group name", "Type": "Group"}.

FirstReviewer (Optional): First reviewer assigned to the event. Valid format: {"Name": "Person name", "Type": "Person"} or {"Name": "Group name", "Type": "Group"}.

SecondReviewer (Optional): Second reviewer assigned to the event. Valid format: {"Name": "Person name", "Type": "Person"} or {"Name": "Group name", "Type": "Group"}.

ThirdReviewer (Optional): Third reviewer assigned to the event. Valid format: {"Name": "Person name", "Type": "Person"} or {"Name": "Group name", "Type": "Group"}.

Comment (Optional; Required if the "Progress" field is completed): Comment with the reason the event was updated.

CustomAttributes (Optional): List of objects with information on the event's attributes. Each attribute is referenced by its variable name.

EventType (Optional): Allows the event type to be edited. Note that risk and compliance events cannot have their type edited, and generic and custom events cannot have their type changed to risk or compliance events.

 

Note: The "null" value in CustomAttributes fields indicates that the inserted values will be deleted. In the other fields, the "null" value means that they will be ignored.

Note 2: Formula attributes are read only, and will be ignored if sent through the API.

 

REQUEST EXAMPLE

{WSUrl}/api/events/EVTC201105000052

 

FORM CONTENT EXAMPLES

Simply adds a comment:

{

"Comment" : "This event is highly important."
}

Changes the progress of the event to 90%:

{

"Progress" : 90,

"Comment" : "This event is nearly completed."
}

Changes the urgency of the event to 5 (Very High):

{

"Urgency" : 5,

"Comment" : "This event is very urgent."
}

Closes the event:

{

"Status" : 2,

"Comment" : "Problem solved."
}

Reopens the event:

{

"Status" : 1,

"Comment" : "The solution provided was insufficient."
}

Cancels the event:

{

"Status" : 0,

"Comment" : "Duplicated event."
}

Changes the event type:

{

"EventType" : "Generic Event"

}

Updates the custom attributes:

{

"CustomAttributes": {

"custom_text":"attribute content",

"custom_number":3.45,

"custom_singleselect":"option1",

"custom_multiselect":["a","c"],

"custom_datetime":"\/Date(1320334621000-0200)\/",

}

}

 

SUCCESS RESPONSE

HTTP status code 204: NoContent