(self, searchindex_id)
return self.to_json(searchindex, meta=meta)
Handles GET request to the resource.

        Returns:
            Search index in JSON (instance of flask.wrappers.Response)
Handles GET request to the resource.
Handles GET request to the resource .
def get(self, searchindex_id):
        """Handles GET request to the resource.

        Returns:
            Search index in JSON (instance of flask.wrappers.Response)
        """
        searchindex = SearchIndex.query.get_with_acl(searchindex_id)

        try:
            mapping = self.datastore.client.indices.get_mapping(
                searchindex.index_name)
        except opensearchpy.NotFoundError:
            logger.error('Unable to find index: {0:s}'.format(
                searchindex.index_name))
            mapping = {}
            searchindex.set_status('fail')
            db_session.commit()

        fields = list(mapping.get(
            searchindex.index_name, {}).get('mappings', {}).get(
                'properties', {}).keys())

        meta = {
            'contains_timeline_id': bool('__ts_timeline_id' in fields),
            'fields': fields,
        }
        return self.to_json(searchindex, meta=meta)
def get ( self , searchindex_id ) : searchindex = SearchIndex . query . get_with_acl ( searchindex_id ) try : mapping = self . datastore . client . indices . get_mapping ( searchindex . index_name ) except opensearchpy . NotFoundError : logger . error ( 'Unable to find index: {0:s}' . format ( searchindex . index_name ) ) mapping = { } searchindex . set_status ( 'fail' ) db_session . commit ( ) fields = list ( mapping . get ( searchindex . index_name , { } ) . get ( 'mappings' , { } ) . get ( 'properties' , { } ) . keys ( ) ) meta = { 'contains_timeline_id' : bool ( '__ts_timeline_id' in fields ) , 'fields' : fields , } return self . to_json ( searchindex , meta = meta )