PATCH
/
projects
/
{projectIdOrName}
/
integrations
/
{integrationId}
/
installations
/
{installationId}
Update an installation
curl --request PATCH \
  --url https://api.withampersand.com/v1/projects/{projectIdOrName}/integrations/{integrationId}/installations/{installationId} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "updateMask": [
    "config.content.read.objects.contacts",
    "config.content.write.objects.leads"
  ],
  "installation": {
    "connectionId": "connection-123",
    "config": {
      "revisionId": "<string>",
      "createdBy": "<string>",
      "content": {
        "provider": "hubspot",
        "module": "crm",
        "read": {
          "objects": {}
        },
        "write": {
          "objects": {}
        },
        "proxy": {
          "enabled": true,
          "useModule": true
        }
      }
    }
  }
}'
{
  "id": "<string>",
  "projectId": "project-456",
  "integrationId": "<string>",
  "group": {
    "groupRef": "group-123",
    "groupName": "Super Customer",
    "projectId": "project-456",
    "createTime": "2023-07-13T21:34:44.816Z",
    "updateTime": "2023-07-13T21:34:44.816Z"
  },
  "healthStatus": "healthy",
  "connection": {
    "id": "connection-123",
    "projectId": "project-456",
    "provider": "salesforce",
    "providerApp": {
      "id": "provider-app-123",
      "projectId": "project-456",
      "externalRef": "external-id-123",
      "provider": "salesforce",
      "clientId": "client-id-123",
      "scopes": [
        [
          "oauth",
          "offline",
          "crm.read"
        ]
      ],
      "createTime": "2023-11-07T05:31:56Z",
      "updateTime": "2023-11-07T05:31:56Z"
    },
    "group": {
      "groupRef": "group-123",
      "groupName": "Super Customer",
      "projectId": "project-456",
      "createTime": "2023-07-13T21:34:44.816Z",
      "updateTime": "2023-07-13T21:34:44.816Z"
    },
    "consumer": {
      "consumerRef": "consumer-123",
      "consumerName": "Super Customer",
      "projectId": "project-456",
      "createTime": "2023-07-13T21:34:44.816Z",
      "updateTime": "2023-07-13T21:34:44.816Z"
    },
    "providerWorkspaceRef": "provider-workspace-123",
    "providerConsumerRef": "provider-consumer-123",
    "createTime": "2023-07-13T21:34:44.816Z",
    "updateTime": "2023-07-13T21:34:44.816Z",
    "authScheme": "oauth2/authorizationCode",
    "status": "working",
    "oauth2AuthorizationCode": {
      "accessToken": {
        "token": "<string>",
        "issuedAt": "2024-04-22T18:55:28.456076Z",
        "expiresAt": "2024-10-22T18:55:28.456076Z"
      },
      "refreshToken": {
        "token": "<string>",
        "issuedAt": "2024-04-22T18:55:28.456076Z",
        "expiresAt": "2024-10-22T18:55:28.456076Z"
      },
      "scopes": [
        "<string>"
      ]
    },
    "apiKey": "api-key-123",
    "providerMetadata": {}
  },
  "createTime": "2023-11-07T05:31:56Z",
  "createdBy": "consumer:consumer-123",
  "updateTime": "2023-11-07T05:31:56Z",
  "config": {
    "id": "config-123",
    "revisionId": "revision-123",
    "createTime": "2023-11-07T05:31:56Z",
    "createdBy": "builder:builder-123",
    "content": {
      "provider": "hubspot",
      "module": "crm",
      "read": {
        "objects": {}
      },
      "write": {
        "objects": {}
      },
      "proxy": {
        "enabled": true,
        "useModule": true
      },
      "subscribe": {
        "objects": {}
      }
    }
  }
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

projectIdOrName
string
required

The Ampersand project ID or project name.

integrationId
string
required

The integration ID.

installationId
string
required

The Ampersand installation ID.

Body

application/json
updateMask
string[]
required

Array of field paths specifying which fields to update. Allowed values include:

  • connectionId
  • config.createdBy
  • config.content.read.objects.<object-name>
  • config.content.write.objects.<object-name>
  • config.content.write.objects
  • config.content.subscribe.objects.<object-name>
  • config.content.proxy.enabled

<object-name> means you can specify any object name.

Example:
[
"config.content.read.objects.contacts",
"config.content.write.objects.leads"
]
installation
object
required

The installation fields to update. (Only include the fields you'd like to update.)

Response

The updated installation

id
string
required

The installation ID.

projectId
string
required

The Ampersand project ID.

Example:

"project-456"

integrationId
string
required

The integration ID.

healthStatus
string
required

The health status of the installation ("healthy", "unhealthy").

Example:

"healthy"

connection
object
required
createTime
string<date-time>
required

The time the integration was first installed.

createdBy
string
required

The person who did the installation, in the format of "consumer:{consumer-id}".

Example:

"consumer:consumer-123"

config
object
required
group
object
updateTime
string<date-time>

The time the installation was last updated with a new config.