Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Using the Search API, you search for Artifact based on:

  1. Artifact ID in Luma Knowledge

  2. Search phrase

  3. Search phrase with additional Metadata such as Domains, Topic, Subjects, Actions, Motivation.

Use the following details to configure and use the Web Service operation:

  1. URI: /api/v1/search

  2. HTTP Method for the operation: POST

  3. Pass the following as Header to the API:

    1. Content-Type: application/json

    2. ClientType:Ajax

    3. Accept: application/json

    4. Capture the tenant access token retrieved during the Login API call. This Bearer token is sent as the Header to the API. The Bearer token is valid only for 15 mins. So, it should be generated using the Login API and passed to Search API as Header
      Authorization: Bearer: <Tenant Access Token>

  4. Pass the search criteria in Outbound Payload or Request to the Web Service. The request is passed in the following JSON format.

    1. You could use the Artifact ID to search for the Artifact. The request should be in the below format :

      Code Block
      { 
      "id":<ArtifactID>
      }
    2. To search for Artifact based on a user phrase, you can use the following request. Luma Knowledge will generate metadata from the provided user phrase and search for Knowledge artifacts.

      Code Block
      {
      "query": "<search phrase>",
      "domains":[],
      "actions":[],
      "subjects":[],
      "topics":[],
      "motivations":[]
      }
    3. You could also provide additional metadata such as Domains,

...

    1. Topics, Subjects, Actions,

