Action APIs
Get Account Actions (GET)
Returns available actions for account management.
Route
|
URI |
/api/v1/Actions/AccountActions |
|
Method |
GET |
|
Result |
JSON – Array of AccountActionModel |
Parameters
None
Example
GET http://localhost/api/v1/Actions/AccountActions
Content-Type: application/json
[
{
"AccountId": "123e4567-e89b-12d3-a456-426614174001",
"Provider": "AD",
"DisplayName": "John Doe"
},
{
"AccountId": "123e4567-e89b-12d3-a456-426614174002",
"Provider": "AD",
"DisplayName": "Jane Smith"
}
]
Get Account Create Actions (GET)
Returns available actions for creating new accounts.
Route
|
URI |
/api/v1/Actions/CreateActions |
|
Method |
GET |
|
Result |
JSON – Array of ScenarioActionDefinition |
Parameters
None
Example
GET http://localhost/api/v1/Actions/CreateActions
Example Response
[
{
"$type": "pn.analyze.client.interfaces.ScenarioActionDefinition, pn.analyze.client.interfaces",
"actionId": "2478a65a-4df5-473d-afed-a894c0b53ecb",
"label": "Create Account",
"description": "Create Account",
"typeId": 200600,
"targetObjectDisplayNameProperty": null,
"isWithoutComment": false,
"isDirectExecutable": true,
"actionParameterPropertyNames": [],
"numberOfSteps": 2,
"isForInfoOnly": false
}
]
Execute Action (POST)
Executes a specific action identified by its ID.
Route
|
URI |
/api/v1/actions/{id} |
|
Method |
POST |
|
Result |
JSON – ActionExecutionResult |
Parameters
The unique identifier of the action (in URL path).
Request Payload
Action-specific parameters object containing:
|
Property |
Type |
Mandatory |
Description |
|---|---|---|---|
|
Parameters |
object |
Yes |
Action-specific parameter values |
|
Context |
object |
No |
Execution context information |
Response Structure
ActionExecutionResult containing:
-
Success: Boolean indicating if action executed successfully
-
Message: Result message
-
Data: Action-specific result data
-
Errors: List of errors if any
Example Request
POST http://localhost/api/v1/actions/createUser
Content-Type: application/json
{
"Parameters": {
"Username": "johndoe",
"Email": "johndoe@contoso.com",
"Department": "IT"
},
"Context": {
"RequestedBy": "admin@contoso.com"
}
}
Example Response
{
"Success": true,
"Message": "Action executed successfully",
"Data": {
"UserId": "123e4567-e89b-12d3-a456-426614174000",
"Status": "Created"
},
"Errors": []
}
Execute Action (PUT)
Creates a new instance of <see cref="ResourcesController"/> with the given parameters.
Route
|
URI |
/api/v1/actions/{actionId} |
|
Method |
PUT |
|
Result |
JSON – IActionResponse |
Request Payload
ActionRequest object:
|
Property |
Type |
Mandatory |
Description |
|---|---|---|---|
|
CurrentContext |
ResourceTreeItemModel |
No |
|
|
SelectedEntries |
ResourceTreeItemModel[] |
No |
|
|
FormJsonString |
string |
No |
|
|
Comment |
string |
No |
|
|
action |
string |
Yes |
|
Example
PUT http://localhost/api/v1/actions/{actionId} Content-Type: application/json
{ "CurrentContext": {},
"SelectedEntries": {},
"FormJsonString": "sample",
"Comment": "sample",
"action": "sample"
}
Get Account Actions (POST)
Returns all available actions for given accounts as grid entries
Route
|
URI |
/api/v1/actions/AccountActions |
|
Method |
POST |
|
Result |
JSON – AccountActionModel[] |
Parameters
None
Response Structure Returns AccountActionModel[] object containing:
- SupportedActions: ScenarioActionDefinitionModel[] value
Example
POST http://localhost/api/v1/actions/AccountActions
Example Response
{ "SupportedActions": {} }
Get Create Actions (GET)
Returns all available actions for given accounts as grid entries
Route
|
URI |
/api/v1/actions/CreateActions |
|
Method |
GET |
|
Result |
JSON – ScenarioActionDefinition[] |
Parameters
None
Response Structure Returns ScenarioActionDefinition[] object containing:
- ActionId: Uniquely refers to the supported action.
- Label: string value
- Description: string value
- TypeId: References a <see cref="WellKnownTypeIds"/> to indicate an icon for this action
- TargetObjectDisplayNameProperty: string value
- IsWithoutComment: Indicates if this action does not require a comment to be entered.
- IsDirectExecutable: Indicates if this action does not require an selected elements and can be executed directly.
- ActionParameterPropertyNames: string[] value
- NumberOfSteps: int value
- IsForInfoOnly: Indicates if this action is only for displaying information and cannot be executed.
Example
GET http://localhost/api/v1/actions/CreateActions
Example Response
{
"ActionId": "123e4567-e89b-12d3-a456-426614174000",
"Label": "sample",
"Description": "sample",
"TypeId": 1,
"TargetObjectDisplayNameProperty": "sample",
"IsWithoutComment": true,
"IsDirectExecutable": true,
"ActionParameterPropertyNames": {},
"NumberOfSteps": 1,
"IsForInfoOnly": true
}