REST WebService /event/add

 

Creates a new event.

Query

 

Method

URL

POST

RACINEVP/ws/rest/event/add

 

Type

Parameters

Values

HEAD

apikey

String

DATA

attributes

String

 

apikey

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

attributes

List of the attributes used to create the event: [{« entityName » : »attr2 », »entityValue » : »value2 },…]

Response

Status

Message

0

UID of the event

1

Invalid session : apikey

2

Invalid attribute : entityName

3

Create KO

Example 1:

For the “DEMO API REST” planner, installed on a Visual Planning server with the root http·://127.0.0.1:8906/ip50 , for which we want to create an event with the attributes Start date, End date, Customer, Project, Phase, Task and 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/event/add

Posted data:

{

“attributes”:

[

{“entityName”:”Evénement-Date de début”,”entityValue”:”26/03/2018 00:00″},

{“entityName”:”Evénement-Date de fin”,”entityValue”:”28/03/2018 00:00″},

{“entityName”:”Tâches-Client”,”entityValue”:”Client 1″},

{“entityName”:”Tâches-Projet”,”entityValue”:”Projet 1″},

{“entityName”:”Tâches-Phase”,”entityValue”:”Phase 1″},

{“entityName”:”Tâches-Tâche”,”entityValue”:”Analyse”},

{“entityName”:”Statuts”,”entityValue”:”Prévisionnel”},

]

}

Response:

{

“error”:0,

“message”:””

}

Example 2:

For the “DEMO API REST” planner, installed on a Visual Planning server with the root http ://127.0.0.1:8906/ip50, for which we want to create a child event with the Resources attribute of the parent event, identified by the attributes Customer, Project, Phase, Task and 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/event/add

Posted data:

{

“parentKeys”:

[

{“entityName”:”Tâches-Client”,”entityValue”:”Client 1″},

{“entityName”:”Tâches-Projet”,”entityValue”:”Projet 1″},

{“entityName”:”Tâches-Phase”,”entityValue”:”Phase 1″},

{“entityName”:”Tâches-Tâche”,”entityValue”:”Analyse”},

],

“attributes”:

[

{“entityName”:”Ressources”,”entityValue”:”JUDITH”}

]

}

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!