Skip to content

Commit

Permalink
updates documentation for users-info endpoint. (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
dianabarsan committed Sep 16, 2021
1 parent 3d73bec commit 77d939e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/en/apps/reference/api.md
Expand Up @@ -958,7 +958,7 @@ HTTP/1.1 200 OK

### GET /api/v1/users-info

Returns the number of documents an offline user would replicate, along with a `warn` flag if this number exceeds the recommended limit (now set at 10 000).
Returns the total number of documents an offline user would replicate (`total_docs`), the number of docs excluding tasks the user would replicate (`warn_docs`), along with a `warn` flag if this number exceeds the recommended limit (now set at 10 000).

When the authenticated requester has an offline role, it returns the requester doc count.
###### Example
Expand All @@ -972,6 +972,7 @@ Content-Type: application/json
{
"total_docs": 5678,
"warn_docs": 4852,
"warn": false,
"limit: 10000
}
Expand All @@ -986,6 +987,8 @@ When the requester has an online role, the following query parameters are accept
| facility_id | String identifier representing the uuid of the user's facility | true |
| role | String identifier representing the user role - must be configured as an offline role. Accepts valid UTF-8 JSON array for multiple of roles. | true |
| contact_id | String identifier representing the uuid of the user's associated contact | false |

When requested as an online user, the number of tasks are never counted and never returned, so `warn_docs` is always equal to `total_docs`.

###### Example

Expand All @@ -999,6 +1002,7 @@ Content-Type: application/json
{
"total_docs": 10265,
"warn_docs": 10265,
"warn": true,
"limit: 10000
}
Expand Down

0 comments on commit 77d939e

Please sign in to comment.