API Endpoints¶
edges¶
- POST /v0/edges/label/{edge_label}¶
Create a new edge by its label
Create a new edge between two vertices
- Args:
out_vertex_uuid (str): id of the vertex where the edge goes out in_vertex_uuid (str): id of the vertex where the edge goes in edge_label (str): label of the edge (“contains” or “influences”)
- Return:
- EdgeResponse: Edge (with properties id, outV, inV, uuid, label),
where id == uuid
- Parameters:
edge_label (string)
- Query Parameters:
out_vertex_uuid (string) – (Required)
in_vertex_uuid (string) – (Required)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /v0/edges/{edge_id}¶
Delete an edge by its UUID
Deletes edges going in and out of the specified vertex
- Args:
vertex_uuid (str): id of the vertex
- Return:
None
- Parameters:
edge_id (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/edges/{edge_id}¶
Get an edge by its UUID
Method to read one edge based on the id
- Args:
edge_uuid (str): id of the edge
- Returns:
EdgeResponse: Edge
- Parameters:
edge_id (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/project/{project_uuid}/edges/label/{edge_label}/vertices¶
Get edges by their label and their heads and tails from a project by its UUID
- Method to return all edges with the specified edge label and linking vertices
with given properties
- Args:
project_uuid (str): id of the project vertex edge_label (str): label of the edge (“contains” or “influences”) vertex_uuid (list[str]): list of vertices uuid of the sub-project
- Returns:
List[EdgeResponse]: List of Edges
- Parameters:
project_uuid (string)
edge_label (string)
- Query Parameters:
vertex_uuid (array)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/projects/{project_uuid}/edges/label/{edge_label}¶
Get edges by their label from a project by its UUID
Method to return all edges with the specified edge label
- Args:
project_uuid (str): id of the project vertex edge_label (str): label of the edge (“contains” or “influences”)
- Returns:
List[EdgeResponse]: List of Edges
- Parameters:
project_uuid (string)
edge_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/vertices/{vertex_uuid}/edges/label/{edge_label}/incoming¶
Get incoming edges by their label and their tails from a project by its UUID
Returns edges going in to the specified vertex
- Args:
vertex_uuid (str): id of the vertex edge_label (str): label of the edge
- Return:
List of edges
- Parameters:
vertex_uuid (string)
edge_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/vertices/{vertex_uuid}/edges/label/{edge_label}/outgoing¶
Get outgoing edges by their label and their heads from a project by its UUID
Returns edges going out of the specified vertex
- Args:
vertex_uuid (str): id of the vertex edge_label (str): label of the edge
- Return:
List of edges
- Parameters:
vertex_uuid (string)
edge_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /latest/edges/label/{edge_label}¶
Create a new edge by its label
Create a new edge between two vertices
- Args:
out_vertex_uuid (str): id of the vertex where the edge goes out in_vertex_uuid (str): id of the vertex where the edge goes in edge_label (str): label of the edge (“contains” or “influences”)
- Return:
- EdgeResponse: Edge (with properties id, outV, inV, uuid, label),
where id == uuid
- Parameters:
edge_label (string)
- Query Parameters:
out_vertex_uuid (string) – (Required)
in_vertex_uuid (string) – (Required)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /latest/edges/{edge_id}¶
Delete an edge by its UUID
Deletes edges going in and out of the specified vertex
- Args:
vertex_uuid (str): id of the vertex
- Return:
None
- Parameters:
edge_id (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/edges/{edge_id}¶
Get an edge by its UUID
Method to read one edge based on the id
- Args:
edge_uuid (str): id of the edge
- Returns:
EdgeResponse: Edge
- Parameters:
edge_id (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/project/{project_uuid}/edges/label/{edge_label}/vertices¶
Get edges by their label and their heads and tails from a project by its UUID
- Method to return all edges with the specified edge label and linking vertices
with given properties
- Args:
project_uuid (str): id of the project vertex edge_label (str): label of the edge (“contains” or “influences”) vertex_uuid (list[str]): list of vertices uuid of the sub-project
- Returns:
List[EdgeResponse]: List of Edges
- Parameters:
project_uuid (string)
edge_label (string)
- Query Parameters:
vertex_uuid (array)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects/{project_uuid}/edges/label/{edge_label}¶
Get edges by their label from a project by its UUID
Method to return all edges with the specified edge label
- Args:
project_uuid (str): id of the project vertex edge_label (str): label of the edge (“contains” or “influences”)
- Returns:
List[EdgeResponse]: List of Edges
- Parameters:
project_uuid (string)
edge_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/vertices/{vertex_uuid}/edges/label/{edge_label}/incoming¶
Get incoming edges by their label and their tails from a project by its UUID
Returns edges going in to the specified vertex
- Args:
vertex_uuid (str): id of the vertex edge_label (str): label of the edge
- Return:
List of edges
- Parameters:
vertex_uuid (string)
edge_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/vertices/{vertex_uuid}/edges/label/{edge_label}/outgoing¶
Get outgoing edges by their label and their heads from a project by its UUID
Returns edges going out of the specified vertex
- Args:
vertex_uuid (str): id of the vertex edge_label (str): label of the edge
- Return:
List of edges
- Parameters:
vertex_uuid (string)
edge_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
issues¶
- DELETE /v0/issues/{issue_uuid}¶
Delete an issue by its UUID
- Deletes the issue vertex based on the id and also all in and outgoing edges
from this vertex
- Args:
issue_uuid (str): id of the issue vertex
- Returns:
None
- Parameters:
issue_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/issues/{issue_uuid}¶
Get an issue by its UUID
Method to read one issue based on the id
- Args:
issue_uuid (str): id of the vertex with the label “issue”
- Returns:
IssueResponse: Issue with all properties
- Parameters:
issue_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /v0/issues/{issue_uuid}¶
Partial update of an issue by its UUID
Updates the specified issue based on the id with the new issue_data
- Args:
issue_uuid (str): id of the issue vertex modified_fields (IssueUpdate): contains properties of the issue
- Returns:
IssueResponse: Issue with the issue_data as IssueCreate
- Parameters:
issue_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/projects/{project_uuid}/issues¶
Get all issues by their project UUID
Read all issues connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and issue node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like category, tag, shortname
- Returns:
- List[IssueResponse]: List of Issues which satisfy the condition to be
connected to the Project vertex with a “contains” edge and have the label “issue” and satisfy the filters when given in filter_model
- Parameters:
project_uuid (string)
- Query Parameters:
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /v0/projects/{project_uuid}/issues¶
Create a new issue by its project UUID
Method to create a new issue connected to a project vertex
Creates vertex with the label “issue” and the properties of issue_data Creates an edge between the project vertex specified by project_uuid and the newly create issue vertex
- Args:
- project_uuid (str): id of the project vertex the new issue will be
connected to
issue_data (IssueCreate): contains all properties for the issue
- Returns:
IssueResponse: Created Issue with the issue_data as IssueCreate
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /v0/projects/{project_uuid}/merge¶
Merged 2 issues within a project by its UUID
- Function to merge two issues, will create a new issue if source issue or
destination issue is not a merged issue already.
Will add new edges “merged_into” between the merged issue and the source issue and/or destination issue Will remove the “contains” edge between the project and the children issues of the new merged issue
- Args:
project_uuid (str) source_issue (IssueResponse) destination_issue (IssueResponse)
- Returns:
merged_issue (IssueResponse)
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /v0/projects/{project_uuid}/un-merge/issues/{merged_issue_uuid}¶
Unmerge a merged issue by its UUID within a project by its UUID
Function to un-merge a merged issue
Will create new “contains” edges for the parents of the merged issue Will remove the merged issue vertex
- Args:
project_uuid (str) merged_issue_uuid (str)
- Returns:
list[str]: uuids of the issues that had been merged
- Parameters:
project_uuid (string)
merged_issue_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /latest/issues/{issue_uuid}¶
Delete an issue by its UUID
- Deletes the issue vertex based on the id and also all in and outgoing edges
from this vertex
- Args:
issue_uuid (str): id of the issue vertex
- Returns:
None
- Parameters:
issue_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/issues/{issue_uuid}¶
Get an issue by its UUID
Method to read one issue based on the id
- Args:
issue_uuid (str): id of the vertex with the label “issue”
- Returns:
IssueResponse: Issue with all properties
- Parameters:
issue_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /latest/issues/{issue_uuid}¶
Partial update of an issue by its UUID
Updates the specified issue based on the id with the new issue_data
- Args:
issue_uuid (str): id of the issue vertex modified_fields (IssueUpdate): contains properties of the issue
- Returns:
IssueResponse: Issue with the issue_data as IssueCreate
- Parameters:
issue_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects/{project_uuid}/issues¶
Get all issues by their project UUID
Read all issues connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and issue node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like category, tag, shortname
- Returns:
- List[IssueResponse]: List of Issues which satisfy the condition to be
connected to the Project vertex with a “contains” edge and have the label “issue” and satisfy the filters when given in filter_model
- Parameters:
project_uuid (string)
- Query Parameters:
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /latest/projects/{project_uuid}/issues¶
Create a new issue by its project UUID
Method to create a new issue connected to a project vertex
Creates vertex with the label “issue” and the properties of issue_data Creates an edge between the project vertex specified by project_uuid and the newly create issue vertex
- Args:
- project_uuid (str): id of the project vertex the new issue will be
connected to
issue_data (IssueCreate): contains all properties for the issue
- Returns:
IssueResponse: Created Issue with the issue_data as IssueCreate
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /latest/projects/{project_uuid}/merge¶
Merged 2 issues within a project by its UUID
- Function to merge two issues, will create a new issue if source issue or
destination issue is not a merged issue already.
Will add new edges “merged_into” between the merged issue and the source issue and/or destination issue Will remove the “contains” edge between the project and the children issues of the new merged issue
- Args:
project_uuid (str) source_issue (IssueResponse) destination_issue (IssueResponse)
- Returns:
merged_issue (IssueResponse)
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /latest/projects/{project_uuid}/un-merge/issues/{merged_issue_uuid}¶
Unmerge a merged issue by its UUID within a project by its UUID
Function to un-merge a merged issue
Will create new “contains” edges for the parents of the merged issue Will remove the merged issue vertex
- Args:
project_uuid (str) merged_issue_uuid (str)
- Returns:
list[str]: uuids of the issues that had been merged
- Parameters:
project_uuid (string)
merged_issue_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
objectives¶
- DELETE /v0/objectives/{objective_uuid}¶
Delete an objective by its UUID
- Deletes the objective vertex based on the id and also all in and outgoing
edges from this vertex
- Args:
objective_uuid (str): id of the objective vertex
- Returns:
None
- Parameters:
objective_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/objectives/{objective_uuid}¶
Get an objective by its UUID
Method to read one objective based on the id
- Args:
objective_uuid (str): id of the vertex with the label “objective”
- Returns
ObjectiveResponse: Objective with all properties
- Parameters:
objective_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /v0/objectives/{objective_uuid}¶
Partial update of an objective by its UUID
Updates the specified objective based on the id with the new objective_data
- Args:
objective_uuid (str): id of the objective vertex modified_fields (ObjectiveUpdate): contains properties of the objective
- Returns:
ObjectiveResponse: Objective with the objective_data as ObjectiveData
- Parameters:
objective_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/projects/{project_uuid}/objectives¶
Get all objectives by their project UUID
Read all objectives connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and objective node, should always be “contains” in this method (default “contains”)
- filter_model (Filter (BaseModel))
contains a dict with different properties for filtering, like hierarchy, tag, and description
- Returns
- List[ObjectiveResponse]: List of Objectives which satisfy the condition to
be connected to the Project vertex with a “contains” edge and have the label “objective” and satisfy the filters when the filter_model is given
- Parameters:
project_uuid (string)
- Query Parameters:
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /v0/projects/{project_uuid}/objectives¶
Create a new objective by its project UUID
Method to create a new objective connected to a project vertex
Creates vertex with the label “objective” and the properties of objective_data Creates an edge between the project vertex specified by project_uuid and the newly create objective vertex
- Args:
- project_uuid (str): id of the project vertex the new objective will be
connected to
objective_data (ObjectiveCreate): contains all properties for the objective
- Returns:
- ObjectiveResponse: Created Objective with the objective_data as
ObjectiveData
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /latest/objectives/{objective_uuid}¶
Delete an objective by its UUID
- Deletes the objective vertex based on the id and also all in and outgoing
edges from this vertex
- Args:
objective_uuid (str): id of the objective vertex
- Returns:
None
- Parameters:
objective_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/objectives/{objective_uuid}¶
Get an objective by its UUID
Method to read one objective based on the id
- Args:
objective_uuid (str): id of the vertex with the label “objective”
- Returns
ObjectiveResponse: Objective with all properties
- Parameters:
objective_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /latest/objectives/{objective_uuid}¶
Partial update of an objective by its UUID
Updates the specified objective based on the id with the new objective_data
- Args:
objective_uuid (str): id of the objective vertex modified_fields (ObjectiveUpdate): contains properties of the objective
- Returns:
ObjectiveResponse: Objective with the objective_data as ObjectiveData
- Parameters:
objective_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects/{project_uuid}/objectives¶
Get all objectives by their project UUID
Read all objectives connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and objective node, should always be “contains” in this method (default “contains”)
- filter_model (Filter (BaseModel))
contains a dict with different properties for filtering, like hierarchy, tag, and description
- Returns
- List[ObjectiveResponse]: List of Objectives which satisfy the condition to
be connected to the Project vertex with a “contains” edge and have the label “objective” and satisfy the filters when the filter_model is given
- Parameters:
project_uuid (string)
- Query Parameters:
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /latest/projects/{project_uuid}/objectives¶
Create a new objective by its project UUID
Method to create a new objective connected to a project vertex
Creates vertex with the label “objective” and the properties of objective_data Creates an edge between the project vertex specified by project_uuid and the newly create objective vertex
- Args:
- project_uuid (str): id of the project vertex the new objective will be
connected to
objective_data (ObjectiveCreate): contains all properties for the objective
- Returns:
- ObjectiveResponse: Created Objective with the objective_data as
ObjectiveData
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
opportunities¶
- DELETE /v0/opportunities/{opportunity_uuid}¶
Delete an objective by its UUID
- Deletes the opportunity vertex based on the id and also all in and outgoing
edges from this vertex
- Args:
opportunity_uuid (str): id of the opportunity vertex
- Returns
None
- Parameters:
opportunity_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/opportunities/{opportunity_uuid}¶
Get an opportunity by its UUID
Read all opportunitys connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and opportunity node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like tag and description
- Returns
- List[OpportunityResponse]: List of Opportunitys which satisfy the condition
to be connected to the Project vertex with a “contains” edge and have the label “opportunity” and satisfy the filters when the filter_model is given
- Parameters:
opportunity_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /v0/opportunities/{opportunity_uuid}¶
Partial update of an opportunity by its UUID
- Updates the specified opportunity based on the id with the new
opportunity_data
- Args:
opportunity_uuid (str): id of the opportunity vertex modified_fields (OpportunityUpdate): contains properties of the opportunity
- Returns
- OpportunityResponse: Opportunity with the opportunity_data as
OpportunityData
- Parameters:
opportunity_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/projects/{project_uuid}/opportunities¶
Get all opportunities by their project UUID
Read all opportunitys connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and opportunity node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like tag and description
- Returns
- List[OpportunityResponse]: List of Opportunitys which satisfy the condition
to be connected to the Project vertex with a “contains” edge and have the label “opportunity” and satisfy the filters when the filter_model is given
- Parameters:
project_uuid (string)
- Query Parameters:
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /v0/projects/{project_uuid}/opportunities¶
Create a new opportunity by its project UUID
Method to create a new opportunity connected to a project vertex
Creates vertex with the label “opportunity” and the properties of opportunity_data Creates an edge between the project vertex specified by project_uuid and the newly create opportunity vertex
- Args:
- project_uuid (str): id of the project vertex the new opportunity will be
connected to
- opportunity_data (OpportunityCreate): contains all properties for the
opportunity
- Returns:
OpportunityResponse: Created Opportunity with the opportunity_data as OpportunityCreate
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /latest/opportunities/{opportunity_uuid}¶
Delete an objective by its UUID
- Deletes the opportunity vertex based on the id and also all in and outgoing
edges from this vertex
- Args:
opportunity_uuid (str): id of the opportunity vertex
- Returns
None
- Parameters:
opportunity_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/opportunities/{opportunity_uuid}¶
Get an opportunity by its UUID
Read all opportunitys connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and opportunity node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like tag and description
- Returns
- List[OpportunityResponse]: List of Opportunitys which satisfy the condition
to be connected to the Project vertex with a “contains” edge and have the label “opportunity” and satisfy the filters when the filter_model is given
- Parameters:
opportunity_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /latest/opportunities/{opportunity_uuid}¶
Partial update of an opportunity by its UUID
- Updates the specified opportunity based on the id with the new
opportunity_data
- Args:
opportunity_uuid (str): id of the opportunity vertex modified_fields (OpportunityUpdate): contains properties of the opportunity
- Returns
- OpportunityResponse: Opportunity with the opportunity_data as
OpportunityData
- Parameters:
opportunity_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects/{project_uuid}/opportunities¶
Get all opportunities by their project UUID
Read all opportunitys connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and opportunity node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like tag and description
- Returns
- List[OpportunityResponse]: List of Opportunitys which satisfy the condition
to be connected to the Project vertex with a “contains” edge and have the label “opportunity” and satisfy the filters when the filter_model is given
- Parameters:
project_uuid (string)
- Query Parameters:
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /latest/projects/{project_uuid}/opportunities¶
Create a new opportunity by its project UUID
Method to create a new opportunity connected to a project vertex
Creates vertex with the label “opportunity” and the properties of opportunity_data Creates an edge between the project vertex specified by project_uuid and the newly create opportunity vertex
- Args:
- project_uuid (str): id of the project vertex the new opportunity will be
connected to
- opportunity_data (OpportunityCreate): contains all properties for the
opportunity
- Returns:
OpportunityResponse: Created Opportunity with the opportunity_data as OpportunityCreate
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
projects¶
- GET /v0/projects¶
Read all projects
Reads all project vertices
- Args:
None
- Returns
List[ProjectResponse]: List of Projects in the database
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
- POST /v0/projects¶
Create a new project
Method to create a new project vertex
Creates vertex with the label “project” and the properties of project_data
- Args:
project_data (ProjectCreate): contains all properties for the project
- Returns
ProjectResponse: Created Project with the project_data as ProjectCreate
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /v0/projects/import¶
Import a project
Method to import a project in JSON format
- Args:
project_json (dict): JSON dictionary with the project data
- Returns
None
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /v0/projects/{project_uuid}¶
Delete a project
- Gets all vertices connected (via edge with label “contains”) to the project
vertex with the id = project_uuid
Deletes all edges from these vertices and deletes afterwards all vertices connected to the project Deletes the project vertex based on the id
- Args
project_uuid (str): id of the project vertex
- Returns
None
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/projects/{project_uuid}¶
Read a project
Method to read one project based on the id
- Args:
project_uuid (str): id of the vertex with the label “project”’
- Returns
ProjectResponse: Project with all properties
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /v0/projects/{project_uuid}¶
Update a project
Updates the specified project based on the id with the new project_data
- Args:
project_uuid (str): id of the project vertex modified_fields (ProjectUpdate): contains properties of the project
- Returns
ProjectResponse: Project with the project_data as ProjectUpdate
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/projects/{project_uuid}/export¶
Export a project
Method to export one project based on the id in JSON format
- Args
project_uuid (str): id of the vertex with the label “project”’
- Returns
json_dict: JSON dictionary containing the project data
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects¶
Read all projects
Reads all project vertices
- Args:
None
- Returns
List[ProjectResponse]: List of Projects in the database
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
- POST /latest/projects¶
Create a new project
Method to create a new project vertex
Creates vertex with the label “project” and the properties of project_data
- Args:
project_data (ProjectCreate): contains all properties for the project
- Returns
ProjectResponse: Created Project with the project_data as ProjectCreate
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /latest/projects/import¶
Import a project
Method to import a project in JSON format
- Args:
project_json (dict): JSON dictionary with the project data
- Returns
None
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /latest/projects/{project_uuid}¶
Delete a project
- Gets all vertices connected (via edge with label “contains”) to the project
vertex with the id = project_uuid
Deletes all edges from these vertices and deletes afterwards all vertices connected to the project Deletes the project vertex based on the id
- Args
project_uuid (str): id of the project vertex
- Returns
None
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects/{project_uuid}¶
Read a project
Method to read one project based on the id
- Args:
project_uuid (str): id of the vertex with the label “project”’
- Returns
ProjectResponse: Project with all properties
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /latest/projects/{project_uuid}¶
Update a project
Updates the specified project based on the id with the new project_data
- Args:
project_uuid (str): id of the project vertex modified_fields (ProjectUpdate): contains properties of the project
- Returns
ProjectResponse: Project with the project_data as ProjectUpdate
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects/{project_uuid}/export¶
Export a project
Method to export one project based on the id in JSON format
- Args
project_uuid (str): id of the vertex with the label “project”’
- Returns
json_dict: JSON dictionary containing the project data
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
structures¶
- GET /v0/projects/{project_uuid}/decision-tree¶
Get the decision tree from project by its UUID
Method to read the necessary data to create the decision tree structure
- Args:
project_uuid (str): id of the project vertex
- Returns
DecisionTreeResponse: Dict of vertices
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/projects/{project_uuid}/influence-diagram¶
Get the influence diagram from project by its UUID
Method to read the necessary data to create the influence diagram structure
- Args:
project_uuid (str): id of the project vertex
- Returns
InfluenceDiagramResponse: Dict of vertices and edges
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects/{project_uuid}/decision-tree¶
Get the decision tree from project by its UUID
Method to read the necessary data to create the decision tree structure
- Args:
project_uuid (str): id of the project vertex
- Returns
DecisionTreeResponse: Dict of vertices
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/projects/{project_uuid}/influence-diagram¶
Get the influence diagram from project by its UUID
Method to read the necessary data to create the influence diagram structure
- Args:
project_uuid (str): id of the project vertex
- Returns
InfluenceDiagramResponse: Dict of vertices and edges
- Parameters:
project_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
vertex¶
- GET /v0/vertices/label/{vertex_label}¶
Get all vertices by their label
Read all vertices given a label
- Args:
vertex_label (str): label of vertices to read (e.g. opportunity)
- Returns:
list[VertexResponse]: list of vertices with the given label
- Parameters:
vertex_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /v0/vertices/label/{vertex_label}¶
Create a new vertex by its label
Creates a new vertex based on vertex data
- Args:
- vertex_label (str): given vertex label for gremlin DB, e.g. “issue”,
“project”, “opportunity”, “objective”
- vertex (VertexCreate): data for properties in vertex
provides generated uuid provides uuid will also be set as the id in the DB
- Return:
VertexResponse: dict of the created vertex
- Parameters:
vertex_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /v0/vertices/{vertex_uuid}¶
Delete a vertex by its UUID
method to delete a vertex based on the vertex id
- Args:
vertex_uuid (str): id of the vertex which will be deleted
- Return:
None
- Parameters:
vertex_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/vertices/{vertex_uuid}¶
Get a vertex by its UUID
Reads a vertex based on the vertex id in the DB
- Args:
vertex_uuid (str): uuid of the vertex.
uuid property [g.V().property(“uuid”,…)] and vertex id [g.V(id)] are the same based on the implementation in the create method This is an active choice of us, otherwise, the id will be automatically generated in the DB
- Return:
VertexResponse: dict with all data of the vertex (VertexResponse)
- Parameters:
vertex_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /v0/vertices/{vertex_uuid}¶
Delete a vertex by its UUID
Updated the specified vertex with the new vertex properties
- Args:
vertex_uuid (str): id of the to be updated vertex modified_fields (VertexUpdate): properties of vertices which will
be updated
- Return:
VertexResponse: vertex dict with updated properties
- Parameters:
vertex_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/vertices/{vertex_uuid}/children¶
Get the children of a vertex by its UUID
Read vertices based on outgoing edge labels.
- Args:
vertex_uuid (str): id of the vertex edge_label (str): edge label, e.g. “contains” or “influences” original_vertex_label (str, optional): label of the vertices we are
interested in (e.g. only issues or also opportunities and objectives). Defaults to None.
- filter_model (Filter, optional): BaseModel containing properties to use as
a filter, for example the type or tag of vertices. Defaults to None.
- Returns:
- List[VertexResponse]:
List of all vertices connected to the vertex with the vertex id vertex_uuid through an edge with the label edge_label When original_vertex_label is given the vertices will be filtered based on the label of the vertex, e.g. it will return either “issue”, “opportunity” or “objective” vertices otherwise, all vertices are returned When filter_model is given, the vertices will be filtered based on the content of the filter model. Currently this can be “tag”, “type”,… and other properties of the vertices defined in the database If filter_model is None, no filter will be applied and all vertices will be returned.
- Parameters:
vertex_uuid (string)
- Query Parameters:
edge_label (string) – (Required)
original_vertex_label (string)
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /v0/vertices/{vertex_uuid}/parents¶
Get the parents of a vertex by its UUID
Read vertices based on incoming edge labels.
- Args:
vertex_uuid (str): id of the vertex edge_label (str): edge label, e.g. “contains” or “influences” original_vertex_label (str, optional): label of the vertices we are
interested in (e.g. only issues or also opportunities and objectives). Defaults to None.
- filter_model (Filter, optional): BaseModel containing properties to use
as a filter, for example the type or tag of vertices. Defaults to None.
- Returns:
- List[VertexResponse]: List of all vertices connected to the vertex with
the vertex id vertex_uuid through an incoming edge with the label edge_label
When original_vertex_label is given, the vertices will be filtered based on the label of the vertex, e.g. it will return either “issue”, “opportunity” or “objective” vertices. Otherwise, all vertices are returned. When filter_model is given, the vertices will be filtered based on the content of the filter model. Currently, this can be “tag”, “type”, and other properties of the vertices defined in the database. If filter_model is None, no filter will be applied and all vertices will be returned.
- Parameters:
vertex_uuid (string)
- Query Parameters:
edge_label (string) – (Required)
original_vertex_label (string)
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/vertices/label/{vertex_label}¶
Get all vertices by their label
Read all vertices given a label
- Args:
vertex_label (str): label of vertices to read (e.g. opportunity)
- Returns:
list[VertexResponse]: list of vertices with the given label
- Parameters:
vertex_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- POST /latest/vertices/label/{vertex_label}¶
Create a new vertex by its label
Creates a new vertex based on vertex data
- Args:
- vertex_label (str): given vertex label for gremlin DB, e.g. “issue”,
“project”, “opportunity”, “objective”
- vertex (VertexCreate): data for properties in vertex
provides generated uuid provides uuid will also be set as the id in the DB
- Return:
VertexResponse: dict of the created vertex
- Parameters:
vertex_label (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- DELETE /latest/vertices/{vertex_uuid}¶
Delete a vertex by its UUID
method to delete a vertex based on the vertex id
- Args:
vertex_uuid (str): id of the vertex which will be deleted
- Return:
None
- Parameters:
vertex_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/vertices/{vertex_uuid}¶
Get a vertex by its UUID
Reads a vertex based on the vertex id in the DB
- Args:
vertex_uuid (str): uuid of the vertex.
uuid property [g.V().property(“uuid”,…)] and vertex id [g.V(id)] are the same based on the implementation in the create method This is an active choice of us, otherwise, the id will be automatically generated in the DB
- Return:
VertexResponse: dict with all data of the vertex (VertexResponse)
- Parameters:
vertex_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- PATCH /latest/vertices/{vertex_uuid}¶
Delete a vertex by its UUID
Updated the specified vertex with the new vertex properties
- Args:
vertex_uuid (str): id of the to be updated vertex modified_fields (VertexUpdate): properties of vertices which will
be updated
- Return:
VertexResponse: vertex dict with updated properties
- Parameters:
vertex_uuid (string)
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/vertices/{vertex_uuid}/children¶
Get the children of a vertex by its UUID
Read vertices based on outgoing edge labels.
- Args:
vertex_uuid (str): id of the vertex edge_label (str): edge label, e.g. “contains” or “influences” original_vertex_label (str, optional): label of the vertices we are
interested in (e.g. only issues or also opportunities and objectives). Defaults to None.
- filter_model (Filter, optional): BaseModel containing properties to use as
a filter, for example the type or tag of vertices. Defaults to None.
- Returns:
- List[VertexResponse]:
List of all vertices connected to the vertex with the vertex id vertex_uuid through an edge with the label edge_label When original_vertex_label is given the vertices will be filtered based on the label of the vertex, e.g. it will return either “issue”, “opportunity” or “objective” vertices otherwise, all vertices are returned When filter_model is given, the vertices will be filtered based on the content of the filter model. Currently this can be “tag”, “type”,… and other properties of the vertices defined in the database If filter_model is None, no filter will be applied and all vertices will be returned.
- Parameters:
vertex_uuid (string)
- Query Parameters:
edge_label (string) – (Required)
original_vertex_label (string)
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
- GET /latest/vertices/{vertex_uuid}/parents¶
Get the parents of a vertex by its UUID
Read vertices based on incoming edge labels.
- Args:
vertex_uuid (str): id of the vertex edge_label (str): edge label, e.g. “contains” or “influences” original_vertex_label (str, optional): label of the vertices we are
interested in (e.g. only issues or also opportunities and objectives). Defaults to None.
- filter_model (Filter, optional): BaseModel containing properties to use
as a filter, for example the type or tag of vertices. Defaults to None.
- Returns:
- List[VertexResponse]: List of all vertices connected to the vertex with
the vertex id vertex_uuid through an incoming edge with the label edge_label
When original_vertex_label is given, the vertices will be filtered based on the label of the vertex, e.g. it will return either “issue”, “opportunity” or “objective” vertices. Otherwise, all vertices are returned. When filter_model is given, the vertices will be filtered based on the content of the filter model. Currently, this can be “tag”, “type”, and other properties of the vertices defined in the database. If filter_model is None, no filter will be applied and all vertices will be returned.
- Parameters:
vertex_uuid (string)
- Query Parameters:
edge_label (string) – (Required)
original_vertex_label (string)
category ({'string', 'null'})
hierarchy ({'string', 'null'})
tag ({'string', 'null'})
shortname ({'string', 'null'})
name ({'string', 'null'})
decisionType ({'string', 'null'})
keyUncertainty ({'string', 'null'})
boundary ({'string', 'null'})
- Status Codes:
200 OK – Successful Response
404 Not Found – Not found
422 Unprocessable Entity – Validation Error
Versions¶
default¶
Route modules¶
Edges¶
Module: src.v0.routes.edge
- create(out_vertex_uuid: str, in_vertex_uuid: str, edge_label: str, service: EdgeService = Depends(get_service)) EdgeResponse [source]¶
Create a new edge between two vertices
- Args:
out_vertex_uuid (str): id of the vertex where the edge goes out in_vertex_uuid (str): id of the vertex where the edge goes in edge_label (str): label of the edge (“contains” or “influences”)
- Return:
- EdgeResponse: Edge (with properties id, outV, inV, uuid, label),
where id == uuid
- read_all_edges_from_project(project_uuid: str, edge_label: str, service: EdgeService = Depends(get_service)) list[EdgeResponse] [source]¶
Method to return all edges with the specified edge label
- Args:
project_uuid (str): id of the project vertex edge_label (str): label of the edge (“contains” or “influences”)
- Returns:
list[EdgeResponse]: List of Edges
- read_all_edges_from_sub_project(project_uuid: str, edge_label: str, vertex_uuid: list[str] = Query(None), service: EdgeService = Depends(get_service)) list[EdgeResponse] [source]¶
- Method to return all edges with the specified edge label and linking vertices
with given properties
- Args:
project_uuid (str): id of the project vertex edge_label (str): label of the edge (“contains” or “influences”) vertex_uuid (list[str]): list of vertices uuid of the sub-project
- Returns:
list[EdgeResponse]: List of Edges
- read_out_edge_from_vertex(vertex_uuid: str, edge_label: str, service: EdgeService = Depends(get_service)) list[EdgeResponse] [source]¶
Returns edges going out of the specified vertex
- Args:
vertex_uuid (str): id of the vertex edge_label (str): label of the edge
- Return:
List of edges
- read_in_edge_to_vertex(vertex_uuid: str, edge_label: str, service: EdgeService = Depends(get_service)) list[EdgeResponse] [source]¶
Returns edges going in to the specified vertex
- Args:
vertex_uuid (str): id of the vertex edge_label (str): label of the edge
- Return:
List of edges
- read(edge_id: str, service: EdgeService = Depends(get_service)) EdgeResponse [source]¶
Method to read one edge based on the id
- Args:
edge_uuid (str): id of the edge
- Returns:
EdgeResponse: Edge
Vertex¶
Module: src.v0.routes.vertex
- create_vertex(vertex_label: str, vertex_data: VertexCreate, client: DatabaseClient = Depends(get_client)) VertexResponse [source]¶
Creates a new vertex based on vertex data
- Args:
- vertex_label (str): given vertex label for gremlin DB, e.g. “issue”,
“project”, “opportunity”, “objective”
- vertex (VertexCreate): data for properties in vertex
provides generated uuid provides uuid will also be set as the id in the DB
- Return:
VertexResponse: dict of the created vertex
- read_vertex_all(vertex_label: str, client: DatabaseClient = Depends(get_client)) list[VertexResponse] [source]¶
Read all vertices given a label
- Args:
vertex_label (str): label of vertices to read (e.g. opportunity)
- Returns:
list[VertexResponse]: list of vertices with the given label
- read_vertex(vertex_uuid: str, client: DatabaseClient = Depends(get_client)) VertexResponse [source]¶
Reads a vertex based on the vertex id in the DB
- Args:
vertex_uuid (str): uuid of the vertex.
uuid property [g.V().property(“uuid”,…)] and vertex id [g.V(id)] are the same based on the implementation in the create method This is an active choice of us, otherwise, the id will be automatically generated in the DB
- Return:
VertexResponse: dict with all data of the vertex (VertexResponse)
- read_out_vertex(vertex_uuid: str, edge_label: str, filter_model: Filter = Depends(NoneType), original_vertex_label: str | None = None, client: DatabaseClient = Depends(get_client)) list[VertexResponse] [source]¶
Read vertices based on outgoing edge labels.
- Args:
vertex_uuid (str): id of the vertex edge_label (str): edge label, e.g. “contains” or “influences” original_vertex_label (str, optional): label of the vertices we are
interested in (e.g. only issues or also opportunities and objectives). Defaults to None.
- filter_model (Filter, optional): BaseModel containing properties to use as
a filter, for example the type or tag of vertices. Defaults to None.
- Returns:
- List[VertexResponse]:
List of all vertices connected to the vertex with the vertex id vertex_uuid through an edge with the label edge_label When original_vertex_label is given the vertices will be filtered based on the label of the vertex, e.g. it will return either “issue”, “opportunity” or “objective” vertices otherwise, all vertices are returned When filter_model is given, the vertices will be filtered based on the content of the filter model. Currently this can be “tag”, “type”,… and other properties of the vertices defined in the database If filter_model is None, no filter will be applied and all vertices will be returned.
- read_in_vertex(vertex_uuid: str, edge_label: str, filter_model: Filter = Depends(NoneType), original_vertex_label: str | None = None, client: DatabaseClient = Depends(get_client)) list[VertexResponse] [source]¶
Read vertices based on incoming edge labels.
- Args:
vertex_uuid (str): id of the vertex edge_label (str): edge label, e.g. “contains” or “influences” original_vertex_label (str, optional): label of the vertices we are
interested in (e.g. only issues or also opportunities and objectives). Defaults to None.
- filter_model (Filter, optional): BaseModel containing properties to use
as a filter, for example the type or tag of vertices. Defaults to None.
- Returns:
- List[VertexResponse]: List of all vertices connected to the vertex with
the vertex id vertex_uuid through an incoming edge with the label edge_label
When original_vertex_label is given, the vertices will be filtered based on the label of the vertex, e.g. it will return either “issue”, “opportunity” or “objective” vertices. Otherwise, all vertices are returned. When filter_model is given, the vertices will be filtered based on the content of the filter model. Currently, this can be “tag”, “type”, and other properties of the vertices defined in the database. If filter_model is None, no filter will be applied and all vertices will be returned.
- update_vertex(vertex_uuid: str, modified_fields: VertexUpdate, client: DatabaseClient = Depends(get_client)) VertexResponse [source]¶
Updated the specified vertex with the new vertex properties
- Args:
vertex_uuid (str): id of the to be updated vertex modified_fields (VertexUpdate): properties of vertices which will
be updated
- Return:
VertexResponse: vertex dict with updated properties
Projects¶
Module: src.v0.routes.project
- create(project_data: ProjectCreate, service: ProjectService = Depends(get_service)) ProjectResponse [source]¶
Method to create a new project vertex
Creates vertex with the label “project” and the properties of project_data
- Args:
project_data (ProjectCreate): contains all properties for the project
- Returns
ProjectResponse: Created Project with the project_data as ProjectCreate
- read_projects_all(service: ProjectService = Depends(get_service)) list[ProjectResponse] [source]¶
Reads all project vertices
- Args:
None
- Returns
List[ProjectResponse]: List of Projects in the database
- read(project_uuid: str, service: ProjectService = Depends(get_service)) ProjectResponse [source]¶
Method to read one project based on the id
- Args:
project_uuid (str): id of the vertex with the label “project”’
- Returns
ProjectResponse: Project with all properties
- export_project(project_uuid: str, service: ProjectService = Depends(get_service)) dict [source]¶
Method to export one project based on the id in JSON format
- Args
project_uuid (str): id of the vertex with the label “project”’
- Returns
json_dict: JSON dictionary containing the project data
- import_project(project_json: dict, service: ProjectService = Depends(get_service)) None [source]¶
Method to import a project in JSON format
- Args:
project_json (dict): JSON dictionary with the project data
- Returns
None
- update(project_uuid: str, modified_fields: ProjectUpdate, service: ProjectService = Depends(get_service)) ProjectResponse [source]¶
Updates the specified project based on the id with the new project_data
- Args:
project_uuid (str): id of the project vertex modified_fields (ProjectUpdate): contains properties of the project
- Returns
ProjectResponse: Project with the project_data as ProjectUpdate
- delete(project_uuid: str, service: ProjectService = Depends(get_service)) None [source]¶
- Gets all vertices connected (via edge with label “contains”) to the project
vertex with the id = project_uuid
Deletes all edges from these vertices and deletes afterwards all vertices connected to the project Deletes the project vertex based on the id
- Args
project_uuid (str): id of the project vertex
- Returns
None
Opportunities¶
Module: src.v0.routes.opportunity
- create(project_uuid: str, opportunity_data: OpportunityCreate, service: OpportunityService = Depends(get_service)) OpportunityResponse [source]¶
Method to create a new opportunity connected to a project vertex
Creates vertex with the label “opportunity” and the properties of opportunity_data Creates an edge between the project vertex specified by project_uuid and the newly create opportunity vertex
- Args:
- project_uuid (str): id of the project vertex the new opportunity will be
connected to
- opportunity_data (OpportunityCreate): contains all properties for the
opportunity
- Returns:
OpportunityResponse: Created Opportunity with the opportunity_data as OpportunityCreate
- read_opportunities_all(project_uuid: str, filter_model: Filter = Depends(NoneType), service: OpportunityService = Depends(get_service)) list[OpportunityResponse] [source]¶
Read all opportunitys connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and opportunity node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like tag and description
- Returns
- List[OpportunityResponse]: List of Opportunitys which satisfy the condition
to be connected to the Project vertex with a “contains” edge and have the label “opportunity” and satisfy the filters when the filter_model is given
- read(opportunity_uuid: str, service: OpportunityService = Depends(get_service))[source]¶
Read all opportunitys connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and opportunity node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like tag and description
- Returns
- List[OpportunityResponse]: List of Opportunitys which satisfy the condition
to be connected to the Project vertex with a “contains” edge and have the label “opportunity” and satisfy the filters when the filter_model is given
- update(opportunity_uuid: str, modified_fields: OpportunityUpdate, service: OpportunityService = Depends(get_service))[source]¶
- Updates the specified opportunity based on the id with the new
opportunity_data
- Args:
opportunity_uuid (str): id of the opportunity vertex modified_fields (OpportunityUpdate): contains properties of the opportunity
- Returns
- OpportunityResponse: Opportunity with the opportunity_data as
OpportunityData
Objectives¶
Module: src.v0.routes.objective
- create(project_uuid: str, objective_data: ObjectiveCreate, service: ObjectiveService = Depends(get_service)) ObjectiveResponse [source]¶
Method to create a new objective connected to a project vertex
Creates vertex with the label “objective” and the properties of objective_data Creates an edge between the project vertex specified by project_uuid and the newly create objective vertex
- Args:
- project_uuid (str): id of the project vertex the new objective will be
connected to
objective_data (ObjectiveCreate): contains all properties for the objective
- Returns:
- ObjectiveResponse: Created Objective with the objective_data as
ObjectiveData
- read_objectives_all(project_uuid: str, filter_model: Filter = Depends(NoneType), service: ObjectiveService = Depends(get_service)) list[ObjectiveResponse] [source]¶
Read all objectives connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and objective node, should always be “contains” in this method (default “contains”)
- filter_model (Filter (BaseModel))
contains a dict with different properties for filtering, like hierarchy, tag, and description
- Returns
- List[ObjectiveResponse]: List of Objectives which satisfy the condition to
be connected to the Project vertex with a “contains” edge and have the label “objective” and satisfy the filters when the filter_model is given
- read(objective_uuid: str, service: ObjectiveService = Depends(get_service)) ObjectiveResponse [source]¶
Method to read one objective based on the id
- Args:
objective_uuid (str): id of the vertex with the label “objective”
- Returns
ObjectiveResponse: Objective with all properties
- update_objective(objective_uuid: str, modified_fields: ObjectiveUpdate, service: ObjectiveService = Depends(get_service)) ObjectiveResponse [source]¶
Updates the specified objective based on the id with the new objective_data
- Args:
objective_uuid (str): id of the objective vertex modified_fields (ObjectiveUpdate): contains properties of the objective
- Returns:
ObjectiveResponse: Objective with the objective_data as ObjectiveData
Issues¶
Module: src.v0.routes.issue
- create(project_uuid: str, issue_data: IssueCreate, service: IssueService = Depends(get_service)) IssueResponse [source]¶
Method to create a new issue connected to a project vertex
Creates vertex with the label “issue” and the properties of issue_data Creates an edge between the project vertex specified by project_uuid and the newly create issue vertex
- Args:
- project_uuid (str): id of the project vertex the new issue will be
connected to
issue_data (IssueCreate): contains all properties for the issue
- Returns:
IssueResponse: Created Issue with the issue_data as IssueCreate
- read_issues_all(project_uuid: str, filter_model: Filter = Depends(NoneType), service: IssueService = Depends(get_service)) list[IssueResponse] [source]¶
Read all issues connected to one project with filter possibilities
- Args:
project_uuid (str): id of the project vertex vertex_label (str): label of the vertices of interest edge_label (str): edge_label to clarify the connection between the project
node and issue node, should always be “contains” in this method (default “contains”)
- filter_model (Filter(BaseModel)): contains a dict with different properties
for filtering, like category, tag, shortname
- Returns:
- List[IssueResponse]: List of Issues which satisfy the condition to be
connected to the Project vertex with a “contains” edge and have the label “issue” and satisfy the filters when given in filter_model
- read(issue_uuid: str, service: IssueService = Depends(get_service)) IssueResponse [source]¶
Method to read one issue based on the id
- Args:
issue_uuid (str): id of the vertex with the label “issue”
- Returns:
IssueResponse: Issue with all properties
- update(issue_uuid: str, modified_fields: IssueUpdate, service: IssueService = Depends(get_service)) IssueResponse [source]¶
Updates the specified issue based on the id with the new issue_data
- Args:
issue_uuid (str): id of the issue vertex modified_fields (IssueUpdate): contains properties of the issue
- Returns:
IssueResponse: Issue with the issue_data as IssueCreate
- delete(issue_uuid: str, service: IssueService = Depends(get_service)) None [source]¶
- Deletes the issue vertex based on the id and also all in and outgoing edges
from this vertex
- Args:
issue_uuid (str): id of the issue vertex
- Returns:
None
- merge(project_uuid: str, source_issue: IssueResponse, destination_issue: IssueResponse, service: IssueService = Depends(get_service)) IssueResponse [source]¶
- Function to merge two issues, will create a new issue if source issue or
destination issue is not a merged issue already.
Will add new edges “merged_into” between the merged issue and the source issue and/or destination issue Will remove the “contains” edge between the project and the children issues of the new merged issue
- Args:
project_uuid (str) source_issue (IssueResponse) destination_issue (IssueResponse)
- Returns:
merged_issue (IssueResponse)
- un_merge(project_uuid: str, merged_issue_uuid: str, service: IssueService = Depends(get_service)) list[str] [source]¶
Function to un-merge a merged issue
Will create new “contains” edges for the parents of the merged issue Will remove the merged issue vertex
- Args:
project_uuid (str) merged_issue_uuid (str)
- Returns:
list[str]: uuids of the issues that had been merged
Structures¶
Module: src.v0.routes.structure
- read_influence_diagram(project_uuid: str, service: StructureService = Depends(get_service)) InfluenceDiagramResponse [source]¶
Method to read the necessary data to create the influence diagram structure
- Args:
project_uuid (str): id of the project vertex
- Returns
InfluenceDiagramResponse: Dict of vertices and edges
- convert_influence_diagram_to_decision_tree_model(project_uuid: str, service: StructureService = Depends(get_service)) DecisionTreeResponse [source]¶
Method to read the necessary data to create the decision tree structure
- Args:
project_uuid (str): id of the project vertex
- Returns
DecisionTreeResponse: Dict of vertices