Upsert integration
Creates or updates an integration for an OAuth client, with ownership verification. Application association is derived from the client.
Authorization
OAuth2 upl:privateOAuth 2.0 authorization
In: header
Scope: upl:private
Header Parameters
Define the version of the Connect protocol
Define the timeout, in ms
Request Body
application/json
The OAuth client ID that owns this integration. Empty asks upl to create an APPLICATION-mode integration's client: the caller's own in personal scope, or one in the team application application_id names.
uuid1 <= length <= 128Scoping mode: "none", "bucket", or "folder"
length <= 16Required when scoping = "bucket": the default bucket type for this integration
^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Required when scoping = "folder": controls how the integration folder behaves enum.defined_only = true
"INTEGRATION_FOLDER_BEHAVIOR_UNSPECIFIED" | "INTEGRATION_FOLDER_BEHAVIOR_LINK" | "INTEGRATION_FOLDER_BEHAVIOR_CONTENT_TYPE" | "INTEGRATION_FOLDER_BEHAVIOR_FOLDER"Required when folder_behavior = LINK: the URL to open uri_or_empty // must be a URI or empty
length <= 2048How the integration is surfaced to users. Set on create; immutable thereafter. Sending a different mode on update returns InvalidArgument. enum.defined_only = true
"INTEGRATION_MODE_UNSPECIFIED" | "INTEGRATION_MODE_OWNED" | "INTEGRATION_MODE_APPLICATION"When true (and mode = APPLICATION), the app appears as a launcher chip at the top of every bucket where it's installed. Ignored unless mode = APPLICATION. validate:skip a bool has no bounds
URL-safe namespace component of content type URNs. Set on create; immutable thereafter. Sending a different slug on update returns InvalidArgument. If omitted on create, derived from name. Format: lowercase letter + lowercase alphanumeric/hyphen, 2-64 chars. Reserved values: "default", "system", "uplim", "xeonr".
^[a-z][a-z0-9-]{0,62}[a-z0-9]$2 <= length <= 64When true, lists the integration in ListAvailableIntegrations so bucket admins can discover + install it. Settable on any mode; only takes effect for OWNED-mode integrations that aren't discoverable by default. Send via update_mask to flip. validate:skip a bool has no bounds
The owner to register the integration under, honoured on create only. A team requires the caller to hold the upl admin role there, and client_id must belong to an auth application that team owns, unless application_id asks upl to create the client. On update it must name the existing owner or be omitted: ownership does not change through upsert.
Team scope only, with an empty client_id and mode = APPLICATION: the auth application, owned by the owner_scope team, that upl creates the integration's hidden client in (system_managed_client, deleted with the integration). ListIntegrationTargets in team scope lists the candidates. Refused with a client_id, in personal scope, and for an application the team does not own.
1 <= length <= 128Response Body
application/json
application/json
curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.IntegrationAdminService/UpsertIntegration" \ -H "Connect-Protocol-Version: 1" \ -H "Connect-Timeout-Ms: 1000" \ -H "Content-Type: application/json" \ -d '{}'{
"integration": {
"integrationId": "string",
"oauthClientId": "string",
"oauthApplicationId": "6e68418e-eaad-4fd1-af9d-e9521eee4cbc",
"name": "string",
"apiKeyEnabled": true,
"scoping": "string",
"contentTypes": [
{
"id": "string",
"integrationId": "string",
"criteria": {
"kinds": [
"CONTENT_TARGET_KIND_UNSPECIFIED"
]
},
"renderer": {
"enabled": true,
"archiveUploadId": "0f00a816-1fc2-4597-bbce-ea7af713750b",
"entryPath": "string"
},
"openWith": {
"enabled": true,
"callbackUrl": "http://example.com"
},
"priority": 0,
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z",
"name": "string",
"displayLabel": "string",
"iconName": "string",
"matcher": "string",
"matcherPriority": 0,
"iconUploadId": "string",
"worker": {
"enabled": true,
"archiveUploadId": "0f00a816-1fc2-4597-bbce-ea7af713750b",
"entryPath": "string"
}
}
],
"defaultBucketTypeId": "9b1c8916-4239-4e84-b4d2-0740320b30d9",
"newFiles": [
{
"id": "string",
"integrationId": "string",
"name": "string",
"extension": "string",
"creationType": "NEW_FILE_CREATION_TYPE_UNSPECIFIED",
"defaultContent": {
"multiple": {
"files": {
"property1": {
"stringContent": "string"
},
"property2": {
"stringContent": "string"
}
}
}
},
"contentTypeId": "string",
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z"
}
],
"metadataKeys": [
{
"id": "string",
"integrationId": "string",
"key": "string",
"title": "string",
"iconName": "string",
"valueType": "METADATA_VALUE_TYPE_UNSPECIFIED",
"hiddenFromUsers": true,
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z"
}
],
"folderBehavior": "INTEGRATION_FOLDER_BEHAVIOR_UNSPECIFIED",
"folderLinkUrl": "http://example.com",
"mode": "INTEGRATION_MODE_UNSPECIFIED",
"bucketLauncherEnabled": true,
"slug": "string",
"isSystem": true,
"systemManagedClient": true,
"discoverable": true,
"ownerTeam": "string",
"ownerTeamSlug": "string",
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z"
}
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}