code: def get_url_info(brain_or_object, endpoint=None):
      
  
      # If no endpoint was given, guess the endpoint by portal type
      if endpoint is None:
          endpoint = get_endpoint(brain_or_object)
  
      uid = get_uid(brain_or_object)
      portal_type = get_portal_type(brain_or_object)
      resource = portal_type_to_resource(portal_type)
  
      return {
          "uid": uid,
          "url": get_url(brain_or_object),
          "api_url": url_for(endpoint, resource=resource, uid=uid),
      }
docs: Generate url information for the content object/catalog brain
  
      :param brain_or_object: A single catalog brain or content object
      :type brain_or_object: ATContentType/DexterityContentType/CatalogBrain
      :param endpoint: The named URL endpoint for the root of the items
      :type endpoint: str/unicode
      :returns: URL information mapping
      :rtype: dict