Versions Compared

Key

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

...

Need to create user with CRONJOB as name and type as SYSTEM and ROLE as SYSTEM AND EMPLOYEE here is the sample curl to create the user.

Code Block
languagejson
curl --location --request POST 'http://localhost:8090/user/users/_createnovalidate'


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


--data-raw '{

  "RequestInfo": {

    "api_id": "1",

    "ver": "1",

    "ts": null,

    "action": "create",

    "did": "",

    "key": "",

    "msg_id": "",

    "requester_id": "",

    "userInfo":
{
 {
      "userName": "XXYY",

      "name": "NAME",

      "gender": "male",

      "mobileNumber": "XXYY",

      "active": true,

      "type": "EMPLOYEE",

      "tenantId": "pb",

      "password": "eGov@123",

      "roles":
[

{

 [
        {
          "code": "SUPERUSER",

          "tenantId": "pb"

}

]

}

},


        }
      ]
    }
  },
  "User": {

    "userName": "CRONJOB",

    "name": "CRONJOB",

    "gender": "male",

    "mobileNumber": "XXXXXX",

    "active": true,

    "type": "SYSTEM",

    "tenantId": "pb",

    "password": "eGov@123",

    "roles":
[

{

 [
      {
        "code": "SYSTEM",

        "tenantId": "pb"

},

{

"code": "EMPLOYEE",

"tenantId": "pb"

}

]

}


      }
    ]
  }
}'


Deployment:
When you build the cronjob you will get the build id like below.
api-cronjob:develop-c0aa08a-2
From this you will take the only id instead of complete name like develop-c0aa08a-2.  This will be used as the id for your respective yaml files and will be deployed the same to you required environment to test the cron job.
For example :

...