GET /v1/usage/by_month/<requestNumber>/<firstDate>/<lastDate>
Get the usage per month, in a date range, for a request.

Examples

GET /v1/usage/by_month/MCB080133/2014-01-01/2014-12-01
{
    "message": null,
    "result": {
        "dates": [
            "2014-01-01",
            "2014-02-01",
            "2014-03-01",
            "2014-04-01",
            "2014-05-01",
            "2014-06-01",
            "2014-07-01",
            "2014-08-01",
            "2014-09-01",
            "2014-10-01",
            "2014-11-01",
            "2014-12-01"
        ],
        "resources": [
            {
                "resourceRepositoryKey": 126758,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142228,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142266,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142267,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142269,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142271,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142281,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142289,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142290,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142291,
                "usage": ["0","0","0","0","0","65.9320","276.2820","61.9760","0","0","0","0"
                ]
            },
            {
                "resourceRepositoryKey": 142293,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142302,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142303,
                "usage": ["0","0","0","0","0","0","0","0","14.8540","0","0","0"]
            },
            {
                "resourceRepositoryKey": 142688,
                "usage": ["0","0","0","0","0","0","0","0","0","0","0","0"]
            }
        ]
    }
}

# if there are no allocations, here is what is returned
GET /usage/by_month/DMR110078/2018-05-01/2018-06-01
{
    "message": null,
    "result": {
        "dates": [
            "2018-05-01",
            "2018-06-01"
        ],
        "resources": [
        ]
    }
}

# if there are allocations, but no usage, here is what is returned
GET /usage/by_month/DMR110078/2014-05-01/2014-06-01
{
    "message": null,
    "result": {
        "dates": [
            "2014-05-01",
            "2014-06-01"
        ],
        "resources": [
            {
                "resourceRepositoryKey": 142267,
                "usage": ["0","0"]
            },
            {
                "resourceRepositoryKey": 142290,
                "usage": ["0","0"]
            }
        ]
    }
}

Params

Param name Description
requestNumber
required

A grant number

Validations:

  • Must be a String

Returns

Code: 200

Description:

Success.

Param name Description

Code: 400

Description:

Bad request: couldn't parse firstDate or lastDate.

Param name Description