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": []
}