metadata:
  name: integrationArtifactGetServiceEndpoint
  description: Get an deployed CPI intgeration flow service endpoint
  longDescription: |
    With this step you can obtain information about the service endpoints exposed by SAP Cloud Platform Integration on a tenant using OData API. Learn more about the SAP Cloud Integration remote API for getting service endpoint of deployed integration artifact [here](https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/d1679a80543f46509a7329243b595bdb.html).

spec:
  inputs:
    secrets:
      - name: cpiApiServiceKeyCredentialsId
        description: Jenkins secret text credential ID containing the service key to the Process Integration Runtime service instance of plan 'api'
        type: jenkins
    params:
      - name: apiServiceKey
        type: string
        description: Service key JSON string to access the Process Integration Runtime service instance of plan 'api'
        scope:
          - PARAMETERS
        mandatory: true
        secret: true
        resourceRef:
          - name: cpiApiServiceKeyCredentialsId
            type: secret
            param: apiServiceKey
      - name: integrationFlowId
        type: string
        description: Specifies the ID of the Integration Flow artifact
        scope:
          - PARAMETERS
          - GENERAL
          - STAGES
          - STEPS
        mandatory: true
  outputs:
    resources:
      - name: commonPipelineEnvironment
        type: piperEnvironment
        params:
          - name: custom/integrationFlowServiceEndpoint
