Skip to main content
POST
/
api
/
v1
/
apps
/
{app_id}
/
connectors
/
create
Create
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.Create(ctx, operations.C1APIAppV1ConnectorServiceCreateRequest{
        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 field.

Body

application/json

The ConnectorServiceCreateRequest message.

catalogId
string

The catalogId field.

config
object

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

description
string

The description field.

expandMask
Connector Expand Mask · object

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

userIds
string[] | null

The userIds field.

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.