...

    1. Motivations along with the search query to search for relevant Artifacts. Build the request in the following format:

      Code Block
      {
      "query": "<search phrase>",
      "domains":["Government"]
      "actions":[],
      "subjects":["<Subject 1>","<Subject 2>"],
      "topics":[<Topic>],
      "motivations":[]
      }
  1. For a successful search, the web service returns the response in the following format. For every artifact in the result set, you can find information such as artifact name, Summary, Topic, domain, Direct URL etc.

    Code Block
    {
      "errors": null,
      "metaInfo": null,
      "reasonPhrase": null,
      "resultData": {
        "numberOfLevels": 1,
        "levels": [
          {
            "decisionLevel": 0,
            "options": [
              {
                "id": 1,
                "searchStatistics": {
                  "resultScore": 3.0072231,
                  "confidenceScore": 1,
                  "confidenceBand": "HIGH"
                },
                "resultId": "1386",
                "summary": "Fire Development (Construction)",
                "description": "Fire Development (Construction). What Fire Development permits do I need?",
                "optionType": "ARTICLE",
                "parentId": 0,
                "decisionLevel": 0,
                "data": {
                  "topics": [],
                  "providers": [],
                  "domains": [
                    "Government"
                  ],
                  "path": []
                },
                "resultCount": 0,
                "directURL": "http://kmsdevops.automationsaqa1.com/direct/artifact/1386?searchIdentifier=1023-5-1646720607787&kmscontext=2pR7vXuAjTFvSf5%2BwPJGp3XMnOUBKRwLW%2FZpmxXoMsC5qHEUqeQe8nlg6CR1lE4HIsnEh%2BXKa08deMMM4pCYhC6zZBstDzw1EIBLZek8QN5UKHZNk3rK8JZpDR89ztTqOPs5eLc7n%2FN%2BmLkxmqqyPh72siD46udwHs6nV5Xcb%2FR7iaQJ6U3LirijYdRD1IMday8POoyTzzL99T0gPId55OEyatfx4A55S9DGOevLcLu1hyaTvofGRJ7VG5cI0GpYUnOzP5HnoP%2B8%2FdD8CjnAcg%3D%3D"
              }
            ]
          }
        ],
        "tenantId": 1023,
        "subTenantId": 1,
        "numberOfResults": 1,
        "feedbackConfig": {
          "uniqueIdentifier": "1023-5-1646720607787",
          "followupQuestions": {
            "artifact.feedback.followup.question1": "Did the artifact’s topic match the original knowledge request (Yes or No)?",
            "artifact.feedback.followup.question2": "Was the artifact understandable (Yes or No)?",
            "artifact.feedback.question": "Did the artifact answer the user’s question/problem (Yes or No)?"
          }
        }
      },
      "status": "Success",
      "statusCode": 0,
      "statusLine": "Success.",
      "timestamp": 1646720608015,
      "warnings": []
    }
  2. IF Lums finds a matching Precise Answer for the search, the web service returns the response in the following format. For every answer, you can find information just as Question, Answer, Artifact ID, URL, etc.

    Code Block
    {
    	"status": "Success",
    	"statusCode": 0,
    	"statusLine": "Success.",
    	"errors": null,
    	"resultData": {
    		"numberOfLevels": 0,
    		"levels": [],
    		"tenantId": 1027,
    		"subTenantId": 1,
    		"numberOfResults": 3,
    		"message": "",
    		"feedbackConfig": {
    			"uniqueIdentifier": "1027-1-431abee2-45b4-4883-8f3c-8618c49d38c2",
    			"followupQuestions": {}
    		},
    		"quickSolutions": [
    			{
    				"resultId": 2718,
    				"confidenceScore": 1,
    				"question": "Who is eligible for FMLA leave?",
    				"answer": "Employees who work for a covered employer for at least 12 months, have at least 1,250 hours of service with the employer during the 12 months before their FMLA leave starts, and work at a location where the employer has at least 50 employees within 75 miles are eligible for FMLA leave.",
    				"type": "FAQ",
    				"parentArtifactId": 654,
    				"directURL": "https://km.automationsaqa1.com//direct/faq/2718?searchIdentifier=1027-1-431abee2-45b4-4883-8f3c-8618c49d38c2&kmscontext=2pR7vXuAjTFvSf5%2BwPJGp3XMnOUBKRwLW%2FZpmxXoMsCkWFrBubkdYrxHbExUSnVn3Nxli4SiEmXSrwPaN2IEFZpVcMcIh7rsBFyNrfo%2BhWMOVFZKl7qCoyYcQuFCJLhtxuFe5%2Fl4FQpfRNMrNQR5%2FR72siD46udwHs6nV5Xcb%2FROoTvxjjN%2By03XVN%2FqrMuVi2tzQb5GlORHTnO%2FaPx0%2BCEnL3HDnWfI1wV8PF98EmO1hyaTvofGRJ7VG5cI0GpYV29RwBHNWi4Dy6rUgK2fpg%3D%3D",
    				"parentArtifactDirectUrl": "https://km.automationsaqa1.com//direct/artifact/654?searchIdentifier=1027-1-431abee2-45b4-4883-8f3c-8618c49d38c2&kmscontext=2pR7vXuAjTFvSf5%2BwPJGp3XMnOUBKRwLW%2FZpmxXoMsCkWFrBubkdYrxHbExUSnVn3Nxli4SiEmXSrwPaN2IEFZpVcMcIh7rsBFyNrfo%2BhWMOVFZKl7qCoyYcQuFCJLhtxuFe5%2Fl4FQpfRNMrNQR5%2FR72siD46udwHs6nV5Xcb%2FROoTvxjjN%2By03XVN%2FqrMuVi2tzQb5GlORHTnO%2FaPx0%2BCEnL3HDnWfI1wV8PF98EmO1hyaTvofGRJ7VG5cI0GpYV29RwBHNWi4Dy6rUgK2fpg%3D%3D"
    			},
    			{
    				"resultId": 2734,
    				"confidenceScore": 1,
    				"question": "Who is eligible for medical leave under the FMLA?",
    				"answer": "In order to be eligible for medical leave under the FMLA, an employee must have worked for their employer for at least 12 months, have worked at least 1,250 hours during that time, and work at a business with at least 50 employees within 75 miles of the employee's worksite.",
    				"type": "FAQ",
    				"parentArtifactId": 658,
    				"directURL": "https://km.automationsaqa1.com//direct/faq/2734?searchIdentifier=1027-1-431abee2-45b4-4883-8f3c-8618c49d38c2&kmscontext=2pR7vXuAjTFvSf5%2BwPJGp3XMnOUBKRwLW%2FZpmxXoMsCkWFrBubkdYrxHbExUSnVn3Nxli4SiEmXSrwPaN2IEFZpVcMcIh7rsBFyNrfo%2BhWMOVFZKl7qCoyYcQuFCJLhtxuFe5%2Fl4FQpfRNMrNQR5%2FR72siD46udwHs6nV5Xcb%2FROoTvxjjN%2By03XVN%2FqrMuVi2tzQb5GlORHTnO%2FaPx0%2BCEnL3HDnWfI1wV8PF98EmO1hyaTvofGRJ7VG5cI0GpYV29RwBHNWi4Dy6rUgK2fpg%3D%3D",
    				"parentArtifactDirectUrl": "https://km.automationsaqa1.com//direct/artifact/658?searchIdentifier=1027-1-431abee2-45b4-4883-8f3c-8618c49d38c2&kmscontext=2pR7vXuAjTFvSf5%2BwPJGp3XMnOUBKRwLW%2FZpmxXoMsCkWFrBubkdYrxHbExUSnVn3Nxli4SiEmXSrwPaN2IEFZpVcMcIh7rsBFyNrfo%2BhWMOVFZKl7qCoyYcQuFCJLhtxuFe5%2Fl4FQpfRNMrNQR5%2FR72siD46udwHs6nV5Xcb%2FROoTvxjjN%2By03XVN%2FqrMuVi2tzQb5GlORHTnO%2FaPx0%2BCEnL3HDnWfI1wV8PF98EmO1hyaTvofGRJ7VG5cI0GpYV29RwBHNWi4Dy6rUgK2fpg%3D%3D"
    			},
    			{
    				"resultId": 2910,
    				"confidenceScore": 1,
    				"question": " What are the benefits and protections of FMLA leave?",
    				"answer": " Employees who use FMLA leave have the right to go back to work at their same job or to an equivalent job that has the same pay, benefits, and other terms and conditions of employment at the end of their FMLA leave. Employers are required to continue group health insurance coverage for an employee on FMLA leave under the same terms and",
    				"type": "FAQ",
    				"parentArtifactId": 655,
    				"directURL": "https://km.automationsaqa1.com//direct/faq/2910?searchIdentifier=1027-1-431abee2-45b4-4883-8f3c-8618c49d38c2&kmscontext=2pR7vXuAjTFvSf5%2BwPJGp3XMnOUBKRwLW%2FZpmxXoMsCkWFrBubkdYrxHbExUSnVn3Nxli4SiEmXSrwPaN2IEFZpVcMcIh7rsBFyNrfo%2BhWMOVFZKl7qCoyYcQuFCJLhtxuFe5%2Fl4FQpfRNMrNQR5%2FR72siD46udwHs6nV5Xcb%2FROoTvxjjN%2By03XVN%2FqrMuVi2tzQb5GlORHTnO%2FaPx0%2BCEnL3HDnWfI1wV8PF98EmO1hyaTvofGRJ7VG5cI0GpYV29RwBHNWi4Dy6rUgK2fpg%3D%3D",
    				"parentArtifactDirectUrl": "https://km.automationsaqa1.com//direct/artifact/655?searchIdentifier=1027-1-431abee2-45b4-4883-8f3c-8618c49d38c2&kmscontext=2pR7vXuAjTFvSf5%2BwPJGp3XMnOUBKRwLW%2FZpmxXoMsCkWFrBubkdYrxHbExUSnVn3Nxli4SiEmXSrwPaN2IEFZpVcMcIh7rsBFyNrfo%2BhWMOVFZKl7qCoyYcQuFCJLhtxuFe5%2Fl4FQpfRNMrNQR5%2FR72siD46udwHs6nV5Xcb%2FROoTvxjjN%2By03XVN%2FqrMuVi2tzQb5GlORHTnO%2FaPx0%2BCEnL3HDnWfI1wV8PF98EmO1hyaTvofGRJ7VG5cI0GpYV29RwBHNWi4Dy6rUgK2fpg%3D%3D"
    			}
    		]
    	},
    	"warnings": [],
    	"timestamp": 1685479261975,
    	"reasonPhrase": null,
    	"metaInfo": null
    }
Info

A Knowledge search could either return Precise Answer or Artifact List.