CMDBuild Forum

ask an example to visist REST API which include (_advance = ture) attribute

Dear author

 
I tried to explore the REST API according to "webservice mannual" , in page 78/114 . it write like below 
 
POST .../processes/RequestForChange/instances HTTP/1.1
[various headers]
{
Requester : 123,
RFCDescription : test,
_advance = true
}
 
however , I encounter 500 error after sent the request .
 
I had tried to do the GET method ,which do not need body, just like below which is also in page 78/114,
 
GET .../processes/RequestForChange/instances HTTP/1.1
[various headers]
 
and I get the expected data.
 
So could you please provide me an example to show how to use POST method with attribute "_advance = true"?
 
 
Dear Pioneer,
 
you are missing the activity ID that must be passed using "_activity" attribute in this way:
 
{
    Requester : 123,
    RFCDescription : test,
    _advance = true,
    "_activity": "RegisterRFC"
}
 
the activity ID can be obtained calling
 
.../processes/RequestForChange/start_activities
 
for starting activities and
 
.../processes/RequestForChange/instances/{ID}/activities/
 
for a specific instance.
 
Best regards.
 
-- CMDBuild Team
 
Previously Pioneer wrote:
Dear author
 
I tried to explore the REST API according to "webservice mannual" , in page 78/114 . it write like below 
 
POST .../processes/RequestForChange/instances HTTP/1.1
[various headers]
{
Requester : 123,
RFCDescription : test,
_advance = true
}
 
however , I encounter 500 error after sent the request .
 
I had tried to do the GET method ,which do not need body, just like below which is also in page 78/114,
 
GET .../processes/RequestForChange/instances HTTP/1.1
[various headers]
 
and I get the expected data.
 
So could you please provide me an example to show how to use POST method with attribute "_advance = true"?
 
 

 

Hello there

I tried many combinations of data, but anyway got 500

Example:

{

  

"_id":"1952",

   "_type":"MyProcess2",

  

"_advance":"true",

  

"_activity":"560_414_Package_myprocess2_Process_myprocess2_STAGE02"

}

 

Version 2.4.3

 

Previously Tecnoteca wrote:
Dear Pioneer,
 
you are missing the activity ID that must be passed using "_activity" attribute in this way:
 
{
    Requester : 123,
    RFCDescription : test,
    _advance = true,
    "_activity": "RegisterRFC"
}
 
the activity ID can be obtained calling
 
.../processes/RequestForChange/start_activities
 
for starting activities and
 
.../processes/RequestForChange/instances/{ID}/activities/
 
for a specific instance.
 
Best regards.
 
-- CMDBuild Team
 
Previously Pioneer wrote:
Dear author
 
I tried to explore the REST API according to "webservice mannual" , in page 78/114 . it write like below 
 
POST .../processes/RequestForChange/instances HTTP/1.1
[various headers]
{
Requester : 123,
RFCDescription : test,
_advance = true
}
 
however , I encounter 500 error after sent the request .
 
I had tried to do the GET method ,which do not need body, just like below which is also in page 78/114,
 
GET .../processes/RequestForChange/instances HTTP/1.1
[various headers]
 
and I get the expected data.
 
So could you please provide me an example to show how to use POST method with attribute "_advance = true"?
 
 

 

 

Problem was doble quotes near values of "_id" and "_advance" keys.

Thanks! It's working

 

Previously Alex wrote:

Hello there

I tried many combinations of data, but anyway got 500

Example:

{

  

"_id":"1952",

   "_type":"MyProcess2",

  

"_advance":"true",

  

"_activity":"560_414_Package_myprocess2_Process_myprocess2_STAGE02"

}

 

Version 2.4.3

 

Previously Tecnoteca wrote:
Dear Pioneer,
 
you are missing the activity ID that must be passed using "_activity" attribute in this way:
 
{
    Requester : 123,
    RFCDescription : test,
    _advance = true,
    "_activity": "RegisterRFC"
}
 
the activity ID can be obtained calling
 
.../processes/RequestForChange/start_activities
 
for starting activities and
 
.../processes/RequestForChange/instances/{ID}/activities/
 
for a specific instance.
 
Best regards.
 
-- CMDBuild Team
 
Previously Pioneer wrote:
Dear author
 
I tried to explore the REST API according to "webservice mannual" , in page 78/114 . it write like below 
 
POST .../processes/RequestForChange/instances HTTP/1.1
[various headers]
{
Requester : 123,
RFCDescription : test,
_advance = true
}
 
however , I encounter 500 error after sent the request .
 
I had tried to do the GET method ,which do not need body, just like below which is also in page 78/114,
 
GET .../processes/RequestForChange/instances HTTP/1.1
[various headers]
 
and I get the expected data.
 
So could you please provide me an example to show how to use POST method with attribute "_advance = true"?