-
-
-
+{% set profile_url = h.url_for('user.read', id=g.userobj.name) %}
+{% if not is_modal %}
+
{{ _("API access examples") }}
+{% endif %}
+
+
+
+
-
-
{{ _("Retrieve Records") }}
-
{% trans %}Access this data through the CKAN Datastore API with resource_id="{{ resource_id }}"{% endtrans %}
-
-
{% trans %}The CKAN API uses a JSON-RPC style, where you post a JSON object and receive another JSON object in response.{% endtrans %}
-
{% trans %}Retrieving records requires an API key. Your API key is shown on your profile page.{% endtrans %}
-
-
-
{% trans %}Do not include your API key in any code shared with other people. Use a configuration file or environment variable to let each user input their own key when they use your tool. Your API key is equivalent to your password and may be used to perform any action your user can on this site. All actions made with your API key will be logged as actions you performed.{% endtrans %}
-
-
-
{{ _("Example:") }}
-
+
+
+
+
+
+
+
{% trans %}Access this data through the CKAN Datastore API with resource_id="{{ resource_id }}"{% endtrans %}
+
{% trans %}The CKAN API uses a JSON-RPC style, where you post a JSON object and receive another JSON object in response.{% endtrans %}
+
{% trans %}Retrieving records requires an API key. Your API key is shown on your profile page.{% endtrans %}
+
{% trans %}Do not include your API key in any code shared with other people. Use a configuration file or environment variable to let each user input their own key when they use your tool. Your API key is equivalent to your password and may be used to perform any action your user can on this site. All actions made with your API key will be logged as actions you performed.{% endtrans %}
+ {{ _("Example:") }}
+
+
+
+
+
+
-
{{ _("Create and Update Records") }}
-
{% trans %}Create and update records with the "datastore_upsert" endpoint.{% endtrans %}
-
-
{{ _("Example:") }}
-
+
+
+
+
+
+
{% trans %}Create and update records with the "datastore_upsert" endpoint.{% endtrans %}
+ {{ _("Example:") }}
+
+
+
+
+
+
-
{{ _("Delete Records") }}
-
{% trans %}First verify that the record you would like to remove is present with the "datastore_search" endpoint{% endtrans %}
-
-
{{ _("Example:") }}
-
+
+
+
+
+
+
{% trans %}First verify that the record you would like to remove is present with the "datastore_search" endpoint{% endtrans %}
+ {{ _("Example:") }}
+
+
+
+
{% trans %}Remove the record returned by passing the same parameters to the "datastore_records_delete" endpoint instead of "datastore_search".{% endtrans %}
+ {{ _("Example:") }}
+
+
+
-
-{% trans %}If you have modified these API Access instructions for another programming language please send them to open-ouvert@tbs-sct.gc.ca and we may be able to post them here as well. {% endtrans %}
-
+ Python
+
+
+
+
+
+
+
+
{% trans %}If you have modified these API Access instructions for another programming language please send them to open-ouvert@tbs-sct.gc.ca and we may be able to post them here as well.{% endtrans %}