Skip to main content

Get started

Authentication​

To use the CI/CD Manager API, you need to authenticate with an access token:

  • For user-service interactions, copy your user access token directly from a given application in Guidewire Home.
  • For service-to-service interactions, use your client credentials to get a token with specific scopes. For details, see Before you begin.

Before you begin​

If you use the service-to-service interactions with the CI/CD Manager API for the first time:

  1. Decide which scopes you need.
  2. Register the API in Guidewire Hub. For details on how to register the API, see Access Cloud Platform APIs in the Cloud Platform documentation.

If you already registered the CI/CD Manager API and obtained the necessary credentials:

  1. Get an access token with the supported scopes.
  2. Use the generated token to make an authorized call.

User access token​

To authenticate with a user access token, you must be in the user group managed by Guidewire Hub. For details, see Access Cloud Platform apps and services.

Note:

An access token expires after 60 minutes.

You can get an access token directly from Guidewire Home:

  1. Log in to Guidewire Home.

  2. From Apps , select either CI Management or Quality Gates or select it from your pinned apps.

  3. Select your profile.

  4. Select Copy access token.

    This action copies an access token to your clipboard.

    Copy an access token in the CI Management app.


Supported scopes​

The CI/CD Manager API supports the following scopes:

ScopeDescription
cicd.insurerconfig.readGet a CI/CD configuration for an application.
cicd.insurerconfig.writeUpdate a CI/CD configuration for an application.
cicd.metadata.readList all the applications for a star system.
cicd.schedules.readGet a schedule configuration. List all the schedules for an application. List all the schedules for a star system.
cicd.schedules.writeCreate, update, and delete a schedule for an application.
cicd.postdeploymenttests.readGet the definition of a post-deployment test. List all the post-deployment tests for a star system.
cicd.postdeploymenttests.writeCreate, update, and delete a post-deployment test.
cicd.qualitygates.readGet the definition of a quality gate. List all the quality gates for a stage. List all the verifications for an artifact.
cicd.qualitygates.writeCreate, update, and delete quality gates and verifications.

Get an access token with supported scopes​

To get an access token with scopes, you must authenticate with Guidewire Hub using your client ID and client secret.

Send the following POST request:

curl -s --location --request POST ${GWHUB_URL} \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope=tenant.${TENANT_ID} project.${PROJECT_ID} ${SCOPES}" \
--data-urlencode "client_id=${GWHUB_CLIENT_ID}" \
--data-urlencode "client_secret=${GWHUB_CLIENT_SECRET}" | jq -r '.access_token'

Where:

  • ${GWHUB_URL} depends on your region. Use one of the following:

    RegionURL
    AMERhttps://guidewire-hub.okta.com/oauth2/aus11vix3uKEpIfSI357/v1/token
    BRAZILhttps://guidewire-hub.okta.com/oauth2/aus11vix3uKEpIfSI357/v1/token
    CANADAhttps://guidewire-hub.okta.com/oauth2/aus11vix3uKEpIfSI357/v1/token
    EMEAhttps://guidewire-hub-eu.okta.com/oauth2/ausc2q01c40dNZII0416/v1/token
    SWITZERLANDhttps://guidewire-hub-eu.okta.com/oauth2/ausc2q01c40dNZII0416/v1/token
    APAChttps://guidewire-hub-apac.okta.com/oauth2/ausbg05gfcTZQ7bpH3l6/v1/token
    JAPANhttps://guidewire-hub-apac.okta.com/oauth2/ausbg05gfcTZQ7bpH3l6/v1/token
  • ${SCOPES} is a list with at least one supported scope, separated by white spaces.

    Example: cicd.insurerconfig.read cicd.postdeploymenttests.write.

    For details on how to get or extend scopes, see Access Cloud Platform APIs.

  • ${GWHUB_CLIENT_ID} is a unique identifier for the application that you use to obtain a token from Guidewire Hub. For details on how to get the client ID, see Access Cloud Platform APIs.

  • ${GWHUB_CLIENT_SECRET} is a secret for the application that you use to obtain a token from Guidewire Hub. For details on how to get the client secret, see Access Cloud Platform APIs.


The response contains a JSON object with the requested access token:

Example response
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "xxxxxxxx",
"scope": "cicd.insurerconfig.read tenant.${TENANT_ID} project.${PROJECT_ID}"
}

Make an authorized call​

To authorize the API requests, add the obtained access token to an Authorization header:

Authorization: Bearer ${ACCESS_TOKEN}

For example:

curl -s --location --request GET "${CICD_MANAGER_URL}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${ACCESS_TOKEN}"

Base URLs​

When the documentation refers to {baseUrl}, replace it with the correct URL for your region. Depending on your region, use one of the following base URLs:

RegionURL
AMERhttps://cicd-manager-service.api.omega2-andromeda.guidewire.net
BRAZILhttps://cicd-manager-service.api.omega2-sculptor.guidewire.net
CANADAhttps://cicd-manager-service.api.omega2-butterfly.guidewire.net
EMEAhttps://cicd-manager-service.api.omega2-cartwheel.guidewire.net
SWITZERLANDhttps://cicd-manager-service.api.omega2-whirlpool.guidewire.net
APAChttps://cicd-manager-service.api.omega2-circinus.guidewire.net
JAPANhttps://cicd-manager-service.api.omega2-milkyway.guidewire.net

Note:

Your region is the region in which you log in to Guidewire Home.