Sorry, we didn't find any relevant articles for you.

Send us your queries using the form below and we will get back to you with a solution.

Curl Commands for accessing the GenRocket Artifacts

Description

CURL Commands can be used to do the following in the REST API:

Login API

CURL COMMAND BELOW:

curl -X POST -H "Content-Type: application/json" -d '{"username": " Provide username here ","password": " Provide password here "}' https://app.genrocket.com/rest/login
Generic

CURL to get list of Scenarios

curl -X POST " https://app.genrocket.com/rest/scenario/list " -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API " -H "Content-Type: application/json" -d '{"organizationId":" Organization external id ","projectName": " Project Name here ","versionNumber":" Project Version Here "}'
Generic

CURL to Download a Scenario

curl -X POST " https://app.genrocket.com/rest/scenario/download " -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API " -H "Content-Type: application/json" -d '{"scenarioId": " ExternalId from previous Scenario List API response "}' --output " provide name from previous response and ends with .grs "
Generic

CURL to Validate Scenario Download

curl --location 
'https://app.genrocket.com/rest/scenario/validate/download' \
--header 'accept: application/json' \
--header 'x-auth-token: YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "scenarioId": "ExternalId from previous Scenario List API response"
}'
Generic

CURL to get the list of Scenario Chains

CURL COMMAND BELOW:

curl -X POST " https://app.genrocket.com/rest/chain/list " -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API " -H "Content-Type: application/json" -d '{"organizationId":" Organization external id ","projectName": " Project Name here ","versionNumber":" Project Version Here "}'
Generic

----Response of above CURL

{
"chains": [
     {
         "name": "Parquet1ScenarioChain",
         "description": null,
         "externalId": "sample-external-id",
         "scenarios": [
             {
                "name": "GrRootScenario"
              },
              {
                 "name": "MergeScenario"
              }
           ]
       }
   ]
}
Generic

CURL to Download Scenario Chain

CURL COMMAND BELOW:

curl -X POST " https://app.genrocket.com/rest/chain/download " -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API " -H "Content-Type: application/json" -d '{"chainId": " ExternalId from previous Scenario Chain List API response "}' --output " provide name from previous response and ends with .grs "
Generic

Note: Output name will be named from the previous response and append .grs at the end of the name like Parquet1ScenarioChain.grs.

CURL to get the list of Scenario Chain Set

CURL COMMAND BELOW:

curl -X POST " https://app.genrocket.com/rest/chainSet/list " -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API " -H "Content-Type: application/json" -d '{"organizationId":" Organization external id ","projectName": " project name here ","versionNumber":" Project version here "}' 
Generic

CURL to Download Scenario Chain Sets

CURL COMMAND BELOW:

curl -X POST " https://app.genrocket.com/rest/chainSet/download " -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API " -H "Content-Type: application/json" -d '{"chainSetId":" provide external id from Scenario Chain Set List api response "}' --output " provide name from previous response and ends with .grs "
Generic

Note: Output name will be named from the previous response and append .grs at the end of the name like Avro1ScenarioChainSet.grs.

CURL to Download Offline Certificate

CURL COMMAND BELOW:

dateTime=`date '+%d-%m-%Y-%H-%M'` && curl -k -X POST
"https://app.genrocket.com /rest/offlineCertificate/download" -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API" -H "Content-Type: application/json" -d
"{\"organizationId\":\" Organization external id \",\"dateTime\":
\"${dateTime}\"}" --output "GRXXXXXXXCertificate.grc"
Generic

Note: GRXXXXXXX detail we can get from ProfileId in MyOrganization and Certificate.grc at end like GR1234567Certificate.grc and that will same for all member of your organization and no need to edit dateTime parameter in JSON request,

CURL to Validate Offline Certificate Download

curl --location 'https://app.genrocket.com/rest/offlineCertificate/validate/download' \
--header 'accept: application/json' \
--header 'x-auth-token: <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "organizationId": "<Organization External ID>"
}'
Generic

CURL to get the list of Configuration Files

CURL COMMAND BELOW:

curl -X POST " https://app.genrocket.com/rest/configuration/list " -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API" -H "Content-Type: application/json" -d '{"organizationId":" Organization external id ","projectName": " project name here ","versionNumber":" project version here "}'
Generic

----response sample

{
   "configs":
      [
         {
            "name": "AvroConfig",
            "fileName": "AvroConfig.xml",
            "configType": "AVRO",
            "requestURL": null
         },
         {
            "name": "Config",
            "fileName": "Config.xml",
            "configType": "JSON",
            "requestURL": null
         },
         {
            "name": "JSONConfig",
            "fileName": "JSONConfig.xml",
            "configType": "JSON",
            "requestURL": null
          }
      ]
  }
Generic

CURL to Download Offline Certificate for GMUS

CURL COMMAND BELOW:

curl -X POST "https://app.genrocket.com/rest/offlineCertificate/gmus/download" -H "accept: application/json" -H "x-auth-token:<TokenReceiverFromLoginRquest>" -H "Content-Type: application/json" -d "{'applicationId': '<applicationId>'}" --output "<profileId>GMUSCertificate.grc"
Generic

Note: GRXXXXXXX detail we can get from ProfileId in My Organization and Certificate.grc at the end like GR1234567GMUSCertificate.grc and that will same for all members of your organization.

CURL to Download Configuration File

CURL COMMAND BELOW:

curl -X POST " https://app.genrocket.com/rest/configuration/download " -H "accept: application/json" -H "x-auth-token: Access token received from Rest Login API " -H "Content-Type: application/json" -d '{"organizationId":" Organization external id ","projectName": " Project name here ","versionNumber":" Project version here ", "configName": " Provide name from previous Configuration List API response "}' --output " provide file name from previous API response "