Skip to main content
POST
/
api
/
v1
/
apps
/
{app_id}
/
connectors
CreateDelegated
package main

import(
	"context"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := conductoronesdkgo.New(
        conductoronesdkgo.WithSecurity(shared.Security{
            BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
            Oauth: "<YOUR_OAUTH_HERE>",
        }),
    )

    res, err := s.Connector.CreateDelegated(ctx, operations.C1APIAppV1ConnectorServiceCreateDelegatedRequest{
        AppID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.ConnectorServiceCreateResponse != nil {
        // handle response
    }
}
{
  "connectorView": {
    "appPath": "<string>",
    "capabilitiesPath": "<string>",
    "connector": {
      "appId": "<string>",
      "canResumeSync": true,
      "catalogId": "<string>",
      "config": {
        "@type": "<string>"
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "disableCheckBadSync": true,
      "displayName": "<string>",
      "downloadUrl": "<string>",
      "id": "<string>",
      "oauthAuthorizedAs": {
        "authEmail": "<string>",
        "authorizedAt": "2023-11-07T05:31:56Z"
      },
      "profileAllowList": [
        "<string>"
      ],
      "profileIgnoreList": [
        "<string>"
      ],
      "status": {
        "completedAt": "2023-11-07T05:31:56Z",
        "lastError": "<string>",
        "startedAt": "2023-11-07T05:31:56Z",
        "status": "SYNC_STATUS_UNSPECIFIED",
        "updatedAt": "2023-11-07T05:31:56Z"
      },
      "syncConfig": {
        "syncResourceTypeIds": [
          "<string>"
        ]
      },
      "syncDisabledAt": "2023-11-07T05:31:56Z",
      "syncDisabledCategory": "<string>",
      "syncDisabledReason": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z",
      "userIds": [
        "<string>"
      ]
    },
    "usersPath": "<string>"
  },
  "expanded": [
    {
      "@type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Path Parameters

app_id
string
required

The appId of the app the connector is attached to.

Body

application/json

The ConnectorServiceCreateDelegatedRequest message contains the fields required to create a connector.

appManagedStateBindingRef
App Managed State Binding Ref · object

The AppManagedStateBindingRef message.

catalogId
string

The catalogId describes which catalog entry this connector is an instance of. For example, every Okta connector will have the same catalogId indicating it is an Okta connector.

description
string

The description of the connector.

displayName
string

The displayName of the connector.

expandMask
Connector Expand Mask · object

The ConnectorExpandMask is used to expand related objects on a connector.

userIds
string[] | null

The userIds field is used to define the integration owners of the connector.

Response

200 - application/json

The ConnectorServiceCreateResponse is the response returned from creating a connector.

The ConnectorServiceCreateResponse is the response returned from creating a connector.

connectorView
Connector View · object

The ConnectorView object provides a connector response object, as well as JSONPATHs to related objects provided by expanders.

expanded
object[] | null

The array of expanded items indicated by the request.