API token connection admin package¶
The API token connection admin package allows you to assign an API token to a connection as a connection admin. This is a necessary step when:
- A connection is created through a workflow, run by a user
- You want to use an API token to programmatically administrate the connection or its assets (in particular, to manage policies in a persona)
Configuration¶
To set up the API token connection admin with the specified configuration.
Coming soon
API token connection admin with the specified configuration | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
- The API token connection admin package allows you to assign an API token to a connection as a connection admin.
-
Set up the API token connection admin with the specified configuration.
- connection_qualified_name: connection qualified name to which you want to add the API token as a connection admin
- api_token_guid: GUID of the API token
-
Convert the package into a
Workflow
object. -
Run the workflow by invoking the
run()
method on the workflow client, passing the created object.Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how to check the status and wait until the workflow has been completed.
Coming soon
Create the workflow via UI only
We recommend creating the workflow only via the UI. To rerun an existing workflow, see the steps below.
Re-run existing workflow¶
To re-run an existing api token connection admin workflow:
Coming soon
Re-run existing api token connection admin workflow | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
- You can find workflows by their type using the workflow client
find_by_type()
method and providing the prefix for one of the packages. In this example, we do so for theAPITokenConnectionAdmin
. (You can also specify the maximum number of resulting workflows you want to retrieve as results.) -
Once you've found the workflow you want to re-run, you can simply call the workflow client
rerun()
method.- Optionally, you can use
rerun(idempotent=True)
to avoid re-running a workflow that is already in running or in a pending state. This will return details of the already running workflow if found, and by default, it is set toFalse
.
Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how you can check the status and wait until the workflow has been completed.
- Optionally, you can use
Coming soon
Requires multiple steps through the raw REST API
- Find the existing workflow.
- Send through the resulting re-run request.
POST /api/service/workflows/indexsearch | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
-
Searching by the
csa-api-token-connection-admin
prefix will ensure you only find existing api token connection admin workflows.Name of the workflow
The name of the workflow will be nested within the
_source.metadata.name
property of the response object. (Remember since this is a search, there could be multiple results, so you may want to use the other details in each result to determine which workflow you really want.)
POST /api/service/workflows/submit | |
---|---|
100 101 102 103 104 |
|
- Send the name of the workflow as the
resourceName
to rerun it.