Skip to content

Rest APIs

devsda edited this page May 13, 2019 · 10 revisions

Rest APIs of different usecases

Register Client

  • Method - POST
  • URI - /shephard-core/register/client
  • Payload -
{
	"clientName" : "swiggy"
}
  • Response -
{
    "resource_name": "REGISTER_CLIENT",
    "response_time": "2019-05-13 16:23:14",
    "server_name": "MININT-F9R3ARB.northamerica.corp.microsoft.com",
    "message": "Client registered successfully",
    "error_message": null,
    "response_data": {
        "ClientId": 19
    }
}

Get All Registered Clients

  • Method - GET
  • URI - /shephard-core/retrieve/clients
  • Payload - N/A
  • Response -
{
    "resource_name": "RETRIEVE_REGISTERED_CLIENTS",
    "response_time": "2019-05-13 16:25:21",
    "server_name": "MININT-F9R3ARB.northamerica.corp.microsoft.com",
    "message": "Successfully retrieved registered clients",
    "error_message": null,
    "response_data": {
        "registered_clients": [
            {
                "clientId": 15,
                "clientName": "dominos",
                "createdAt": "2019-04-29",
                "updatedAt": "2019-04-29",
                "submittedBy": "shepherd-core"
            },
            {
                "clientId": 16,
                "clientName": "dominos1",
                "createdAt": "2019-05-01",
                "updatedAt": "2019-05-01",
                "submittedBy": "shepherd-core"
            },
            {
                "clientId": 17,
                "clientName": "hitesh_dev",
                "createdAt": "2019-05-05",
                "updatedAt": "2019-05-05",
                "submittedBy": "shepherd-core"
            },
            {
                "clientId": 18,
                "clientName": "dominos11",
                "createdAt": "2019-05-05",
                "updatedAt": "2019-05-05",
                "submittedBy": "shepherd-core"
            },
            {
                "clientId": 19,
                "clientName": "swiggy",
                "createdAt": "2019-05-13",
                "updatedAt": "2019-05-13",
                "submittedBy": "shepherd-core"
            }
        ]
    }
}

Get Client Details

  • Method - GET
  • URI - /shephard-core/retrieve/client
  • Payload -
clientName=dominos
  • Response -
{
    "resource_name": "RETRIEVE_CLIENT_DETAILS",
    "response_time": "2019-05-13 16:35:07",
    "server_name": "MININT-F9R3ARB.northamerica.corp.microsoft.com",
    "message": "Successfully retrieved client details",
    "error_message": null,
    "response_data": {
        "client_details": {
            "clientId": 15,
            "clientName": "dominos",
            "createdAt": "2019-04-29",
            "updatedAt": "2019-04-29",
            "submittedBy": "shepherd-core"
        }
    }
}

Register Endpoint

  • Method - POST
  • URI - /shephard-core/register/endpoint
  • Payload -
{
    "clientName": "X",
    "endpointName": "Y",
    "graphDetails": "Z",
    "nodesDetails": "K"
}
  • Response -

Update Workflow details (part of endpoint)

  • Method - POST
  • URI - /shephard-core/update/endpoint/workflowDetails
  • Payload -
{
    "clientName": "X",
    "endpointName": "Y",
    "graphDetails": "Z"
}
  • Response -

Update Endpoint details (part of endpoint)

  • Method - POST
  • URI - /shephard-core/update/endpoint/endpointDetails
  • Payload -
{
    "clientName": "X",
    "endpointName": "Y",
    "nodesDetails": "K"
}
  • Response -

Get Endpoint

  • Method - GET
  • URI - /shephard-core/retrieve/endpoint
  • Payload -
clientName=X
endpointName=Y
  • Response -

Get All Endpoint

  • Method - GET
  • URI - /shephard-core/retrieve/endpoints
  • Payload -
clientName=X
  • Response -

Execute endpoint

  • Method - POST
  • URI - /shephard-core/execute/endpoint
  • Payload -
{
    "clientName": "X",
    "endpointName": "Y",
    "initialPayload": "Z"
}
  • Response -

Get Execution state

  • Method - GET
  • URI - /shephard-core/retrieve/executionState
  • Payload -
clientName=X
endpointName=Y
objectId=Z
executionId=K
  • Response -

Resume Execution

  • Method - POST
  • URI - /shephard-core/manage/execution/resume
  • Payload -
{
    "clientName": "X",
    "endpointName": "Y",
    "objectId": "Z",
    "executionId": "K"
}
  • Response -

Restart Execution

  • Method - POST
  • URI - /shephard-core/manage/execution/restart
  • Payload -
{
    "clientName": "X",
    "endpointName": "Y",
    "objectId": "Z",
    "executionId": "K"
}
  • Response -

Kill Execution

  • Method - POST
  • URI - /shephard-core/manage/execution/kill
  • Payload -
{
    "clientName": "X",
    "endpointName": "Y",
    "objectId": "Z",
    "executionId": "K"
}
  • Response -