<jupyter_start><jupyter_text>PDS federated API demoVery simple request without a clear goal<jupyter_code>from __future__ import print_function
import pds.api_client as pds_api
from pprint import pprint
configuration = pds_api.Configuration()

# demo server
configuration.host = 'http://pds-gamma.jpl.nasa.gov/api/'

# dev server
# configuration.host = "http://localhost:8080/"

api_client = pds_api.ApiClient(configuration)<jupyter_output><empty_output><jupyter_text>Create an instance of the API class<jupyter_code>bundles = pds_api.BundlesApi(api_client)

bundles_response = bundles.get_bundles(q='lidvid eq "urn:nasa:pds:insight_documents::2.0"', fields=["lidvid"])<jupyter_output><empty_output><jupyter_text>test doc<jupyter_code>bundles_response.to_dict()
configuration = Configuration()
# dev
#configuration.host = 'http://localhost:8080/'
# gamma
configuration.host = 'http://pds-gamma.jpl.nasa.gov/api/'
api_instance = pds_api_client.CollectionsApi(pds_api_client.ApiClient(configuration))<jupyter_output><empty_output><jupyter_text>Request the API<jupyter_code>try:
    # capabilities api entry point, list the resources provided by the current API end-point.
    api_response = api_instance.get_collection(q="", start=0, limit=20)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectionsApi->get_collection: %s\n" % e)<jupyter_output>{'data': [{'description': None,
           'id': 'urn:nasa:pds:insight_documents:document_hp3rad::8.0',
           'investigations': None,
           'metadata': {'creation_date_time': '2018-01-19T00:00:00Z',
                        'label_url': 'https://pds-gamma.jpl.nasa.gov/data/pds4/test-data/registry/urn-nasa-pds-insight_documents/document_hp3rad/collection_document_hp3rad.xml',
                        'update_date_time': None,
                        'version': '8.0'},
           'observing_system_components': None,
           'properties': {'_package_id': '4dd5d54f-0a7f-4eab-a624-c86afcdb45e6',
                          'lid': 'urn:nasa:pds:insight_documents:document_hp3rad',
                          'lidvid': 'urn:nasa:pds:insight_documents:document_hp3rad::8.0',
                          'ops:Data_File_Info.ops:creation_date_time': '2020-12-11T01:28:48Z',
                          'ops:Data_File_Info.ops:file_name': 'collection_document_hp3rad.csv',
                          [...]
{'fraction_non_alphanumeric': 0.12766848053578903, 'fraction_numerical': 0.02888237756383424, 'mean_word_length': 3.9278350515463916, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 17, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '255773', 'license': 'Apache-2.0', 'n_tokens_mistral': 846, 'n_tokens_neox': 807, 'n_words': 114, 'path': 'notebooks/pds-api-client.ipynb', 'repo_name': 'al-niessner/pds-api-notebook', 'size': '2389'}