Skip to content

Instantly share code, notes, and snippets.

@kcbighuge
Created February 9, 2018 18:32
Show Gist options
  • Save kcbighuge/3dfe2efd0876f3482b9f655b761d05b5 to your computer and use it in GitHub Desktop.
Save kcbighuge/3dfe2efd0876f3482b9f655b761d05b5 to your computer and use it in GitHub Desktop.
create new submission request
import requests
import json
TOKEN = '... insert your token ...'
headers = {'Authorization': TOKEN, 'Content-Length': '0'}
CREATE_REQUEST_URL = 'https://review-api.udacity.com/api/v1/submission_requests.json'
project_language_pairs = [
{u'project_id': 238, u'language': u'en-us'}, # SDC: Traffic Sign Classification
{u'project_id': 108, u'language': u'en-us'}, # Machine Learning Capstone Project
### add more projects here
]
create_resp = requests.post(CREATE_REQUEST_URL,
json={'projects': project_language_pairs},
headers=headers)
print json.loads(create_resp.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment