API to add and remove manual dependencies
- Zuletzt aktualisiert2020/05/04
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,
- Add dependent files to a parent Task Bot
- Remove dependent files from a parent Task Bot
Before accessing the Dependencies API's you must first use the authentication API and pass it as a token to use a particular API.
- 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
- Provide the following request payload in Headers
"X-Authorization" : "Authorization token"
"Content-Type" : "application/json"
- 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
- Provide the "X-Authorization" and "Content Type" parameters in Headers.
- Use the Deployment API to fetch the list of files available in the repository. See Enterprise 11 bot execution orchestrator API.
- 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] }
- Click Send
- The action is successful when the response status is 200.
- 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
- Provide the "X-Authorization" and "Content Type" parameters in Headers.
- 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": }
- Click Send
- The action is successful when the response status is 200
- 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. |