Create an activity link
post
/rest/ofscCore/v1/activities/{activityId}/linkedActivities
This operation creates a link for the specified activity.
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.
Request
Path Parameters
-
activityId(required): string
The unique identifier of the activity in Oracle Field Service.
Root Schema : Activity Link
Type:
object
Title:
Activity Link
The link represents the relation between two activities.
Show Source
-
alerts:
integer
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. -
fromActivityId(required):
integer
Title:
From Activity ID
The identifier of the first linked activity. -
linkType(required):
string
Title:
Link Type
The link type specified in the request. -
maxIntervalValue:
integer
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. This parameter can only be sent if it is configured as "Adjustable" in the link template configuration. If the parameter is missing in the request, the value from the template wil be used. -
minIntervalValue:
integer
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. This parameter can only be sent if it is configured as "Adjustable" in the link template configuration. If the parameter is missing in the request, the value from the template wil be used. -
toActivityId(required):
integer
Title:
To Activity ID
The identifier of the second linked activity.
Response
Supported Media Types
- application/json
201 Response
This section describes the 201 status response for this operation.
Root Schema : Activity Link
Type:
object
Title:
Activity Link
The link represents the relation between two activities.
Show Source
-
alerts:
integer
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. -
fromActivityId(required):
integer
Title:
From Activity ID
The identifier of the first linked activity. -
linkType(required):
string
Title:
Link Type
The link type specified in the request. -
maxIntervalValue:
integer
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. This parameter can only be sent if it is configured as "Adjustable" in the link template configuration. If the parameter is missing in the request, the value from the template wil be used. -
minIntervalValue:
integer
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. This parameter can only be sent if it is configured as "Adjustable" in the link template configuration. If the parameter is missing in the request, the value from the template wil be used. -
toActivityId(required):
integer
Title:
To Activity ID
The identifier of the second linked activity.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to create an activity link by submitting a POST request on the REST resource.
Example of Request Header
The following shows an example of the request header.
POST /rest/ofscCore/v1/activities/67890/linkedActivities Authorization: Basic c29hcEBwZXRyb2xpYXNoZXZ5Y2gucmVzdDox Host: <instance_name>.fs.ocs.oraclecloud.com
Example of Request Body
The following shows an example of the request body.
{ "toActivityId" : 12345 "linkType": "myLinkRelation", "maxIntervalValue": 15, "minIntervalValue": 5 }
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 204 No content