Versions Compared

Key

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

...

Example:- Education Taxonomy would look as below.

...

API’s Used:

  1. Framework Read 

{{domain}} – should be replaced with the host address of the target environment. 

{{frameworkId}} – should be replaced with the framework identifier which is created. 

{{channelId}} - channel Id which the framework belongs to.  

{{apiKey}} - Kong Gateway API Key for the target environment. 

Code Block
curl --location --request GET 'https://{{domain}}/api/framework/v1/read/{{frameworkId}} \ 

--header 'Content-Type: application/json' \ 

--header 'X-Channel-Id: {{channelId}}' \ 

--header 'Authorization: Bearer {{apiKey}}' 

  1. Framework Publish 

Code Block
curl --location --request POST 'https://{{domain}}/api/framework/v1/publish/{{frameworkId}}' \ 

--header 'Content-Type: application/json' \ 

--header 'Authorization: Bearer {{apiKey}}' \ 

--header 'X-Channel-Id: {{channelId}}' \ 

--data-raw '{}' 

  1. Term Search  {{domain}} - Host address of the target environment. 

    {{frameworkId}} – Framework Identifier from the target environment. 

    {{categoryCode}} – Category code for the selected object group. 

    status – Value should be “Draft” to get the draft status objects 

Code Block
curl --location --request POST 'https://{{domain}}/api/framework/v1/term/search?framework={{frameworkId}}&category={{categoryCode}}' \ 

--header 'Authorization: Bearer {{apiKey}}' \ 

--header 'Content-Type: application/json' \ 

--data-raw '{ 

    "request": { 

        "search": { 

            "status": "Draft" 

        } 

    } 

}' 

  1. Term Create 

{{domain}} - Host address of the target environment 

{{frameworkId}} – Framework identifier from the target environment. 

{{categoryId}} - Category code from the selected object group. 

{{newUUID}} - provide newly generated UUID value from client. 

Code Block
curl --location --request POST 'https://{{domain}}/api/framework/v1/term/create?framework={{frameworkId}}&category={{categoryId}}' \ 

--header 'Content-Type: application/json' \ 

--header 'Authorization: Bearer {{apiKey}}' \ 

--data-raw '{ 

    "request": { 

        "term": { 

            "code": "{{newUUID}}", 

            "name": "Noting and Drafting", 

            "description": "Draft and analyse a note, in order to move a proposal for decision making based on the availability of evidence and existing rules and precedents", 

            "category": "{{categoryId}}", 

            "status": "Draft", 

            "parents": [ 

                { 

                    "identifier": "{{frameworkId}}_{{categoryId}}" 

                } 

            ], 

           “approvalStatus" : “Draft”, 

            "additionalProperties": { 

                "competencyType": "Domain", 

                "competencyArea": "Office Management", 

                "sourceId": "CID02755" 

            } 

        } 

    } 

}' 

  1. Term Update 

{{domain}} - Host address of the target environment 

{{termCode}} - Term code value which needs to be updated. 

{{frameworkId}} – Framework identifier from the target environment. 

{{categoryId}} - Category code from the selected object group. 

{{targetTermIdentifier}} - provide the target term object identifier which the association should be created. 

 

Code Block
curl --location --request PATCH 'https://{{domain}}/api/framework/v1/term/update/{{termCode}}?framework={{frameworkId}}&category={{categoryId}}' \ 

--header 'Content-Type: application/json' \ 

--header 'Authorization: Bearer {{apiKey}}' \ 

--data '{ 

    "request": { 

        "term": { 

            "associations": [ 

                { 

                    "identifier": {{targetTermIdentifier}}, 

                     “approvalStatus" : “Draft”, 

                } 

            ] 

        } 

    } 

}' 

Note : “associations” array contain all the term object identifiers – which are previously created associations.  

Approval flow (TODO)

  1. Workflow Create 

{{domain}} - Host address of the target environment 

             {{userToken}} - User Auth token 

              {{TermObject}} -  Term objects 

Code Block
curl --location '{{domain}}/api//workflow/taxonomy/create' \ 

--header 'userToken: {{userToken}} '\ 

--header 'Authorization: bearer {{api-key}}' \ 

--header 'Content-Type: application/json' \ 

--data '{ 

    "state": "INITIATE", 

    "action": "INITIATE", 

    "serviceName": "taxonomy", 

    "updateFieldValues": [ {{TermObjects}} ] 

}' 

  1. Workflow Application Search 

{{status of the application}} - Status of the application we want to search  

Code Block
curl --location 'https://portal.igot-dev.in/api/workflow/taxonomy/search' \  

--header 'userToken: {{userToken}}' \  

--header 'Authorization: bearer {{api-key}}' \ 

--header 'Content-Type: application/json' \ 

 --data '{    

             "serviceName": "taxonomy",  

              "applicationStatus": "{{status of the application}}"  

}' 

  1. Workflow Application Read 

{{wfId}} - wfId of the application 

Code Block
curl --location 'https://portal.igot-dev.in/api/workflow/taxonomy/read/{{wfId}}' \ 

--header 'userToken: {{userAuthToken}}' \ 

--header 'Authorization: bearer {{api-key}}' 
  1. Workflow Transition

{{wfId}} - wfId of the application \

  1. Approve Level 2 

Code Block
curl --location --request PATCH 'https://portal.igot-dev.in/api/workflow/taxonomy/update' \ 

--header 'userToken: {{userAuthToken}}' \ 

--header 'Authorization: bearer {{api-key}}' \ 

--header 'Content-Type: application/json' \ 

--data '{ 

    "wfId": "{{wfId}}", 

    "state": "SEND_FOR_REVIEW_L1", 

    "action": "APPROVE",  

    "serviceName": "taxonomy" 

}'  
  1. Approve Level 2 

Code Block
curl --location --request PATCH 'https://portal.igot-dev.in/api/workflow/taxonomy/update' \ 

--header 'userToken: {{userAuthToken}}' \ 

--header 'Authorization: bearer {{api-key}}' \ 

--header 'Content-Type: application/json' \ 

--data '{ 

    "wfId": "{{wfId}}", 

    "state": "SEND_FOR_REVIEW_L2", 

    "action": "APPROVE", 

    "serviceName": "taxonomy" 

}' 

  1. Publish 

Code Block
curl --location --request PATCH 'https://portal.igot-dev.in/api/workflow/taxonomy/update' \ 

--header 'userToken: {{userAuthToken}}' \ 

--header 'Authorization: bearer {{api-key}}' \ 

--header 'Content-Type: application/json' \ 

--data '{ 

    "wfId": "{{wfId}}", 

    "state": "SEND_FOR_PUBLISH", 

    "action": "APPROVE", 

    "serviceName": "taxonomy" 

}'