REST WebService /event/get

 

Gets the characteristics of a set of events matching a filter in the planner in question.

Query

 

Method

URL

POST

ROOTVP/ws/rest/event/get

 

Type

Parameters

Values

HEAD

apikey

String

DATA

attributes

String

DATA

filterName

String

DATA

[extraInfos]

String

 

apikey

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

attributes

The attributes to be retrieved. [« attr1 »,…]

The attributes are identified by their label, as sent by the point of access/attributes.

filterName

Name of the applied events filter.

extraInfos [optional]

Dynamic attributes of the filter [{« entityName » : « attr2 », « entityValue » : « value2 }, …].

Response

Status

Message

0

1

Invalid session : apikey

2

Invalid event filter : filterName

3

No value for variable or invalid value for invalidVariable

4

Fatal Error : errorMessage

5

Invalid attribute : attribut

6

No entities found

7

Export KO

 

Example:

For the planner “DEMO API REST”, installed on a Visual Planning server with the root http ://127.0.0.1:8906/ip50, for which we want to retrieve the attributes Start date, End date, Customer, Project, Phase, Task and Resources of all the events matching the events filterDYNAMIC REST API DEMO TASK/PROJECT”, which has a dynamic PROJECT parameter on the project name.

By taking the value “Project 1” of the dynamic PROJECT parameter 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/get

Posted data:

{

“extraInfos”:

[

{“entityValue”:”Projet 1″,”entityName”:”PROJET”}

],

“attributes”:

[

“Evénement-Date de début”, “Evénement-Date de fin”,

“Tâches-Client”, “Tâches-Projet”,

“Tâches-Phase”,”Tâches-Tâche”,”Ressources”

],

“filterName”:”DEMO API REST TACHE/PROJET DYNAMIQUE”

}

Response:

{

“error”:0,

“message”:””,

“entities”:

[

[

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

{“entityName”:”Evénement-Date de fin”,”entityValue”:”15/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”:”Ressources”,”entityValue”:””}

],

……..

[

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

{“entityName”:”Evénement-Date de fin”,”entityValue”:”24/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”:”Conception”},

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

]

]

}

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

Need training?

Use our consulting services!