Create or Delete Activity Relationships

Prev Next

Create or Delete Activity Relationships

/v1/activity_links

Maintain (create/delete) Relationships for Activities


Example for calling:

http://server/v1/activity_links

Request Body = {...} see Request Fields below

Allowed Methods:**

[POST]
API Controller: activity_link

Description:

Create/delete relationship is done in one single Web Service call with an indicator to specify Create or Update or Delete.

Parameters:

Name Type Description Notes
owner string Networks owner Optional Relates to "SafranWebApiOwnerVerificationDuringApiCalls" in Application Settings


Request Fields:

In addition to a few extra fields, the fields list are similar to "request fields" in activity_links.

Name Type Description Notes
RowID integer Sequential number used in the communication with the API,which identifies a row in this request that lines up with the response.
RowAction string Intruction for the API of which action to perform C = Create
D = Delete
prev_id integer Id for preceding activity
next_id integer Id for succeeding activity
network_id integer Network ID
link_type integer Constraint link type (possible values: FS, SF, FF, SS) 1 = SS
2 = SF
3 = FS
4 = FF
lag_time integer Lag time on the constraint activity link (unit of measure depends on calendar - could be days or hours for example) Optional
calendar integer Activity Link Calendar ID Optional
duration_format string Formatting unit for the lag_time field Optional
"weeks"
"days"
"hours"
"minutes"
"percent"
"undefined" - meaning the database value is null or 0
disabled boolean A field both in the Predecessors and Successors area of Logic Navigator and Links Panels, which allows to disable Links so they do not have an effect in the Activities linked Default value False


  • Specifying activities in "prev_id" and/or "next_id" which does not exists will result in Failure


Response Fields:

Table with responce for the constraints request:

Name Type Description Notes
RowID integer Corresponds to the RowID in the request.
Result string S(uccess) or F(ailure) indicating if the request action was successfully executed.
Message string Empty if success; error message if the requested action failed.
MessageId integer MesageID: Identified error message


Sample Create Activity Links and Response

Show Call sample
[
  {
    "RowId": 1,
    "RowAction": "C",
    "prev_id": 14,
    "next_id": 15,
    "network_id": 1,
    "link_type": 3,
    "lag_time": 3,
    "calendar": 1,
    "duration_format": "percent"
    },
  {
    "RowId": 2,
    "RowAction": "C",
    "prev_id": 12,
    "next_id": 15,
    "network_id": 1,
    "link_type": 3
    }
]


Show Response sample
[
  {
    "RowId": 1,
    "Result": "F",
    "Message": "Error Creating Activity Link: Activity Link already exists."
    },
  {
    "RowId": 2,
    "Result": "S"
    }
]