...
Example:- Education Taxonomy would look as below.
...
API’s Used:
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}}' |
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 '{}' |
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"
}
}
}' |
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"
}
}
}
}' |
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)
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}} ]
}' |
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}}"
}' |
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}}' |
Workflow Transition
{{wfId}} - wfId of the application \
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"
}' |
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"
}' |
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"
}' |