Add process in multiple folders

Hello all,
I have a scenario in orchestrator looking for your suggestions .

Scenario:
I have 10 process packages in my orchestrator
Ex: Testbot1
Testbot2
Testbot3
Etc

I have folder structure like
Country → state–> City
I have 4 country folders
Under country folder have 40 sub folders as state names
Each state is having 5 city sub folders

Now my scenario is

I want to create my process under 1 country and 8 state and 3 city folders it means 24 process i need to create with Package Testbot1

Ex process : Testbot1

India

Andhra → Anantapur → Kurnool → Kadapa

Karnataka → Hubli → Bengaluru → Mysore

Kerala → Kochi → Thrissur

Etc

Can anyone suggest me how can I do it without creating it manually any simple scripts or any other approach to achieve this

@user928

You can use orchestrator api for thesame..create releases is the end point you need to use

<orchestratorurl>/swagger/index.html will give the end point details

You can loop on this api to create same process in different folders using same package

Cheers

@sanjay210no & @Anil_G can you please help me how to the credentials and token to make API. I have some restrictions in my client id. If it’s accessible with our community version. Can you please help me in detailed steps how to get the token to make API calls. I will test once in local

1 Like

@user928

If you are trying to call api via studio then you dont need to authenticate at all..you can use orchestrator http request activity directly

Cheers

@Anil_G am i doing this correctly. I’m trying to get the folder based on its id but it’s not working giving 400 error
Endpoint: "/odata/folders({123456})

When i post only this it’s working
Endpoint: “/odata/folders”

And also can you please share me the endpoint how can I update single process in multiple folders and also the json body how can I feed my package and process names details and folder names

1 Like

@user928

Use swqgger to get the details

Also flower brackets are not needed

You would not use single api to create all folders at once..you need to loop on the api to create with variables in json body..

For any endpoint use swagger first and it would give the endpoint json etc which would work

Cheers

Hi @Anil_G I’m able to get folders and process details but when i try to create the process in folder it’s throwing errors. Attaching here what I’m using to create process

Headers:

New Dictionary (Of String, String) From {

{“Content-Type”, “application/json”}, {“X-UiPath-OrganizationUnitId”, “1234”}

}

Json :

“{”“Name”“: ““Test1 - India””, ““ProcessKey””: ““Test1"”, ““ProcessVersion””: ““1.0.0"”, ““Description””: ““Process for India folder”, ““InputArguments””:”{}”, “ProcessType””: ““Attended””, ““EntryPoint””:{”“Type”“: ““Main””, ““FilePath””: ““Main.xaml””}}”

I’m getting an error like : The processversion field is required

@user928

looks like process key is wrong…and yes process version needs to be present..check the swagger for mandatory fields

cheers

@Anil_G i didn’t find anything such to create process in swagger. Can you share me the screenshot of json body once

I have my packages available in tenant level and in my folders i haven’t created any process yet. I need to create freshly with my packages

@user928

in swagger process refers to package release refers to process

cheers

@Anil_G in swagger i don’t see any such name called package release

I can see lot of data here . Not getting what to update and what json values i need to send

@user928

Key and version details from get processes

cheers

Hi @Anil_G I’m using like this 1 is body and another is header with folder id. When i hit api it gives 201 code and when i re run it again it shows process already exists but it doesn’t create any process in folder.
I tried like this also “Generate dispute:1.0.6” it shows like package is not exist


@user928

first try with get processes you will get correct name

also org id 1234 might be wrong

cheers

@Anil_G I’m using correct values from the output of processes. Here I added different values
Can you confirm me 1 thing is ORG id is same as folder id

@user928

yes org id is same as folder id…also 201 is returned when its created can you check in right folder..fid would be in the url when you are on that folder

201 should have created ..can you recheck once

Also may I know where are you giving the header details as I dont think it has header input and folder in orchestrator http request need to be passed in orchestrator folder path field

may be you are running request from different folder path without selecting so it would have created in that folder

cheers

I know you are deep into the API route at this point, but making a package with Solutions management would be easier at this point no?