Versions Compared

Key

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

Problem Statement:

In sun-bird Sunbird system classification of terms and identify the relations (association) between terms belongs to different categories and show that in visual representation help user to creation and publishing of framework with categories.

...

  1. Save below "environment" and "taxonomyConfig" in local storage before initialize above library. (this need to change as input to a library) / Default configuration is available.

    Code Block
             environment =  {
                     frameworkName: string,   
                     channelId: string,
                     authToken: string,
                     isApprovalRequired:  boolen  // set default to false,
              }
    
             taxonomyConfig = {
                        frameworkId: string,
                        config: [
                            {
                                index:number,
                                category:string,
                                icon: 'string',
                                color: 'string'
                            }
                        ]
            }

...

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

...

  1. Create 

{{domain}} - Host address of the target

...

environment 

{{frameworkId}} – Framework

...

identifier from the target environment. 

{{

...

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

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

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

--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: applicationContent-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" 

            } 

        } 

    } 

}' 

...