Official comment
Hi Sahil,
You can use our REST API (https://api.clarizen.com/v2.0/services/) for that.
Here is a full example of how to login, create new project and retrieve all your projects:
*******************************************************************************************************
import json
import requests
clarizen_rest_api_url = 'https://api.clarizen.com/v2.0/services/'
login_url = 'authentication/login'
query_url = 'data/EntityQuery'
create_and_retrieve_url = 'data/createAndRetrieve'
clarizen_user_name = 'clarizen_user_name'
clarizen_password = 'clarizen_password'
session_id = ''
def login():
data = {'userName': clarizen_user_name, 'password': clarizen_password}
url = clarizen_rest_api_url + login_url
response = requests.post(url, data)
response_data = json.loads(response.text)
global session_id
session_id = response_data['sessionId']
def query(data=None):
headers = {'Authorization': 'Session ' + session_id}
url = clarizen_rest_api_url + query_url
response = requests.post(url, data=json.dumps(data), headers=headers)
json_response = json.loads(response.content)
return json_response.get('entities')
def create(data=None):
headers = {'Authorization': 'Session ' + session_id}
url = clarizen_rest_api_url + create_and_retrieve_url
response = requests.post(url, data=json.dumps(data), headers=headers)
json_response = json.loads(response.content)
return json_response.get('entity')
def retrieve_projects():
data = {'typeName': 'Project', 'fields': ['Name', 'StartDate']}
results = query(data)
return results
def create_project(name):
data = {'entity': {'Id': '/Project', 'Name': name, 'StartDate': '2017-6-16',}, 'fields': ['Name', 'DueDate']}
results = create(data)
return results
login()
create_results = create_project('My Project A')
query_results = retrieve_projects()
I hope this helps,
Elad