Authentication
WRITE API
- Write
READ API
- Read
PLATFORM API
- OAuth
- Project
- Provider App
- Integration
- Revision
- Installation
- Objects & Fields
- Operation
- Provider
- API Key
- Connection
- Group
- Consumer
- Destination
- Upload URL
- Org
- User
- Billing Account
Update a connection.
Update an existing connection.
curl --request PATCH \
--url https://api.withampersand.com/v1/projects/{projectIdOrName}/connections/{connectionId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"updateMask": [
"<string>"
],
"connection": {
"providerWorkspaceRef": "<string>",
"providerMetadata": {},
"groupName": "<string>",
"groupRef": "group-123",
"consumerName": "<string>",
"consumerRef": "<string>",
"provider": "<string>",
"apiKey": "<string>",
"basicAuth": {
"username": "<string>",
"password": "<string>"
},
"oauth2ClientCredentials": {
"clientId": "<string>",
"clientSecret": "<string>",
"scopes": [
"<string>"
]
},
"oauth2PasswordCredentials": {
"username": "<string>",
"password": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"scopes": [
"<string>"
]
},
"oauth2AuthorizationCode": {
"accessToken": {
"token": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"issuedAt": "2023-11-07T05:31:56Z"
},
"refreshToken": {
"token": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"issuedAt": "2023-11-07T05:31:56Z"
},
"scopes": [
"<string>"
]
}
}
}'
{
"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": {}
}
Authorizations
Path Parameters
Project ID or Name.
Connection ID.
Body
The fields to update.
The ID of the provider workspace that this connection belongs to.
The value of the metadata field
"1234567890"
The source of the metadata field
input
, token
, provider
"input"
The human-readable name for the field
"Account ID"
The name of the user group that has access to this installation.
The ID of the user group that has access to this installation.
"group-123"
The name of the consumer that has access to this installation.
The consumer reference.
The provider name (e.g. "salesforce", "hubspot")
The API key to use for the connection.
The username to use for the connection.
The password to use for the connection.
The client ID to use for the connection.
The client secret to use for the connection.
The scopes for the tokens.
The scopes for the tokens.
Response
The connection ID.
"connection-123"
The Ampersand project ID.
"project-456"
The SaaS provider that this Connection is for.
"salesforce"
The ID of the user group that has access to this installation.
"group-123"
The name of the user group that has access to this installation.
"Super Customer"
The Ampersand project ID.
"project-456"
The time the group was created.
"2023-07-13T21:34:44.816Z"
The time the group was last updated.
"2023-07-13T21:34:44.816Z"
The consumer reference.
"consumer-123"
The name of the consumer.
"Super Customer"
The Ampersand project ID.
"project-456"
The time the consumer was created.
"2023-07-13T21:34:44.816Z"
The time the consumer was last updated.
"2023-07-13T21:34:44.816Z"
The time the connection was created.
"2023-07-13T21:34:44.816Z"
The authentication scheme used for this connection.
none
, apiKey
, basic
, oauth2/authorizationCode
, oauth2/authorizationCodePKCE
, oauth2/clientCredentials
, oauth2/password
"oauth2/authorizationCode"
The status of the connection.
created
, working
, bad_credentials
"working"
The provider app ID.
"provider-app-123"
The Ampersand project ID.
"project-456"
The SaaS provider that this app connects to.
"salesforce"
The OAuth client ID for this app.
"client-id-123"
The time the provider app was created.
The ID used by the provider to identify the app (optional).
"external-id-123"
The OAuth scopes for this app.
The time the provider app was updated.
If available, the identifier for the provider workspace (e.g. the Salesforce subdomain)
"provider-workspace-123"
If available, the ID that Salesforce/Hubspot uses to identify this user (e.g. Salesforce has IDs in the form of https://login.salesforce.com/id/00D4x0000019CQTEA2/0054x000000orJ4AA)
"provider-consumer-123"
The time the connection was last updated.
"2023-07-13T21:34:44.816Z"
The scopes for the tokens.
The API key used while making the connection.
"api-key-123"
The value of the metadata field
"1234567890"
The source of the metadata field
input
, token
, provider
"input"
The human-readable name for the field
"Account ID"
Was this page helpful?
curl --request PATCH \
--url https://api.withampersand.com/v1/projects/{projectIdOrName}/connections/{connectionId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"updateMask": [
"<string>"
],
"connection": {
"providerWorkspaceRef": "<string>",
"providerMetadata": {},
"groupName": "<string>",
"groupRef": "group-123",
"consumerName": "<string>",
"consumerRef": "<string>",
"provider": "<string>",
"apiKey": "<string>",
"basicAuth": {
"username": "<string>",
"password": "<string>"
},
"oauth2ClientCredentials": {
"clientId": "<string>",
"clientSecret": "<string>",
"scopes": [
"<string>"
]
},
"oauth2PasswordCredentials": {
"username": "<string>",
"password": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"scopes": [
"<string>"
]
},
"oauth2AuthorizationCode": {
"accessToken": {
"token": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"issuedAt": "2023-11-07T05:31:56Z"
},
"refreshToken": {
"token": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"issuedAt": "2023-11-07T05:31:56Z"
},
"scopes": [
"<string>"
]
}
}
}'
{
"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": {}
}