API Support for PDC connector
pending feedback
Z
Zinnwaldite Wren
We would like to request the ability to add retrieve and update PDC connector using API. This would enable combining IAC and CD stages in a single pipeline and update the service infra host IP on the fly.
Log In
Z
Zinnwaldite Wren
Thank you. This is working now.
Shylaja Sundararajan
pending feedback
Shylaja Sundararajan
curl --location 'https://app.harness.io/ng/api/connectors?routingId=OgiB4-xETamKNVAz-wQRjw&accountIdentifier=OgiB4-xETamKNVAz-wQRjw' \
--header 'content-type: application/json' \
--header 'x-api-key: your-api-key' \
--data '{
"connector": {
"name": "testPDC",
"description": "",
"projectIdentifier": "project",
"identifier": "testPDC",
"orgIdentifier": "default",
"tags": {},
"type": "Pdc",
"spec": {
"delegateSelectors": [],
}
}
}'
This post was marked as
in progress
Shylaja Sundararajan
We are looking into this issue and will share an update here
Z
Zinnwaldite Wren
I even tried the GET method
{"message":"Invalid request: Connector type [Pdc] is not supported","code":null,"errors":[],"error_metadata":null}
Z
Zinnwaldite Wren
Shylaja Sundararajan
I tried to use that but here is the error message
{
"code": 400,
"message": "Unable to process JSON",
"details": "Could not resolve type id 'Pdc' as a subtype of
io.harness.spec.server.connector.v1.model.ConnectorSpec
: known type ids = [Appdynamics, AppdynamicsClientId, Artifactory, ArtifactoryAnonymous, ArtifactoryEncrypted, AwsAccessKey, AwsCodeCommit, AwsEncryptedAccessKey, AwsIAMRole, AwsIRSA, AwsKmsAccessKey, AwsKmsAssumeIAM, AwsKmsAssumeSTS, AwsSecretManagerAccessKey, AwsSecretManagerAssumeIAM, AwsSecretManagerAssumeSTS, AzureClientCertificate, AzureClientSecretKey, AzureInheritFromDelegateSystemAssignedManagedIdentity, AzureInheritFromDelegateUserAssignedManagedIdentity, ConnectorSpec, GitHttp, GitHttpEncrypted, GitSsh] (for POJO property 'spec')"}
Shylaja Sundararajan
pending feedback
Shylaja Sundararajan
Could you check if this API can be used for this requirement