Replace an activity link

put

/rest/ofscCore/v1/activities/{activityId}/linkedActivities/{linkedActivityId}/linkTypes/{linkType}

This operation creates or replaces a link between the specified activities.

Activity links define the correlation between two activities. If a link is created between two activities, it can define the following relations:

  • The sequence in which the activities are performed. The basic link types allowed are finish-to-start, start-to-start, simultaneous, and related.
  • The minimum and maximum intervals between sequential activities.
  • Whether the linked activities are performed by the same resource or different resources.

For multi-day activities, only the Related link type is applicable.

Request

Path Parameters
Body ()
Root Schema : Activity Link
Type: object
Title: Activity Link
The link represents the relation between two activities.
Show Source
  • Title: Alerts
    The bitmask of alert flags for the activity link. If the value returned is '0', then there are no alerts for the activity link.
  • Title: From Activity ID
    The identifier of the first linked activity.
  • Title: Link Type
    The link type specified in the request.
  • Title: Max Interval
    Minimum Value: 0
    Maximum Value: 65535
    The maximum time interval (in minutes) between subsequent linked activities, for the links that define the relative order of the activities.
  • Title: Min Interval
    Minimum Value: 0
    Maximum Value: 65535
    The minimum time interval (in minutes) between subsequent linked activities, for the links that define the relative order of the activities.
  • Title: To Activity ID
    The identifier of the second linked activity.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Activity Link
Type: object
Title: Activity Link
The link represents the relation between two activities.
Show Source
  • Title: Alerts
    The bitmask of alert flags for the activity link. If the value returned is '0', then there are no alerts for the activity link.
  • Title: From Activity ID
    The identifier of the first linked activity.
  • Title: Link Type
    The link type specified in the request.
  • Title: Max Interval
    Minimum Value: 0
    Maximum Value: 65535
    The maximum time interval (in minutes) between subsequent linked activities, for the links that define the relative order of the activities.
  • Title: Min Interval
    Minimum Value: 0
    Maximum Value: 65535
    The minimum time interval (in minutes) between subsequent linked activities, for the links that define the relative order of the activities.
  • Title: To Activity ID
    The identifier of the second linked activity.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

Examples

The following example shows how to replace an activity link by submitting a PUT request on the REST resource using cURL.

curl -X 'PUT' \
     -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
     -H 'Content-Type: application/json' \
     --data-binary '{
    "minIntervalValue": "10",
    "maxIntervalValue": "20"
}' \
     'https://<instance_name>.etadirect.com/rest/ofscCore/v1/activities/4225269/linkedActivities/4225270/linkTypes/start-after'

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx/1.2.7
Date: Fri, 18 Mar 2016 02:23:58 GMT
Content-Type: application/json; charset=utf-8
Connection: close

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
    "minIntervalValue": 10,
    "maxIntervalValue": 20,
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.etadirect.com/rest/ofscCore//v1/activities/4225269/linkedActivities/4225270/linkTypes/start-after"
        }
    ]
}
Back to Top