Admin API

Admin API


Die Admin API stellt Schnittstellen zum Benutzer-, Profil- und Organisations-Management zur Verfügung.

Authentifizierung

Um die Admin APIs aufzurufen, muss in der primedocs.config solch ein Client registriert sein, siehe hierfür primedocs.config.

Nach der Registrierung kann damit ein AccessToken vom IdS angefordert werden.

Dieses PowerShell-Beispiel zeigt den Bezug des AccessTokens:

# Configuration $datasourceId = "b78c3707-d7c7-4fc7-b97f-87d70f63c1ac" $tokenUrl = "https://customerserver.local/ids/connect/token" $clientID = "CustomApiClient" $clientSecret = "CustomClient_Secret_123" $scope = "pd_AdminWebApi" $tokenRequestHeaders = @{ "Content-Type" = "application/x-www-form-urlencoded" } $tokenRequestBody = @{ client_id = $clientID client_secret = $clientSecret grant_type = "client_credentials" scope = $scope } # Request the access token try { $tokenResponse = Invoke-RestMethod -Uri $tokenUrl -Method POST -Headers $tokenRequestHeaders -Body $tokenRequestBody } catch { Write-Error "Error making the request: $_" exit 1; } if (-not $tokenResponse.access_token) { Write-Error "Failed to obtain an access token!" exit 1 } # Access token information Write-Host "Access Token: $($tokenResponse.access_token)" $accessToken = $tokenResponse.access_token

Beispiele

Dieses AccessToken muss bei allen Aufrufen in den Authorization-Header mitgegeben werden. Die API lässt aktuell das Auflisten, Anlegen und Bearbeiten von Benutzern zu. Nachfolgend sind Beispiele zu finden:

Benutzer auflisten

Damit werden vorhandene Benutzer aufgelistet:

# Prepare headers for request $apiRequestHeaders = @{ "Authorization" = "Bearer $accessToken" } Write-Host "Getting users..." $pageSize = Read-Host "Enter pagesize" $page = Read-Host "Enter page" try { $apiUrl = "https://customerserver.local/webapi/api/v3/$($datasourceId)/Admin/Users?pageSize=$($pageSize)&page=$($page)" $response = Invoke-RestMethod -Uri $apiUrl -Method GET -Headers $apiRequestHeaders foreach ($user in $response.data) { Write-Output "$($user.id): '$($user.title)'" } Write-Output "Page: $($response.pagingDetails.page) / $($response.pagingDetails.totalPages)" } catch { Write-Error "Error making the request: $_" exit 1; }

Benutzer-Onboarding

Über diesen Aufruf kann ein neuer Benutzer anhand der SID hinzugefügt werden. Es wird dann automatisch der Benutzer Onboarding & Offboarding Prozess durchlaufen.

# Prepare headers for request $apiRequestHeaders = @{ "Authorization" = "Bearer $accessToken" } $sid = Read-Host "Enter SID" Write-Host "Creating and onboarding user with SID: $sid" try { $apiUrl = "https://customerserver.local/webapi/api/v3/$($datasourceId)/Admin/Users?sid=" + $sid; $user = Invoke-RestMethod -Uri $apiUrl -Method POST -Headers $apiRequestHeaders Write-Output "Onboarded '$($user.title)' with id '$($user.id)'"; } catch { Write-Error "Error making the request: $_" exit 1; }

PowerShell Script

Nachfolgend finden Sie ein vollständiges Beispiel PowerShell Script (für die Version 4.0.20181), welches verschiedene UseCases abdeckt.

Die datasourceId, clientId und clientSecret samt allen Vorkommen der URL https://localhost:.. muss geändert werden auf die Einstellung von Ihrer Umgebung.

