Create or Delete Activity Relationships
  • 17 Jul 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Create or Delete Activity Relationships

  • Dark
    Light
  • PDF

Article summary

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:

NameTypeDescriptionNotes
ownerstringNetworks ownerOptional 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.

NameTypeDescriptionNotes
RowIDintegerSequential number used in the communication with the API,which identifies a row in this request that lines up with the response.
RowActionstringIntruction for the API of which action to performC = Create
D = Delete
prev_idintegerId for preceding activity
next_idintegerId for succeeding activity
network_idintegerNetwork ID
link_typeintegerConstraint link type (possible values: FS, SF, FF, SS)1 = SS
2 = SF
3 = FS
4 = FF
lag_timeintegerLag time on the constraint activity link (unit of measure depends on calendar - could be days or hours for example)Optional
calendarintegerActivity Link Calendar IDOptional
duration_formatstringFormatting unit for the lag_time fieldOptional
"weeks"
"days"
"hours"
"minutes"
"percent"
"undefined" - meaning the database value is null or 0
disabledbooleanA 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 linkedDefault value False


Response Fields:

Table with responce for the constraints request:

NameTypeDescriptionNotes
RowIDintegerCorresponds to the RowID in the request.
ResultstringS(uccess) or F(ailure) indicating if the request action was successfully executed.
MessagestringEmpty if success; error message if the requested action failed.
MessageIdintegerMesageID: 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"
    }
]


Was this article helpful?

What's Next