Resource Operation
Resource Operation
The Application Summary method returns a list of the
available Resource Vectors. Some or all of the returned resource vectors
may be marked as drillable
.
The Resource Drilldown method can then be used on
a single drillable resource vector, returning a list of the entries in the vector,
along with a columns
Array of column description objects.
Some resource vectors support run-time operations. The following conditions must be met:
- The client must have administator access (admin user/password, or
open
security). - One of the
columns
in the drilldown must have typeoperation
. - The resource row object must have an attribute with the operation’s key with value =
1
.
If these conditions are met, then the target application should perform the requested operation on the existing resource represented by the resource vector row. Note that conditions may have changed in the intervening interval between drilldown and operation request.
Internally, the ManageApp
sends a !MANAGEMENT-RESOURCE-OPERATION-REQUEST
message to
the application and wait for the corresponding !MANAGEMENT-RESOURCE-OPERATION-RESPONSE
message.
HTTP Request
- METHOD:
GET
- URI:
/api/app/
//resource-op/ - Content-Type:
text/json
- Content: JSON Object
Special characters in the
or
must be URI percent-encoded.
The JSON Object has the following structure:
Attribute | Type | Description |
---|---|---|
operation_key
|
String |
[Required] The key from the columns field with type operation .
|
resource_row_key
|
Object | [Required] The value of the first column (the index column) in the row on which to perform the operation. |
HTTP Response
In the case of successful update, the following HTTP Response is returned:
- Status:
200
- Content-Type:
text/json
- Content: JSON Object
The attributes of the JSON Object are as follows:
Attribute | Type | Description |
---|---|---|
success
|
1
|
[Required] Indicates successful operation. |
app_name
|
1
|
[Required] The name of the Application which whose resource was operated upon. |
resource_key
|
1
|
[Required] Confirmation of the requested resource key. |
resource_row_key
|
Object | [Required] Confirmation of the resource key for the row affected by the operation. |
operation_key
|
1
|
[Required] Confirmation of the key of the operation which was performed. |
In the case of a soft error performing the resource operation (e.g. resource is not longer operable, user does not have admin authority, etc.) the response is also JSON, with the following structure:
Attribute | Type | Description |
---|---|---|
success
|
0
|
[Required] Indicates operation was not successful. |
error
|
1
|
[Required] Human readable explaination of the error cause. |
In the case of a more serious internal processing error (e.g. Invalid URI, Invalid request
body, etc.) the response may be a non-200 HTTP Status, with an optional text/plain
Content
describing the reason for failure.
- Status: non-
200
- Content-Type:
text/plain
- Content: Internal Processing Error Message