Create case

Creates a new case based on the information provided

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Returns: a json object with meta data for the created case

:param int case_type: the type of case you want to make, '0 = custom design' -- '1 = simulation' -- '2 = standard design'
:param string name: the name you want to give to the case
:param int project_Id: the id of the project that you want this case to be a part of

def create_case(self, case_type, name, project_Id) -> Dict:

    cases_url = self.caseserver_url + "/cases"
    payload = json.dumps({"type": case_type, "name": name, "projectId": project_Id})
    
    response = requests.post(cases_url, data=payload, headers=self.put_header)
    if(response.ok): 
        print("case creation successful: \n", response.text, "\n")
        return response.json()
    else: 
        logger.error(f"case creation failed: {response.content}")
        raise Exception
Body Params
string
required
length between 1 and 255
int32
enum
required
0 to 2

Design = 0
Simulation = 1
StandardDesign = 2

Allowed:
int64
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json