REST WebService /resource/add

 

Creates a new resource.

Query

 

Method

URL

POST

RACINEVP/ws/rest/resource/add

 

Type

Parameters

Values

HEAD

apikey

String

DATA

resourceModel

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.

resourceModel

Name of the dimension

attributes

List of the attributes used to create the event. [{“entityName”:”attr2″,”entityValue”:”value2 },…]

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 “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 resource of the “Tasksdimension with 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/resource/add

Posted data:

{

“attributes”:

[

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

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

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

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

],

“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!