ITP-PD: How to pull data from the projects database using the serving pages
All of the scripts we used to create our automatic portfolio generator and our projects gallery are available for you to use, too!
When you load one of the serving scripts in a browser, it will display information from the database in JSON format. You can read in and parse this information for use in your own projects.
All the serving scripts are currently located here:
http://itp.nyu.edu/~mah593/projects_db_work/serving_scripts/
Some pages do not require any arguments in order to serve you data from the projects database. These "standalone" serving scripts are as follows:
get_all_keywords.php This script returns all the keywords in the database, and the number of times each keyword appears in the database. The list is ordered alphabetically.
get_projects.php This script returns every project in the entire database. It provides all the basic information: project id, title, description, main image. This script can be given arguments to customize your search and limit the results (see below).
get_recent_class_titles.php returns the 100 most recent titles of classes entered into the database. Repeats account for multiple sections of a given class.
get_venues_list.php returns all the venues that projects may have been associated, in order from most recent to oldest venue.
The rest of the serving scripts require arguments to execute.
get_basic_portfolio.php?netid=abc123 will return basic project information for all projects by the specified user (specify a user by entering their netid).
get_name.php?projectid=1111 will return all student's names associated with a given a project id.
get_project_classes.php?projectid=1111 will return all the classes a project is associated with when given a project id.
get_project_detail.php?projectid=1111 will return details of a project when given a project id.
get_project_media.php?projectid=1111 will return all the media files associated with a project when given a project id. Note that the media files live in https://itp.nyu.edu/projects_documents/ and this url will need to be tacked on to the media name in order for you to link to it or display it in a web browser.
get_project_venues.php?projectid=1111 returns all venues associated with a project when given a project id.
get_projects.php?numdisplay=5&pagenumber=1 returns a subset of projects where numdisplay is the number of projects you want the script to return and pagenumber is how many pages into the results you want to go (1 if you want the first n number of pages, 2 if you want the second group, etc.).
get_projects.php?numdisplay=5&pagenumber=1&keyword=soul returns a subset of projects where numdisplay is the number of projects you want the script to return, pagenumber is how many pages into the results you want to go and keyword is the word you want the projects to be tagged with.
get_projects.php?numdisplay=5&pagenumber=1&title=loop returns a subset of projects where numdisplay is the number of projects you want the script to return, pagenumber is how many pages into the results you want to go and title is the word you want the project's title to contain.
get_projects.php?numdisplay=5&pagenumber=1&name=greg returns a subset of projects where numdisplay is the number of projects you want the script to return, pagenumber is how many pages into the results you want to go and name is the name of the person who is associated with the project.
get_projects.php?keyword=soul returns all the projects that have been tagged with the given keyword.
get_projects.php?title=loop returns all the projects that have the given word in their title.
get_projects.php?name=greg returns all the projects that are associated with a person with the given name.








