List all projects

Retrieves all projects for the given organization (you can find your organization's id by using the 'get_current_user_info' method).

Recipes
🗂️
Retrieve all cases from a project
Open Recipe
📂
Get Project ID
Open Recipe

Returns: an list with dict objects, containing meta data for these projects

:param int organization_Id: id of the organization for which you want to see the projects of
:param list[int] status: optional parameter, used to filter what types of projects you want to see. If this parameter is given, then you will only see the projects that conform to 1 of the values in the status.
The possible values are: '0 = ongoing' -- '1 = problem' -- '2 = finished' -- '3 = closed'

API call function:

def list_all_projects(self, organization_Id, status=[]) -> list:

    url = self.project_url + "/organizations/" + str(organization_Id) + "/projects/all"

    #for if status was given
    if not len(status) == 0:
        url += "?"
        for st in status:
            url += "Status=" + str(st) + "&"
        url = url[:-1]

    response = requests.get(url, headers=self.get_header)

    if(response.ok): 
        print("projects: \n", response.text, "\n")
        return response.json()
    else: 
        logger.error(f"failed to retrieve projects: {response.content}")
        raise Exception
Language
Credentials
Header
Click Try It! to start a request and see the response here!