{"apiVersion":"5.1.1","swaggerVersion":"1.1","basePath":"https://api.composer.nprstations.org/v1","resourcePath":"/program","apis":[{"path":"/program/syndicatedprograms","description":"List all syndicated programs","operations":[{"parameters":[],"httpMethod":"GET","notes":"This endpoint will return all syndicated programs in existence. Note this will return programs for the              ucs '517058989de8e95a46000133' or with the flag 'isParent' = true.              Long term we will move away from the hardcoded UCS as we enable or empower              the program owners with Composer Pro accounts. The 'IsParent' boolean flag will             be the final indicator of status.","nickname":"Get-Syndicated-Programs","summary":"Syndicated","customFields":{"description":"List all syndicated programs","path":"/program/syndicatedprograms","method":"GET","preliminaryCallbacks":[null],"params":[],"responseClass":"List[Program]","requestSignature":"token"},"responseClass":"List[Program]"}]},{"path":"/program/search","description":"Get an Program","operations":[{"parameters":[{"name":"id","description":"Program Document ID","dataType":"string","paramType":"query"},{"name":"ucs","description":"UCS(s) (accepts comma separated list of IDs)","dataType":"string","paramType":"query"},{"name":"parentID","description":"Parent Program ID","dataType":"string","paramType":"query"},{"name":"isParent","description":"Is Syndicated Parent Program? true|false","dataType":"string","paramType":"query"},{"name":"program_id","description":"(Legacy) Program ID","dataType":"string","paramType":"query"},{"name":"national_program_id","description":"(Legacy) National Program ID","dataType":"string","paramType":"query"},{"name":"name","description":"Program Name","dataType":"string","paramType":"query"},{"name":"description","description":"Program Description","dataType":"string","paramType":"query"},{"name":"program_format","description":"Optional program Format","dataType":"string","required":false,"allowMultiple":false,"allowableValues":{"valueType":"LIST","values":["News/Information","AAA","Afropop","Alternative Rock","Bluegrass","Blues","Celtic","Children's","Classical","Country","Electronic","Entertainment","Folk","Jazz","Loud Rock","New Age","Other","Roots/Rockabilly","World"]},"paramType":"query"},{"name":"limit","description":"Limit the number returned (Defaults to 100).","dataType":"string","paramType":"query"},{"name":"fields","description":"Experimental - List of fields to return. (Defaults to all fields).","dataType":"string","required":false,"allowMultiple":false,"paramType":"query"}],"httpMethod":"GET","notes":"This endpoint returns all a program, along with its nested airtimes and hosts.               To access the episodes use a secondary API call to the /episodes path for a program.","errorResponses":[{"code":404,"reason":"no results found "},{"code":500,"reason":"server error "},{"code":400,"reason":"invalid Search Criteria","errors":[]}],"nickname":"search","summary":"Search","customFields":{"description":"Get an Program","path":"/program/search","method":"GET","params":[{"name":"id","description":"Program Document ID","dataType":"string","paramType":"query"},{"name":"ucs","description":"UCS(s) (accepts comma separated list of IDs)","dataType":"string","paramType":"query"},{"name":"parentID","description":"Parent Program ID","dataType":"string","paramType":"query"},{"name":"isParent","description":"Is Syndicated Parent Program? true|false","dataType":"string","paramType":"query"},{"name":"program_id","description":"(Legacy) Program ID","dataType":"string","paramType":"query"},{"name":"national_program_id","description":"(Legacy) National Program ID","dataType":"string","paramType":"query"},{"name":"name","description":"Program Name","dataType":"string","paramType":"query"},{"name":"description","description":"Program Description","dataType":"string","paramType":"query"},{"name":"program_format","description":"Optional program Format","dataType":"string","required":false,"allowMultiple":false,"allowableValues":{"valueType":"LIST","values":["News/Information","AAA","Afropop","Alternative Rock","Bluegrass","Blues","Celtic","Children's","Classical","Country","Electronic","Entertainment","Folk","Jazz","Loud Rock","New Age","Other","Roots/Rockabilly","World"]},"paramType":"query"},{"name":"limit","description":"Limit the number returned (Defaults to 100).","dataType":"string","paramType":"query"},{"name":"fields","description":"Experimental - List of fields to return. (Defaults to all fields).","dataType":"string","required":false,"allowMultiple":false,"paramType":"query"}],"responseClass":"List[Program]","preliminaryCallbacks":[null],"requestSignature":"token"},"responseClass":"List[Program]"}]},{"path":"/program/{id}","description":"Get a Program","operations":[{"parameters":[{"name":"id","description":"Program ID","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"}],"httpMethod":"GET","notes":"This endpoint returns all a program, along with its nested airtimes and hosts.               To access the episodes use a secondary API call to the /episodes path for a program.","errorResponses":[{"code":400,"reason":"invalid id","errors":[]},{"code":404,"reason":"program not found"},{"code":500,"reason":"server error "}],"nickname":"get","summary":"Get","customFields":{"description":"Get a Program","path":"/program/{id}","method":"GET","params":[{"name":"id","description":"Program ID","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"}],"responseClass":"Program","preliminaryCallbacks":[null],"requestSignature":"token"},"responseClass":"Program"}]},{"path":"/program/{id}","description":"Update a Program","operations":[{"parameters":[{"name":"id","description":"Program ID","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"},{"name":"body","description":"Program Object","dataType":"Program","required":true,"allowMultiple":false,"paramType":"body"}],"httpMethod":"PUT","notes":"This endpoint will update an existing Program using a path program ID               and a json object in the body. It will return the updated program json               document.","errorResponses":[{"code":400,"reason":"invalid program","errors":[]},{"code":404,"reason":"program not found"}],"nickname":"update","summary":"Update","customFields":{"description":"Update a Program","path":"/program/{id}","method":"PUT","params":[{"name":"id","description":"Program ID","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"},{"name":"body","description":"Program Object","dataType":"Program","required":true,"allowMultiple":false,"paramType":"body"}],"responseClass":"Program","preliminaryCallbacks":[null],"requestSignature":"token"},"responseClass":"Program"}]},{"path":"/program","description":"Create a Program","operations":[{"parameters":[{"name":"body","description":"Program Object","dataType":"Program","required":true,"allowMultiple":false,"paramType":"body"}],"httpMethod":"POST","notes":"Update a Program Document.","errorResponses":[{"code":404,"reason":"Program not found"},{"code":500,"reason":"server error "}],"nickname":"create","summary":"Create","customFields":{"description":"Create a Program","path":"/program","method":"POST","params":[{"name":"body","description":"Program Object","dataType":"Program","required":true,"allowMultiple":false,"paramType":"body"}],"responseClass":"Program","preliminaryCallbacks":[null],"requestSignature":"token"},"responseClass":"Program"}]},{"path":"/program/{id}","description":"Delete a Program","operations":[{"parameters":[{"name":"id","description":"Program ID","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"}],"httpMethod":"DELETE","notes":"This endpoint will delete a program and all associated episodes.","errorResponses":[{"code":400,"reason":"invalid id","errors":[]},{"code":404,"reason":"Program not found"},{"code":500,"reason":"server error "}],"nickname":"delete","summary":"Delete","customFields":{"description":"Delete a Program","path":"/program/{id}","method":"DELETE","params":[{"name":"id","description":"Program ID","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"}],"responseClass":"Message","preliminaryCallbacks":[null],"requestSignature":"token"},"responseClass":"Message"}]},{"path":"/program/{id}/{recurrence}/episodes","description":"Delete Program Episodes by Recurrence","operations":[{"parameters":[{"name":"id","description":"Program ID","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"},{"name":"recurrence","description":"Recurrence ID or All","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"}],"httpMethod":"DELETE","notes":"This endpoint will delete all episodes for a program. If a recurrence ID                  is provides then the delete will be limited to the episodes for the                program and the recurrence.","errorResponses":[{"code":400,"reason":"invalid id","errors":[]},{"code":500,"reason":"server error "}],"nickname":"Delete-by-Recurrence","summary":"DeleteEpisodes","customFields":{"description":"Delete Program Episodes by Recurrence","path":"/program/{id}/{recurrence}/episodes","method":"DELETE","params":[{"name":"id","description":"Program ID","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"},{"name":"recurrence","description":"Recurrence ID or All","dataType":"string","required":true,"allowMultiple":false,"paramType":"path"}],"responseClass":"Message","preliminaryCallbacks":[null],"requestSignature":"token"},"responseClass":"Message"}]}],"models":{"Program":{"id":"Program","properties":{"name":{"type":"string","description":"","required":true},"program_url":{"type":"string","description":"HTTP URL for a program page.","required":false},"program_desc":{"type":"string","description":"Program Description","required":false},"ucs":{"type":"string","description":"UCS ID","required":true},"program_format":{"type":"string","description":"Program Format","required":false},"facebook":{"type":"string","description":"Facebook URL","required":false},"twitter":{"type":"string","description":"Twitter URL","required":false},"widget_config":{"album_art":{"type":"string","description":"Display album art in widget","required":false},"label":{"type":"string","description":"Display label in widget","required":false},"catalog_number":{"type":"string","description":"Display catalog number art in widget","required":false},"host_display":{"type":"string","description":"Display host in widget","required":false},"custom_fields":{"type":"string","description":"Display custom fields in widget","required":false},"episode_notes":{"type":"string","description":"Display episode notes in widget","required":false},"make_default":{"type":"string","description":"Make these settings the widget default","required":false},"host_allow":{"type":"string","description":"Allow host to modify settings in widget","required":false}},"recurrences":{"type":"array","description":"Array of Airtime models.","required":false,"default":[{"start_time":"23:00","end_time":"24:00","days":"Mon,Tue,Wed","start_date":"2012-01-01","end_date":"2012-02-01","no_end_date":false}]},"hosts":{"type":"array","description":"Array of Host models","required":false,"default":[{"name":"","email":""}]}}},"Message":{"id":"Statistics","properties":{"status":{"type":"boolean","description":"General Status Flag.","required":true},"message":{"type":"string","description":"Message Status","required":true},"warnings":{"type":"string","description":"TODO: Make this an array","required":true},"errors":{"type":"string","description":"TODO: Make this an array","required":true}}}}}