Temporal Paths
Function
This API is used to execute the temporal paths algorithm based on input parameters.
Note: Only one temporal path that meets the conditions is returned between two vertices.
URI
POST /ges/v1.0/{project_id}/graphs/{graph_name}/dynamicgraphs/action?action_id=execute-analysis
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
graph_name |
Yes |
String |
Graph name |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
algorithmName |
Yes |
String |
Algorithm name |
parameters |
Yes |
parameters Object |
Algorithm parameters. For details, see the parameter description of each algorithm. |
dynamicRange |
Yes |
dynamicRange Object |
Temporal parameters |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
source |
Yes |
String |
Source vertex ID |
targets |
Yes |
String |
Target vertex ID set. The value is in CSV format. IDs are separated by commas (,), for example, Alice,Nana. The quantity cannot be greater than 100000. The default value is 1000. |
directed |
No |
Boolean |
Whether to consider the edge direction. The value can be true or false. The default value is false. |
k |
No |
Integer |
Maximum depth. The value ranges from 1 to 100. The default value is 3. |
strategy |
No |
String |
Algorithm policy. The value can be shortest, foremost, or fastest. (Note: fastest is not supported currently.) The default value is shortest.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
start |
Yes |
Date/ Integer |
Start time for temporal analysis |
end |
Yes |
Date/ Integer |
End time for temporal analysis |
time_props |
Yes |
time_props Object |
Time properties for temporal analysis |
Response Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
errorMessage |
No |
String |
System prompt. If the execution succeeds, this parameter may be left blank. If the execution fails, this parameter is used to display the error message. |
errorCode |
No |
String |
System prompt. If the execution succeeds, this parameter may be left blank. If the execution fails, this parameter is used to display the error code. |
data |
No |
Json |
Details about temporal path analysis results. |
Example Request
POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/dynamicgraphs/action?action_id=execute-analysis { "algorithmName":"temporal_paths", "dynamicRange":{ "start":1646092800, "end":1646170716, "time_props": {"stime":"startTime","etime":"endtime"} }, "parameters":{ "source":" Person00014", "targets":"Person00055,Person00058,Person00052,Person00061,Person00060,Place00032,Place00016,Place00026,Place00015,Place00043", "strategy":"shortest", "directed":true } }
Example Response
Status code: 200
Example response for a successful request
{ "data": { "outputs": { "data_return_size": 1, "direct": 1, "runtime": 0.00011, "temporal_paths": [ [{ "Person00014": { "arrive": 1646092800, "dist": 0, "predecessor": "" } }, { "Place00016": { "arrive": 1647169795, "dist": 1, "predecessor": "Person00014" } }] ], "data_offset": 0, "data_total_size": 1 } } }
Status code: 400
Example response for a failed request
{ "errorMessage":"graph [demo] is not found", "errorCode":"GES.8402" }
Status Codes
Return Value |
Description |
---|---|
400 Bad Request |
Request error. |
401 Unauthorized |
Authorization failed. |
403 Forbidden |
No operation permissions. |
404 Not Found |
No resources found. |
500 Internal Server Error |
Internal server error. |
503 Service Unavailable |
Service unavailable. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot