• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 12166418762
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1578-supplementaildetails-types
DEFAULT BRANCH: master
Ran 04 Dec 2024 07:33PM UTC
Jobs 1
Files 608
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Dec 2024 06:54PM UTC coverage: 80.358% (+0.04%) from 80.319%
12166418762

push

github

web-flow
feat(accessLogsExport): create new endpoints TASK-1147  (#5304)

### 👷 Description for instance maintainers

Create two new endpoints for access log exports which will return the
status of the export job. One endpoint is restricted for superusers and
allows them to access all logs while the other endpoint is for regular
users to access their own logs.

### 👀 Preview steps

## Test `/api/v2/access-logs/export`

1. Login to kpi as a super user.
2. Make a GET request to /api/v2/access-logs/export
3. If this is your first time accessing the endpoint, then verify you
receive a 200 Ok with an empty list:

```json
[]

```

1. If not, verify you receive a 200 Ok with a list of created export
tasks:

```json
[
    {
        "uid": "alezKqwR8diLDQEepA83Rz4V",
        "status": "complete",
        "date_created": "2024-12-03T17:29:21.602245Z"
    },
    {
        "uid": "aleyTYvQjKT4QAcFztyYNHVC",
        "status": "created",
        "date_created": "2024-12-03T00:01:32.580491Z"
    },
    {
        "uid": "alebV6fWMgUARPmCBJDKQGKQ",
        "status": "complete",
        "date_created": "2024-12-02T23:59:47.426752Z"
    }
]
```

1. Make a POST request to /api/v2/access-logs/export and verify you
receive a 202 Accepted with this response:

```json
[
    "status: created"
]

```

1. Logout and try to access the endpoint. Verify you get receive a 401
Unauthorized
with this response:

```json
{
    "detail": "Authentication credentials were not provided."
}

```

1. Login as a regular user and access the endpoint. Verify you receive a
403 Forbidden with this response:

```json
{
    "detail": "You do not have permission to perform this action."
}

```

### Test `/api/v2/access-logs/me/export`

Follow the same testing instructions above but skip number 7 as both
superusers and regular users have the same access to the endpoint.

🟢 Also verify that making a POST request on both endpoints s... (continued)

5749 of 9230 branches covered (62.29%)

36 of 36 new or added lines in 2 files covered. (100.0%)

21924 of 27283 relevant lines covered (80.36%)

0.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12166418762.1 04 Dec 2024 07:33PM UTC 0
80.36
Source Files on build 12166418762
Detailed source file information is not available for this build.
  • Back to Repo
  • 2ae607e1 on github
  • Prev Build on main (#12165084425)
  • Next Build on main (#12167175919)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc