Use case: Create a Jira Server Configuration
Before you start
- Verify Permissions: Ensure you have the appropriate permissions in your Unity Organization to create 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 should be created.
- Jira Server Information: Prepare the necessary Jira server connection details (base URL, credentials, etc).
- 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 create a Jira ServerConfig, follow these steps:
- Get the Organization ID: Identify the Unity Organization where the Jira integration will be registered.
- Prepare the ServerConfig Payload: Prepare data for the request (name, url, username, and key).
- Use the SDK: Call the
CreateServerConfigAsyncmethod in the Unity Collaboration SDK with the required properties. - Handle Responses: Ensure your implementation verifies whether the config was successfully created and handles any errors appropriately.
Example:
var name = "Jira Config Name";
var url = "https://jira.example.com";
var username = "jira-admin";
var key = "api-key";
var jiraServerConfigId = await jiraConfigService.CreateServerConfigAsync(
organizationId: organizationId,
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.