Temporal BFS (temporal_bfs)
Function
This algorithm searches for associated vertices based on temporal message passing and temporal BFS algorithms, and outputs the visit time of each vertex and the distance from the vertex to the source start vertex.
URL
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 |
dynamicRange |
Yes |
String |
Temporal parameters |
parameters |
Yes |
String |
Algorithm parameters |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
start |
Yes |
Date or integer |
Start time of the temporal analysis |
end |
Yes |
Date or integer |
End time of the temporal analysis |
time_props |
Yes |
Object |
Time properties for the temporal analysis |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
stime |
Yes |
String |
Property name of the start time |
etime |
Yes |
String |
Property name of the end time |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
source |
Yes |
String |
Start vertex ID |
k |
No |
Integer |
Distance from the target vertices to the start vertex. The value range is [1, 100] and the default value is 3. |
directed |
No |
Boolean |
Search direction. The value can be true or false. The default value is true. |
Response Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
errorMessage |
No |
String |
System prompt. If execution succeeds, this parameter may be left blank. If execution fails, this parameter is used to display the error message. |
errorCode |
No |
String |
System prompt. If execution succeeds, this parameter may be left blank. If execution fails, this parameter is used to display the error code. |
status |
No |
String |
Returned job status for a successful query. Possible values are waiting, running, and complete. This parameter is left blank when the query fails. |
data |
No |
Json |
Algorithm execution result. This parameter is left blank when the query fails. |
Example Request
Specify a source vertex ID to search for associated vertices. The algorithm name is temporal_bfs, the start time of dynamic analysis is ${startTime}, and the end time is ${endTime}.
POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/dynamicgraphs/action?action_id=execute-analysis { "algorithmName":"temporal_bfs", "dynamicRange":{ "start":"${startTime}", "end":"${endTime}", "time_props":{"stime":"${property(start_time)}","etime":"${property(start_time)}"} }, "parameters":{ "source":"", } }
Example Response
Status code: 200
Example response for a successful request
{ "jobId": "f9987cab-64d3-4b3d-ac43-e91ae0c21bef168127124", "jobType": 0 }
Status code: 400
Example response for a failed request
{ "errorMessage":"${errorMessage}", "errorCode":"GES.8301" }
Status Code
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