# Configuration $datasourceId = "b78c3707-d7c7-4fc7-b97f-87d70f63c1ac" $tokenUrl = "https://localhost:5020/connect/token" $clientID = "ApiClient" $clientSecret = "Client_Secret_123" $scope = "pd_AdminWebApi" $tokenRequestHeaders = @{ "Content-Type" = "application/x-www-form-urlencoded" } $tokenRequestBody = @{ client_id = $clientID client_secret = $clientSecret grant_type = "client_credentials" scope = $scope } # Request the access token try { $tokenResponse = Invoke-RestMethod -Uri $tokenUrl -Method POST -Headers $tokenRequestHeaders -Body $tokenRequestBody } catch { Write-Error "Error making the request: $_" exit 1; } if (-not $tokenResponse.access_token) { Write-Error "Failed to obtain an access token!" exit 1 } # Access token information Write-Host "Access Token: $($tokenResponse.access_token)" $accessToken = $tokenResponse.access_token # Prepare headers for request $apiRequestHeaders = @{ "Authorization" = "Bearer $accessToken" } $putBodyRequestHeaders = @{ "Content-Type" = "application/json" "Authorization" = "Bearer $accessToken" } function Show-Menu { Write-Host "================ Main Menu ================" Write-Host "1: Get Users" Write-Host "2: Get User Details" Write-Host "3: Update User" Write-Host "4: Create and Onboard User" Write-Host "5: Get Profile" Write-Host "6: Profile Update" Write-Host "7: Add Profile Share" Write-Host "8: Delete Profile Share" Write-Host "9: Create and Onboard Group" Write-Host "10: Get Groups" Write-Host "11: Get Organization Units" Write-Host "12: Get Organization Unit Details" Write-Host "13: Get Organization Unit Children" Write-Host "14: Update Organization Unit" Write-Host "Q: Exit" } function GetUsers { Write-Host "Getting users..." $pageSize = Read-Host "Enter pagesize" $page = Read-Host "Enter page" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Users?pageSize=$($pageSize)&page=$($page)" $response = Invoke-RestMethod -Uri $apiUrl -Method GET -Headers $apiRequestHeaders foreach ($user in $response.data) { Write-Output "$($user.id): '$($user.title)'" } Write-Output "Page: $($response.pagingDetails.page) / $($response.pagingDetails.totalPages)" } catch { Write-Error "Error making the request: $_" exit 1; } } function GetUserDetails { $userId = Read-Host "Enter UserId" Write-Host "Getting details for user: $userId" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Users/" + $userId; $user = Invoke-RestMethod -Uri $apiUrl -Method GET -Headers $apiRequestHeaders Write-Output "Id: '$($user.id)'" Write-Output "Title: '$($user.title)'"; Write-Output "Profiles: " foreach ($profile in $user.profiles) { Write-Output "'$($profile.id)': '$($profile.title) (Profile OU: '$($profile.organizationUnitId)')" } } catch { Write-Error "Error making the request: $_" exit 1; } } function CreateAndOnBoardUser { $sid = Read-Host "Enter SID" Write-Host "Creating and onboarding user with SID: $sid" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Users?sid=" + $sid; $user = Invoke-RestMethod -Uri $apiUrl -Method POST -Headers $apiRequestHeaders Write-Output "Onboarded '$($user.title)' with id '$($user.id)'"; } catch { Write-Error "Error making the request: $_" exit 1; } } function CreateAndOnBoardGroup { $sid = Read-Host "Enter SID" Write-Host "Creating and onboarding Group with SID: $sid" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Groups?sid=" + $sid; $group = Invoke-RestMethod -Uri $apiUrl -Method POST -Headers $apiRequestHeaders Write-Output "Onboarded '$($group.title)' with id '$($group.id)'"; } catch { Write-Error "Error making the request: $_" exit 1; } } function GetGroups { Write-Host "Getting Groups..." $pageSize = Read-Host "Enter pagesize" $page = Read-Host "Enter page" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Groups?pageSize=$($pageSize)&page=$($page)" $response = Invoke-RestMethod -Uri $apiUrl -Method GET -Headers $apiRequestHeaders foreach ($group in $response.data) { Write-Output "$($group.id): '$($group.title)'" } Write-Output "Page: $($response.pagingDetails.page) / $($response.pagingDetails.totalPages)" } catch { Write-Error "Error making the request: $_" exit 1; } } function ProfileUpdate { $userId = Read-Host "Enter User ID" $profileId = Read-Host "Enter Profile ID" $title = Read-Host "Enter Title" $organizationUnitId = Read-Host "Enter New Organization Unit ID" $lcid = 1031 #Read-Host "Enter lcid" $field = "Org.Title" # Read-Host "Enter Field" $field2 = "User.FirstName" # Read-Host "Enter Field" $text = Read-Host "Enter New Org.Title Value (Empty = delete)" $text2 = Read-Host "Enter New User.FirstName Value (Empty = delete)" Write-Host "Updating profile for User ID: $userId, Profile ID: $profileId, Title: $title, Organization Unit ID: $organizationUnitId" try { $body = @{ Title = $title; OrganizationUnitId = $organizationUnitId ? [System.Guid]::Parse($organizationUnitId) : $null FieldChanges = @( @{ Lcid = $lcid Field = $field Text = $text Purge = ($text -eq "") }, @{ Lcid = $lcid Field = $field2 Text = $text2 Purge = ($text2 -eq "") } ) } $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Users/$($userId)/Profiles/$($profileId)"; # Ensure UTF-8 Encoding $utf8body = ([System.Text.Encoding]::UTF8.GetBytes(($body | ConvertTo-Json))) Invoke-RestMethod -Uri $apiUrl -Method PUT -Headers $putBodyRequestHeaders -Body $utf8body } catch { Write-Error "Error making the request: $_" exit 1; } } function GetProfile { $userId = Read-Host "Enter User ID" $profileId = Read-Host "Enter Profile ID" Write-Host "Getting profile for User ID: $userId, Profile ID: $profileId" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Users/" + $userId + "/Profiles/" + $profileId; $userProfile = Invoke-RestMethod -Uri $apiUrl -Method GET -Headers $apiRequestHeaders Write-Output "Id: '$($userProfile.id)'" Write-Output "Title: '$($userProfile.title)'"; Write-Output "ProfileShares: " foreach ($share in $userProfile.profileShares) { if ($share.userId -ne $null) { Write-Output "'$($share.id)': UserId:'$($share.userId)', ProfilePermissionLevel:'$($share.profilePermissionLevel)', SignaturePermissionLevel:'$($share.signaturePermissionLevel)'" } if ($share.groupId -ne $null) { Write-Output "'$($share.id)': GroupId:'$($share.groupId)', ProfilePermissionLevel:'$($share.profilePermissionLevel)', SignaturePermissionLevel:'$($share.signaturePermissionLevel)'" } if ($share.appUserGroupId -ne $null) { Write-Output "'$($share.id)': AppUserGroupId:'$($share.appUserGroupId)', ProfilePermissionLevel:'$($share.profilePermissionLevel)', SignaturePermissionLevel:'$($share.signaturePermissionLevel)'" } } } catch { Write-Error "Error making the request: $_" exit 1; } } function AddProfileShare { $userId = Read-Host "Enter User ID" $profileId = Read-Host "Enter Profile ID" Write-Host "Enter either User ID or Group ID or AppUserGroup ID to access the profile. Leave two of them empty." $shareUserId = Read-Host "Enter User ID (or empty)" $shareGroupId = Read-Host "Enter Group ID (or empty)" $shareAppUserGroupId = Read-Host "Enter AppUserGroup ID (or empty)" Write-Host " " Write-Host "0: Profile share cannot be used as 'regular' profile" Write-Host "1: Profile share can be used as 'regular' profile, but will be marked 'on behalf'" Write-Host "2: Profile share can be used as 'regular' profile and impersonation is allowed" $profilePermissionLevel = Read-Host "Enter Profile Permission Level" Write-Host " " Write-Host "0: Signature share cannot be used for document signing" Write-Host "1: Signature share can be used for document signing, but without real signature image" Write-Host "2: Signature share can be used for document signing with real signature image" $signaturePermissionLevel = Read-Host "Enter Signature Permission Level" try { $body = @{ UserId = $shareUserId -eq "" ? $null : $shareUserId GroupId = $shareGroupId -eq "" ? $null : $shareGroupId AppUserGroupId = $shareAppUserGroupId -eq "" ? $null : $shareAppUserGroupId profilePermissionLevel = $profilePermissionLevel; signaturePermissionLevel = $signaturePermissionLevel } $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Users/$($userId)/Profiles/$($profileId)/ProfileShares"; # Ensure UTF-8 Encoding $utf8body = ([System.Text.Encoding]::UTF8.GetBytes(($body | ConvertTo-Json))) Invoke-RestMethod -Uri $apiUrl -Method POST -Headers $putBodyRequestHeaders -Body $utf8body } catch { Write-Error "Error making the request: $_" exit 1; } } function DeleteProfileShare { $userId = Read-Host "Enter User ID" $profileId = Read-Host "Enter Profile ID" $profileShareId = Read-Host "Enter Profile Share ID" Write-Host "Deleting profile share for User ID: $userId, Profile ID: $profileId, Profile Share ID: $profileShareId" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Users/$($userId)/Profiles/$($profileId)/ProfileShares/$($profileShareId)"; Invoke-RestMethod -Uri $apiUrl -Method DELETE -Headers $putBodyRequestHeaders } catch { Write-Error "Error making the request: $_" exit 1; } } function GetOrganizationUnits { Write-Host "Getting organization units..." $pageSize = Read-Host "Enter pagesize" $page = Read-Host "Enter page" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/OrganizationUnits?pageSize=$($pageSize)&page=$($page)"; $response = Invoke-RestMethod -Uri $apiUrl -Method GET -Headers $apiRequestHeaders foreach ($organizationUnit in $response.data) { Write-Output "$($organizationUnit.id): '$($organizationUnit.title)'" } Write-Output "Page: $($response.pagingDetails.page) / $($response.pagingDetails.totalPages)" } catch { Write-Error "Error making the request: $_" exit 1; } } function GetOrganizationUnitDetails { $organizationUnitId = Read-Host "Enter Organization Unit ID" Write-Host "Getting details for organization unit: $organizationUnitId" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/OrganizationUnits/" + $organizationUnitId; $organizationUnit = Invoke-RestMethod -Uri $apiUrl -Method GET -Headers $apiRequestHeaders Write-Output "Id: '$($organizationUnit.id)'" Write-Output "Title: '$($organizationUnit.title)'"; Write-Output "ParentId: '$($organizationUnit.parentId)'"; } catch { Write-Error "Error making the request: $_" exit 1; } } function GetOrganizationUnitChildren { $organizationUnitId = Read-Host "Enter Organization Unit ID" Write-Host "Getting children for organization unit: $organizationUnitId" try { $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/OrganizationUnits/" + $organizationUnitId + "/Children"; $response = Invoke-RestMethod -Uri $apiUrl -Method GET -Headers $apiRequestHeaders foreach ($organizationUnit in $response.data) { Write-Output "$($organizationUnit.id): '$($organizationUnit.title)'" } Write-Output "Page: $($response.pagingDetails.page) / $($response.pagingDetails.totalPages)" } catch { Write-Error "Error making the request: $_" exit 1; } } function UpdateOrganizationUnit { Write-Host "Updating organization unit" $organizationUnitId = Read-Host "Enter Organization Unit ID" $title = Read-Host "Enter New Title" $parentOrganizationUnitId = Read-Host "Enter New Parent Organization Unit ID" $lcid = 1031 #Read-Host "Enter lcid" $field = "Org.Title" # Read-Host "Enter Field" $field2 = "Org.Claim" # Read-Host "Enter Field" $text = Read-Host "Enter New Org.Title Value (Empty = delete)" $text2 = Read-Host "Enter New Org.Claim Value (Empty = delete)" Write-Host "Updating organization unit, Title: $title, Organization Unit ID: $organizationUnitId" try { $body = @{ Title = $title OrganizationUnitParentId = $parentOrganizationUnitId ? [System.Guid]::Parse($parentOrganizationUnitId) : $null FieldChanges = @( @{ Lcid = $lcid Field = $field Text = $text Purge = ($text -eq "") }, @{ Lcid = $lcid Field = $field2 Text = $text2 Purge = ($text2 -eq "") } ) } $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/OrganizationUnits/$($organizationUnitId)"; # Ensure UTF-8 Encoding $utf8body = ([System.Text.Encoding]::UTF8.GetBytes(($body | ConvertTo-Json))) Invoke-RestMethod -Uri $apiUrl -Method PUT -Headers $putBodyRequestHeaders -Body $utf8body } catch { Write-Error "Error making the request: $_" exit 1; } } function UpdateUser { $userId = Read-Host "Enter User ID" $title = Read-Host "Enter New Title" $lcid = 1031 #Read-Host "Enter lcid" $field = "User.FirstName" # Read-Host "Enter Field" $field2 = "User.LastName" # Read-Host "Enter Field" $text = Read-Host "Enter New User.FirstName Value (Empty = delete)" $text2 = Read-Host "Enter New User.LastName Value (Empty = delete)" Write-Host "Updating user, Title: $title, User ID: $userId" try { $body = @{ Title = $title FieldChanges = @( @{ Lcid = $lcid Field = $field Text = $text Purge = ($text -eq "") }, @{ Lcid = $lcid Field = $field2 Text = $text2 Purge = ($text2 -eq "") } ) } $apiUrl = "https://localhost:5001/api/v3/$($datasourceId)/Admin/Users/$($userId)"; # Ensure UTF-8 Encoding $utf8body = ([System.Text.Encoding]::UTF8.GetBytes(($body | ConvertTo-Json))) Invoke-RestMethod -Uri $apiUrl -Method PUT -Headers $putBodyRequestHeaders -Body $utf8body } catch { Write-Error "Error making the request: $_" exit 1; } } do { Show-Menu $selection = Read-Host "Please select an option" switch ($selection) { '1' { GetUsers } '2' { GetUserDetails } '3' { UpdateUser } '4' { CreateAndOnBoardUser } '5' { GetProfile } '6' { ProfileUpdate } '7' { AddProfileShare } '8' { DeleteProfileShare } '9' { CreateAndOnBoardGroup } '10' { GetGroups } '11' { GetOrganizationUnits } '12' { GetOrganizationUnitDetails } '13' { GetOrganizationUnitChildren } '14' { UpdateOrganizationUnit } 'Q' { break; } Default { Write-Host "Invalid option selected" } } } while ($selection -ne 'Q')

