REST WebService /link/create

 

Creates a link between two events.

Query

 

Method

URL

POST

RACINEVP/ws/rest/link/create

 

Type

Parameters

Values

HEAD

apikey

String

DATA

beginUID

String

DATA

endUID

String

DATA

type

String

DATA

mode

String

DATA

behavior

String

DATA

delayType

String

DATA

delay

int

 

apikey

The user’s API key (must be sent in all the queries). Accesses the WebService for a given user and planner.

beginUID

UID identifier of the start event.

endUID

UID identifier of the end event.

type

Type of link (End to start, Start to start, End to end, Start to end) « END_BEGIN »,« BEGIN_BEGIN »,« END_END »,« BEGIN_END ».

behavior

Behavior of the link (Adjust, Warning, Constraint) « ADJUST »,« WARNING »,« CONSTRAINT ».

mode

Link mode (Strict delay, Maximum delay, Minimum delay) « STRICT »,« ADJUSTMIN »,« ADJUSTMAX ».

delayType

Delay type (Hourly, Daily) « DAY »,« HOUR »

delay

Delay between the start event and the end event (in minutes or in days)

Response

Status

Message

0

1

Invalid session: apikey

2

Begin event must be different of the end event

3

Invalid begin or end event UID

Link already exists

4

Invalid link type : type

5

Invalid link mode : mode

6

Invalid delay type : delayType

7

Invalid link behavior : behavior

8

Create KO

 

Example:

For the plannerDEMO API REST”, installed on a Visual Planning server with the root http ://127.0.0.1:8906/ip50, containing two events with the internal UID identifiers ADEE-00A1-63ED-573F-ADA4-3175-87EE-D5F9 and D4C5-34EE-3028-3655-7BB0-4F6D-BE2D-E973, and for which we want to create an END_BEGIN type link in STRICT mode, with the ADJUST behavior and the DAY delay type, lasting 2 days. With a user whose access key to the API is: d9f79618-59e4-a710-8203-a39bab9ad09b, we have:

URL:

http://127.0.0.1:8906/ip50/ws/rest/link/create

Posted data:

{

“beginUID”:” ADEE-00A1-63ED-573F-ADA4-3175-87EE-D5F9 “,

“endUID”:” D4C5-34EE-3028-3655-7BB0-4F6D-BE2D-E973 “,

“type”:”END_BEGIN”,

“mode”:”STRICT”,

“behavior”:”ADJUST”,

“delayType”:”DAY”,

“delayType”:”2″

}

Response:

{

“error”:0,

“message”:””

}

Print Friendly, PDF & Email
1 Etoile2 Etoiles3 Etoiles4 Etoiles5 Etoiles (No vote)
Loading...
Consulting training

Need training?

Use our consulting services!