(Click to open topic with navigation)
The resource and services described in this topic are deprecated and may be removed in a future release. Use the comparable resource and services in MAM Web Services instead.
This section describes the services available through Moab Web Services for interacting with the Allocation object in Moab Accounting Manager. It contains the URLs, request bodies, and responses delivered to and from MWS as an intermediary for MAM.
The Fields: Allocations reference contains the type and description of the default fields for the Allocation object.
Supported methods
Resource | GET | PUT | POST | DELETE |
---|---|---|---|---|
/rest/accounting/allocations | Get All Allocations | -- | -- | -- |
/rest/accounting/allocations/<id> | Get Single Allocation | -- | -- | -- |
This topic contains these sections:
The HTTP GET method is used to retrieve Allocation information.
Quick reference
GET http://localhost:8080/mws/rest/accounting/allocations?api-version=3 GET http://localhost:8080/mws/rest/accounting/allocations/<id>?api-version=3
URLs and parameters
GET http://localhost:8080/mws/rest/accounting/allocations?api-version=3&proxy-user=<user>[&query=<query_conditions>][&fields=<fields_to_display>[&sort=<fields_to_sort>]|&show-all=(true|false)]
Parameter | Required | Type | Valid values | Description | Example |
---|---|---|---|---|---|
proxy-user | Yes | String | -- | Perform action as defined MAM user. | proxy-user=amy |
query | No | JSON | -- |
Results are restricted to those having the specified field values. The query parameter does not support the full Mongo syntax. Besides allowing queries specifying a simple field value (e.g. query={field:value}), you may use comparison operators of the form: query={field:{op:value}} where op may be one of the following:
|
query={"active":true} |
fields | No | String | -- | Comma-separated list of field names to display. | fields=id,fund,amount |
sort | No | JSON | -- | Sort the results. Use 1 for ascending and -1 for descending. Should be used in conjunction with the fields parameter. | sort={"fund":1} |
show-all | No | Boolean | true or false | true shows all fields including metadata and hidden fields. Default is false. | show-all=true |
See Global URL Parameters for available URL parameters.
Sample response
GET http://localhost:8080/mws/rest/accounting/allocations?api-version=3&proxy-user=amy&pretty=true
------------------------------------
{
"totalCount": 5,
"resultCount": 5,
"results": [
{
"id": 1,
"fund": 1,
"startTime": "2013-07-12 22:16:33 UTC",
"endTime": "infinity",
"amount": 50000000,
"creditLimit": 0,
"initialDeposit": 50000000,
"allocated": 50000000,
"active": true,
"description": ""
},
{
"id": 3,
"fund": 3,
"startTime": "2013-07-12 22:16:33 UTC",
"endTime": "infinity",
"amount": 0,
"creditLimit": 20000000,
"initialDeposit": 0,
"allocated": 0,
"active": true,
"description": ""
},
{
"id": 2,
"fund": 2,
"startTime": "2013-07-12 22:16:33 UTC",
"endTime": "infinity",
"amount": 30000000,
"creditLimit": 0,
"initialDeposit": 30000000,
"allocated": 30000000,
"active": true,
"description": ""
}
]
}
5.225.1.B Get Single Allocation
URLs and parameters
GET http://localhost:8080/mws/rest/accounting/allocations/<id>?api-version=3&proxy-user=<user>[&fields=<fields_to_display>|&show-all=(true|false)]
Parameter | Required | Type | Valid values | Description | Example |
---|---|---|---|---|---|
id | Yes | String | -- | The unique identifier of the object. | -- |
proxy-user | Yes | String | -- | Perform action as defined MAM user. | proxy-user=amy |
fields | No | String | -- | Comma-separated list of field names to display. | fields=id,fund,amount |
show-all | No | Boolean | true or false | true shows all fields including metadata and hidden fields. Default is false. | show-all=true |
See Global URL Parameters for available URL parameters.
Sample response
GET http://localhost:8080/mws/rest/accounting/allocations/1?api-version=3&proxy-user=amy&pretty=true
------------------------------------
{
"id": 1,
"fund": 1,
"startTime": "2013-07-12 22:16:33 UTC",
"endTime": "infinity",
"amount": 50000000,
"creditLimit": 0,
"initialDeposit": 50000000,
"allocated": 50000000,
"active": true,
}
Related Topics