API to add and remove manual dependencies

Use the Manual Dependencies API to manually add and remove dependent files to/from a Task Bot from My Docs, My Exes, and My Scripts folders in the repository.

As a Control Room administrator or a user with View and Manage Scheduled Activity permission, you can manage dependencies manually. The Manual Dependencies APIs allow you to,

  1. Add dependent files to a parent Task Bot
  2. Remove dependent files from a parent Task Bot
Note: The examples provided in this article are for reference only.

Before accessing the Dependencies API's you must first use the authentication API and pass it as a token to use a particular API.

  1. Use the POST method to generate a token using the end point http(s)://<hostname:port>/v1/authentication. For this provide the Control Room instance as Server Name /Hostname /IP and the Port number.

    For example, https://crdevenv.com:81/v1/authentication

  2. Provide the following request payload in Headers

    "X-Authorization" : "Authorization token"

    "Content-Type" : "application/json"

  3. Provide the following request payload in Body:

    {

    "username": "<Username>",

    "password": "<Password>"

    }

    For example,

    {

    "usename": "Ellie.Brown",

    "password": "12345678"

    }

API to add dependent files

Use this API to add files to a parent Task Bot for run and deploy automation successfully.

API end point

Use the following end point to access the APIs:

<Control Room URL>/v1/files/manualdependencies/add

For example,

https://crdevenv.com:81/v1/files/manualdependencies/add

  1. Provide the "X-Authorization" and "Content Type" parameters in Headers.
  2. Use the Deployment API to fetch the list of files available in the repository. See Enterprise 11 bot execution orchestrator API.
  3. Use the POST method to provide the file ids as request payload in Body:
     {
     "id": <parent file id>,
     "child_ids": [ <dependent file id 1>, <dependent file id 2> ]
     }
    For example, the following adds the dependent files with ids <...> for the TaskBot with id <..>:
     {
     "id":10
     "child_ids":[18, 19]
     } 
  4. Click Send
  5. The action is successful when the response status is 200.
  6. You can view the response in the Body data.

Parameter Description

Parameter Description
id parent file id
child_ids Collection of child manual dependency ids.

API to remove dependent files

Use this API to remove dependent files from a parent Task Bot.

API end point

Use the following end point to access the APIs:

<Control Room URL>/v1/files/manualdependencies/remove

For example, https://crdevenv.com:81/manualdependencies/remove

  1. Provide the "X-Authorization" and "Content Type" parameters in Headers.
  2. Use the DELETE method to provide the following request payload in Body:
     {
     "id": 0,
     "child_ids": 0
     }

    For example,the following removes/deletes the dependent files with ids <...> for the TaskBot with id <..>:

     {
     "id":
     "child_ids":
    }
  3. Click Send
  4. The action is successful when the response status is 200
  5. You can view the response in the Body data.

Parameter Description

Parameter Description
id parent file id
child_ids Collection of child manual dependency ids.