REST WebService /resource/modify

 

Edits the characteristics of a resource.

Query

 

Method

URL

PUT

RACINEVP/ws/rest/resource/modify

 

Type

Parameters

Values

HEAD

apikey

String

DATA

resourceModel

String

DATA

attributes

String

DATA

keys

String

DATA

forceCreate

String

 

apikey

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

resourceModel

Name of the dimension

attributes

List of the attributes to be edited: [{“entityName”:”attr1″,”entityValue”:”value1 },…]

keys

List of the identification attributes of the resource: [{“entityName”:”attr2″,”entityValue”:”value2 },…]

forceCreate [optional]

Accepts the values true or false. If the value is true, an event is created if no matching key exists in the planner.

Response

Status

Message

0

1

Invalid session : apikey

2

Invalid resource model : resourceModel

3 Invalid attribute : attribute/key
4 No resource
5 Invalid data

6

Update KO

 

Example:

For the planner “DEMO API REST”, installed on a Visual Planning server with the root http://127.0.0.1:8906/ip50, containing a resource of the “Tasksdimension, identified by the attributes Customer, Project, Phase and for which we want to change the value of the Task attribute to “Analysis”. 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/modify

Posted data:

{

“keys”:

[

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

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

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

],

“attributes”:

[

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

],

“resourceModel”:”Tâches”

}

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!