- Print
- DarkLight
- PDF
Patch Activity
/v1/activities
Maintain Activities
Example for calling:
http://server/v1/activities
http://server/v1/activities?owner=safransa
Request Body = {….} see request fields below
Allowed Methods:
[PATCH]
API Controller: activities
Description:
Update single activity with the details provided, all other details remains as is. The activity must be present as must the resource which are to be patched. Should activity id be missing API will attempt to identify the activity using the activity name. API will only allow to patch one activity per call, it will accept to patch 0, 1 or many resources for the activity.
Parameters:
Name | Type | Description | Notes |
---|---|---|---|
owner | string | Owner of the calendar set | Relates to "SafranWebApiOwnerVerificationDuringApiCalls" in Application Settings |
Request Fields:
Name | Type | Description | Notes |
---|---|---|---|
create_activities | create_activity[] | Collection of details for one activity to be patch | Head element not specified – see example.Same structure as POST Create, Update or Delete activity |
- create_activites are reused in this PATCH API as found in the POST API, however the following elements are not used in this API:
- ActivityAction
- UpdateIfExists
- ActivityRowID is mandatory
- network id are mandatory, as are either activity id and activity name, unless item_guid is provided.
- The item guid takes priority over network id, activit id and activity name.
- When patching resources
- ResourceRowID is mandatory.
- If Resource ID is NULL the solution will attempt to add a new resource record.
- The resource_def_id must be given and refers to the ID of the Resources
- When Resource ID has a valid value, the solution will update the existing resource record.
- When patching activities text, system will first attempt to update existing text, if text is missing it will be added. If provided text is empty the text in system will be removed.
- Patching the "current_progress"
- Patching the "current_progress"of the "activitiy", will also update the "current_progress" of the "resources" related to that "activity".
- Patching the "current_progress" of one or more "resources", will take priority over the value from "current_progress" of the "activitiy".
- Notice, performing the action "Set Status" within the Safran system, will recalculate the "current_progress" values for the activity and they might change as a result.
- Patching the following fields is not permitted:
- The "item_guid" field.
- Current date fields:
- current_early_start_actual (CESA),
- current_early_start (CES),
- current_early_finish (CEF)
- Live date fields:
- early_start_analyzed (ESA),
- early_start (ES),
- early_finish (EF)
- Baseline date fields:
- baseline_early_start_analyzed (BESA),
- baseline_early_start (BES),
- baseline_early_finish (BEF)
- Scheduled date fields:
- early_start_actual_scheduled (ESAS)
- early_start_scheduled (ESS)
- early_finish_scheduled (EFS)
- Forecast date fields:
- forecast_duration (FCDU)
- forecast_early_finish (FCEF)
- forecast_plan_early_start_actual (FCESA)
- Revised date fields:
- rev_frontline_date (REV_FRONTLINE_DATE)
- revised_planned_prog (REVISED_PLANNED_PROG)
- revised_scope (REV_SCOPE)
- Late date fields:
- baseline_late_finish (BLF)
- baseline_late_start (BLS)
- current_late_finish (CLF)
- current_late_start (CLS)
- late_finish (LF)
- late_start (LS)
- original_late_finish (OLF)
- original_late_start (OLS)
- revised_plan_late_finish (RLF)
- revised_plan_late_start (RLS)
Response Fields:
The response fields are similar to what is found for API Create, Update or Delete activity.
Show Call Sample
[ {
"ActivityRowId": 1,
"id": 14,
"name": "Paint railing",
"network_id": 13,
"uf_ref2": {
"_short": "KS"
},
"create_resources": [
{
"ResourceRowID": 1,
"id": 2,
"qty": 3,
"current_progress": 10.5,
"actual_qty": 9.9,
"cost": 3.33,
"ext_seq": 1234
},
{
"ResourceRowID": 2,
"id": 3,
"qty": 4
},
{
"ResourceRowID": 3,
"Resource_Def_ID": 1,
"id": null,
"qty": 3,
"current_progress": 10.5,
"actual_qty": 9.9,
"cost": 3.33,
"ext_seq": 1234
}
]
}
]
Show Response Sample
[
{
"ActivityId": 14,
"ActivityName": "Paint railing",
"Create_Resource_Responses": [
{
"ResourceId": 2,
"RowId": 1,
"Result": "S"
},
{
"ResourceId": 3,
"RowId": 2,
"Result": "S"
},
{
"ResourceId": 4,
"RowId": 3,
"Result": "S"
}
],
"RowId": 1,
"Result": "S"
}
]