cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Asynchronous Web service call is not working after adding hopex wait time

RavitejaKodati
New Contributor

Hi,

Mega suggested as part of the migration from v4 to v5 web service call be implemented using API call method. We are using Asynchronous call method but when use x-hopex-wait as one of the headers for the first call sometimes our customized application we are getting connection issue or null issues from hopex. Is there anything other then x-hopex-wait, x-hopex-task and x-hopex-sessiontoken. If I am not using x-hopex-wait it is working fine but as per mega 's recommendation we need to use wait time.

1 Reply

rsutcliffe
MEGA
MEGA

@RavitejaKodati 

Hello Ravi,

There is some documentation available on the Postman site that details Mega's GraphQL calls. 

Below is an example from the documentation and the link.

 

 

Make asynchronous API call to HOPEX for the ITPM solution. You can make read or write access to the repository.

3 parameters in the headers should be defined :

  • x-hopex-wait : time to wait for a result in the body response. If 0 we don't wait and get immediately a task ID

  • x-hopex-task : the ID of the tasks that is running to compute the result

  • x-hopex-session : the session ID where the task is being executed

** Operating mode : ** First call : Have in the header x-hopex-wait defined. If > 0 then we wait the defined time for a response The result of this call is : - either the response : status code 200 - either a task id and a session token : status code 206

Second call : Call the end point with in the header the x-hopex-task and the x-hopex-session. The result of this call is : - either the result response in the body : code 200 - either a response to mentionned the task is still in progress : code 206

https://www.postman.com/mega-international/workspace/mega-international-s-public-workspace/documenta...

I hope that this helps.

Kind regards,

Ryan