Open link in a new tab

Content

Expand project menu

Page not found with Grid API

I'm trying to use the Openproject api to extract the grid of the Cost Report. I registered the api key as mentioned in the guide, and I started with the example in the guide:

http://myinstallation.com/api/v3/grids?filters=[{ "page": { "operator": "=", "values": ["/my/page"] } }]

Passing the authentication token in the authentication section (i'm using Postman).

But i get: 404 Page not Found.

My installation: Docker container  openproject/community:8.2.0-psql

Message actions

Hi Christian,

you're using 8.2.0 which does not include the new my page grid. It got added in 8.3.0. In comparison, here's the API result of this community for your account:

https://community.openproject.com/api/v3/grids?filters=%5B%7B%22scope%22:%7B%22operator%22:%22=%22,%22values%22:%5B%22/my/page%22%5D%7D%7D%5D

Message actions

Thank you very much, I runned a container with 8.3 version and it works.

Now in the page /projects/prova/cost_reports

I've that a grid with that: 

04/17/2019 OpenProject Admin Management Task #42: task none prova 5.00 hours 250.00 EUR

If I use http://mydomain/api/v3/grids?filters=[{ "page": { "operator": "=", "values": ["/projects/prova/cost_reports"] } }]

I get 

{
    "_type": "Collection",
    "total": 0,
    "count": 0,
    "pageSize": 30,
    "offset": 1,
    "_embedded": {
        "elements": []
    },
    "_links": {
        "self": {
            "href": "/api/v3/time_entries?offset=1&pageSize=30"
        },
        "jumpTo": {
            "href": "/api/v3/time_entries?offset=%7Boffset%7D&pageSize=30",
            "templated": true
        },
        "changeSize": {
            "href": "/api/v3/time_entries?offset=1&pageSize=%7Bsize%7D",
            "templated": true
        }
    }
}

I should see the formatted previous table, shouldn't I?