Skip to content

Commit

Permalink
Merge pull request #6732 from pkiraly/6083-documentation-update-nativ…
Browse files Browse the repository at this point in the history
…e-API-examples-datafile-integrity

#6083 update examples in File part of Native API: 'Datafile Integrity' section.
  • Loading branch information
kcondon authored Mar 10, 2020
2 parents 7ed6519 + 239ccdc commit fea57c1
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2228,12 +2228,39 @@ The fully expanded example above (without environment variables) looks like this
Datafile Integrity
~~~~~~~~~~~~~~~~~~
Starting the release 4.10 the size of the saved original file (for an ingested tabular datafile) is stored in the database. The following API will retrieve and permanently store the sizes for any already existing saved originals::
Starting the release 4.10 the size of the saved original file (for an ingested tabular datafile) is stored in the database. The following API will retrieve and permanently store the sizes for any already existing saved originals:
GET http://$SERVER/api/admin/datafiles/integrity/fixmissingoriginalsizes{?limit=N}
.. code-block:: bash
export SERVER_URL=https://localhost
curl $SERVER_URL/api/admin/datafiles/integrity/fixmissingoriginalsizes
with limit parameter:
.. code-block:: bash
export SERVER_URL=https://localhost
export LIMIT=10
curl "$SERVER_URL/api/admin/datafiles/integrity/fixmissingoriginalsizes?limit=$LIMIT"
The fully expanded example above (without environment variables) looks like this:
.. code-block:: bash
curl https://localhost/api/admin/datafiles/integrity/fixmissingoriginalsizes"
with limit parameter:
.. code-block:: bash
curl https://localhost/api/admin/datafiles/integrity/fixmissingoriginalsizes?limit=10"
Note the optional "limit" parameter. Without it, the API will attempt to populate the sizes for all the saved originals that don't have them in the database yet. Otherwise it will do so for the first N such datafiles.
By default, the admin API calls are blocked and can only be called from localhost. See more details in :ref:`:BlockedApiEndpoints <:BlockedApiEndpoints>` and :ref:`:BlockedApiPolicy <:BlockedApiPolicy>` settings in :doc:`/installation/config`.
Users Token Management
----------------------
Expand Down

0 comments on commit fea57c1

Please sign in to comment.