Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#793300
There are no REST endpoints for creating new workspaces. If you need this you can submit a bug report requesting it. Once the workspace is created, then you can use REST to access its contents, just like the default "workflow" workspace.

If you need to program the creation of new workspaces, then you can always submit the form with PHP or JavaScript to http://example.com/sysworkflow/en/neocl ... ll/newSite
For example, see: https://davidwalsh.name/curl-post
You can figure out the names of the fields in the form by looking at the HTML code (or looking at the code in processmaker/workflow/engine/methods/install/newSite.php)
#826259
Hi,
I also want to create new workspaces over a REST or SOAP or any other way but not through Processmaker frontend, Is there any way to do this?? any way to write some code a REST API?

I am using processmaker 3.3.0-community-RE-1.5


Please any suggestion would be helpful here
#826273
rohitambre wrote: Fri Aug 30, 2019 12:38 am I also want to create new workspaces over a REST or SOAP or any other way but not through Processmaker frontend, Is there any way to do this??
I already explained how to do it in the previous post.
You need to auto-fill ProcessMaker's form to create a new workspace:
http://{your-ip-or-domain}/sysworkflow/en/neoclassic/install/newSite
You can use Curl in PHP, as shown in this example:
https://davidwalsh.name/curl-post
Then send it as a POST to submit it to ProcessMaker and create the new workspace.
#826315
I thought there would have been any enhancement in creating workspaces.

I tried making a POST curl call but i'm getting nothing in return

I created a workspace from frontend and copied that request as cURL from chrome > network tab and ran it into my terminal then It created a workspace. I noticed that curl has a Cookie parameter which seem to have some session info because if I remove that part it doesnt create new workspace.
is session required? is it the problem?
#826464
sorry for late reply

and thank you so much amosbatto, you saved me.
At the first I was not sure how it is gonna help me and after few days nothing was working for me, I thought what if I login in using REST API and that it remind me of your comment I came back here I read extraRest documentation and wolla I managed to Create new Workspace.

I'll explain how I did it

1. Created a API which will have URL of application and added few environment variables for REST oauth client
2. Login Using processmaker REST api then pass that returned Access-token in ExtraRest getSessionID api
3. It will return sessionID and then use cURL call to
Code: Select all
http://{pm-server}/sysworkflow/en/neoclassic/newSiteProxy/testingNW?sid=".$session;
4. Pass required fields for that form which you can find from chrome network tab

Done, now you should find new workspace created.

is there more of such plugins, I would like to contribute if its there on github.

Thank you amos :P
#826478
Glad to hear that you got it working. We set up the wiki at pmusers.com so that people can post their code if they want to share it.
I haven't been using github, but feel free to modify the extraRest plugin and post your changes.
Timeout Not Sending Email

I am confused, but I have setup a self-service as[…]

Hello; In a dynaform (for example: called "Gr[…]

issue with processmaker 3.2

Ok thank you but i have more questions For exam[…]

No, there's nothing wrong in the browser network a[…]