Swagger / Open API

Die aktuelle Admin API Open API sieht in der Version 4.0.20171 folgendermassen aus. Sie können diese Beschreibung z.B. über den Swagger Editor visualisieren.

{ "openapi": "3.0.1", "info": { "title": "primedocs WebApi", "version": "v3" }, "servers": [ { "url": "/webapi" } ], "paths": { "/api/v3/{datasourceId}/Admin/Groups": { "get": { "tags": [ "AdminGroup" ], "parameters": [ { "name": "PageSize", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "Page", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedResponse`1<AdminGroupInfo[]v3>" } } } } } }, "post": { "tags": [ "AdminGroup" ], "parameters": [ { "name": "sid", "in": "query", "schema": { "type": "string" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminGroupInfoV3" } } } } } } }, "/api/v3/{datasourceId}/Admin/OrganizationUnits": { "get": { "tags": [ "AdminOrganizationUnit" ], "parameters": [ { "name": "PageSize", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "Page", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedResponse`1<AdminOrganizationUnitInfo[]v3>" } } } } } } }, "/api/v3/{datasourceId}/Admin/OrganizationUnits/{organizationUnitId}": { "get": { "tags": [ "AdminOrganizationUnit" ], "parameters": [ { "name": "organizationUnitId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminOrganizationUnitDetailInfoV3" } } } } } }, "put": { "tags": [ "AdminOrganizationUnit" ], "parameters": [ { "name": "organizationUnitId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminOrganizationUnitEditV3" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdminOrganizationUnitEditV3" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AdminOrganizationUnitEditV3" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/v3/{datasourceId}/Admin/OrganizationUnits/{organizationUnitId}/Children": { "get": { "tags": [ "AdminOrganizationUnit" ], "parameters": [ { "name": "organizationUnitId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "PageSize", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "Page", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedResponse`1<AdminOrganizationUnitInfo[]v3>" } } } } } } }, "/api/v3/{datasourceId}/Admin/Users": { "get": { "tags": [ "AdminUser" ], "parameters": [ { "name": "PageSize", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "Page", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PagedResponse`1<AdminUserInfo[]v3>" } } } } } }, "post": { "tags": [ "AdminUser" ], "parameters": [ { "name": "sid", "in": "query", "schema": { "type": "string" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminUserDetailInfoV3" } } } } } } }, "/api/v3/{datasourceId}/Admin/Users/{userId}": { "get": { "tags": [ "AdminUser" ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminUserDetailInfoV3" } } } } } }, "put": { "tags": [ "AdminUser" ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminUserUpdateEditV3" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdminUserUpdateEditV3" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AdminUserUpdateEditV3" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/v3/{datasourceId}/Admin/Users/{userId}/Profiles/{profileId}": { "put": { "tags": [ "AdminUser" ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "profileId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminProfileUpdateEditV3" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdminProfileUpdateEditV3" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AdminProfileUpdateEditV3" } } } }, "responses": { "200": { "description": "Success" } } }, "get": { "tags": [ "AdminUser" ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "profileId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminProfileDetailInfoV3" } } } } } } }, "/api/v3/{datasourceId}/Admin/Users/{userId}/Profiles/{profileId}/ProfileShares": { "post": { "tags": [ "AdminUser" ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "profileId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminProfileShareEditV3" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AdminProfileShareEditV3" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AdminProfileShareEditV3" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/v3/{datasourceId}/Admin/Users/{userId}/Profiles/{profileId}/ProfileShares/{profileShareId}": { "delete": { "tags": [ "AdminUser" ], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "profileId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "profileShareId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "datasourceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success" } } } } }, "components": { "schemas": { "AdminGroupInfoV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string", "nullable": true }, "primarySid": { "type": "string", "nullable": true } }, "additionalProperties": false }, "AdminOrganizationUnitDetailInfoV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string", "nullable": true }, "parentId": { "type": "string", "format": "uuid", "nullable": true } }, "additionalProperties": false }, "AdminOrganizationUnitEditV3": { "type": "object", "properties": { "title": { "type": "string", "nullable": true }, "organizationUnitParentId": { "type": "string", "format": "uuid", "nullable": true }, "fieldChanges": { "type": "array", "items": { "$ref": "#/components/schemas/FieldEdit" }, "nullable": true } }, "additionalProperties": false }, "AdminOrganizationUnitInfoV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string", "nullable": true } }, "additionalProperties": false }, "AdminProfileDetailInfoV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string", "nullable": true }, "organizationUnitId": { "type": "string", "format": "uuid", "nullable": true }, "organizationUnitTitle": { "type": "string", "nullable": true }, "profileShares": { "type": "array", "items": { "$ref": "#/components/schemas/AdminProfileShareV3" }, "nullable": true } }, "additionalProperties": false }, "AdminProfileInfoV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string", "nullable": true }, "organizationUnitId": { "type": "string", "format": "uuid", "nullable": true }, "organizationUnitTitle": { "type": "string", "nullable": true } }, "additionalProperties": false }, "AdminProfileShareEditV3": { "type": "object", "properties": { "userId": { "type": "string", "format": "uuid", "nullable": true }, "groupId": { "type": "string", "format": "uuid", "nullable": true }, "appUserGroupId": { "type": "string", "format": "uuid", "nullable": true }, "profilePermissionLevel": { "type": "integer", "format": "int32" }, "signaturePermissionLevel": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "AdminProfileShareV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid", "nullable": true }, "groupId": { "type": "string", "format": "uuid", "nullable": true }, "appUserGroupId": { "type": "string", "format": "uuid", "nullable": true }, "profilePermissionLevel": { "type": "integer", "format": "int32" }, "signaturePermissionLevel": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "AdminProfileUpdateEditV3": { "type": "object", "properties": { "title": { "type": "string", "nullable": true }, "organizationUnitId": { "type": "string", "format": "uuid" }, "fieldChanges": { "type": "array", "items": { "$ref": "#/components/schemas/FieldEdit" }, "nullable": true } }, "additionalProperties": false }, "AdminUserDetailInfoV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "primarySid": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "profiles": { "type": "array", "items": { "$ref": "#/components/schemas/AdminProfileInfoV3" }, "nullable": true } }, "additionalProperties": false }, "AdminUserInfoV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "primarySID": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true } }, "additionalProperties": false }, "AdminUserUpdateEditV3": { "type": "object", "properties": { "title": { "type": "string", "nullable": true }, "fieldChanges": { "type": "array", "items": { "$ref": "#/components/schemas/FieldEdit" }, "nullable": true } }, "additionalProperties": false }, "EmailMessageTypeV3": { "enum": [ 0, 1, 2 ], "type": "integer", "format": "int32" }, "FieldEdit": { "type": "object", "properties": { "field": { "type": "string", "nullable": true }, "text": { "type": "string", "nullable": true }, "imageAsBase64": { "type": "string", "nullable": true }, "lcid": { "type": "integer", "format": "int32" }, "purge": { "type": "boolean" } }, "additionalProperties": false }, "FlatFieldInfoV2": { "type": "object", "properties": { "field": { "type": "string", "nullable": true }, "text": { "type": "string", "nullable": true }, "inheritance": { "type": "string", "nullable": true }, "isImage": { "type": "boolean" }, "lcid": { "type": "integer", "format": "int32" }, "profileId": { "type": "string", "format": "uuid", "nullable": true }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/LinkV2" }, "nullable": true, "readOnly": true } }, "additionalProperties": false }, "LinkV2": { "type": "object", "properties": { "href": { "type": "string", "nullable": true }, "type": { "type": "string", "nullable": true }, "id": { "type": "string", "nullable": true } }, "additionalProperties": false }, "PagedResponse`1<AdminGroupInfo[]v3>": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AdminGroupInfoV3" }, "nullable": true }, "pagingDetails": { "$ref": "#/components/schemas/PagingDetails" } }, "additionalProperties": false }, "PagedResponse`1<AdminOrganizationUnitInfo[]v3>": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AdminOrganizationUnitInfoV3" }, "nullable": true }, "pagingDetails": { "$ref": "#/components/schemas/PagingDetails" } }, "additionalProperties": false }, "PagedResponse`1<AdminUserInfo[]v3>": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserInfoV3" }, "nullable": true }, "pagingDetails": { "$ref": "#/components/schemas/PagingDetails" } }, "additionalProperties": false }, "PagedResponse`1<SharedProfileInfo[]v2>": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/SharedProfileInfoV2" }, "nullable": true }, "pagingDetails": { "$ref": "#/components/schemas/PagingDetails" } }, "additionalProperties": false }, "PagingDetails": { "type": "object", "properties": { "pageSize": { "type": "integer", "format": "int32" }, "page": { "type": "integer", "format": "int32" }, "totalPages": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "SearchInputFieldsResponseModel": { "type": "object", "properties": { "dataProviderDisplayName": { "type": "string", "nullable": true }, "searchParametersConfigurationXmlSerialized": { "type": "string", "nullable": true } }, "additionalProperties": false }, "SharedProfileInfoV2": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string", "nullable": true }, "hasProfileImage": { "type": "boolean" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/LinkV2" }, "nullable": true, "readOnly": true }, "organizationUnitId": { "type": "string", "format": "uuid" }, "organizationUnit": { "type": "string", "nullable": true }, "isDefault": { "type": "boolean" }, "organizationUnitPath": { "type": "string", "nullable": true }, "localizedFlatFields": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/FlatFieldInfoV2" } }, "nullable": true }, "isForeignProfile": { "type": "boolean" }, "isPinned": { "type": "boolean" }, "organizationUnitThemes": { "type": "object", "additionalProperties": { "type": "string" }, "nullable": true } }, "additionalProperties": false }, "SignatureContentV3": { "type": "object", "properties": { "content": { "type": "string", "nullable": true } }, "additionalProperties": false }, "SignatureV3": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string", "nullable": true } }, "additionalProperties": false } }, "securitySchemes": { "oauth2": { "type": "oauth2", "flows": { "implicit": { "authorizationUrl": "https://{TENANTURL}/ids/connect/authorize", "scopes": { "oo_WebApi": "Web API" } } } } } }, "security": [ { "oauth2": [ "oo_WebApi" ] } ] }

PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland