Use case: Update a Jira Server Configuration
Before you start
- Verify Permissions: Ensure you have the appropriate permissions in your Unity Organization to update a Jira ServerConfig. Typically, you must be an admin or have specific collaboration settings access.
- Organization Context: Know the Organization identifier (GUID) of the Unity Organization where this configuration is located.
- Jira ServerConfig ID: Identify the Jira ServerConfig you want to update.
- Jira Credentials & Access: Make sure the provided credentials have access to the necessary Jira resources and permissions for project and issue interaction.
How do I...?
To update a Jira ServerConfig, follow these steps:
- Get the Organization ID: Identify the Unity Organization where the Jira ServerConfig is located.
- Get the Jira ServerConfig ID: Identify the ServerConfig ID to update.
- Prepare the ServerConfig Payload: Prepare data for the request (name, url, username, and key).
- Use the SDK: Call the
UpdateServerConfigAsyncmethod in the Unity Collaboration SDK with the required properties. - Handle Responses: Ensure your implementation verifies whether the config was successfully updated and handles any errors appropriately.
Example:
var name = "Updated Jira Config Name";
var url = "https://updated-jira.example.com";
var username = "updated-jira-admin";
var key = "updated-api-key";
await jiraConfigService.UpdateServerConfigAsync(
organizationId: organizationId,
jiraServerConfigId: jiraServerConfigId,
name: name,
url: url,
username: username,
key: key,
cancellationToken: cancellationToken);
Error Handling
- 400 Bad Request: Invalid input.
- 401 Unauthorized: Authentication required.
- 403 Forbidden: Insufficient permissions.