Settings

API endpoints for settings operations

Handle Settings Update for Tasks

post

This endpoint updates settings for one or more tasks. This endpoint is typically used for task-level configuration changes, such as updating repository settings or other task-specific configurations.

Use Cases

  • Task Configuration Management: Modify settings for tasks in bulk, such as updating repositories or tool configurations.

  • Auditing and Compliance: Track changes made to task settings for compliance and monitoring purposes.

  • Automated System Management: Allow integrations or admin systems to programmatically update task configurations.


Required Access

  • Authentication: Bearer token in the Authorization header.

  • Permissions: User must have the appropriate roles and rights to update task settings.


Process Details

  • Request Validation:

    • Validates that the request contains a properly formatted body with task IDs and settings.

    • Ensures the user has necessary permissions to perform the action.

  • Task Validation:

    • Verifies that the provided task IDs are valid and exist.

    • Ensures the specified settings are applicable to the tasks.

  • Update Operation:

    • Updates the specified settings for the provided task IDs in the database.

  • Audit Logging:

    • Logs the update activity, including which tasks were modified, what changes were made, and the user who performed the operation.


Important Notes!

  • Required Fields: Both target (task IDs) and settings are required in the request body.

  • Validation: Ensure that task IDs are valid and settings are correctly formatted to avoid errors.

Authorizations
AuthorizationstringRequired

API authentication using Bearer tokens. Include your API token in the Authorization header: Authorization: Bearer <your-api-token>

Tokens can be obtained from the Opsera platform's API token management interface.

Body
targetstring · objectId[]Required

List of task IDs to be updated.

Example: ["64d7c869b5760b001e46c1a2","64d7c869b5760b001e46c1a3"]
settingsobjectRequired

Settings to be applied to the tasks. The format depends on the type of tasks being updated.

Example: {"repository":{"url":"https://github.com/example/repo","branch":"main"},"notifications":{"enabled":true}}
Responses
chevron-right
200

Task settings updated successfully.

application/json
statusstringOptional

Status of the operation.

Example: success
messagestringOptional

Confirmation message for the operation.

Example: The update operation has been completed.
logstring[]Optional

List of log messages for the operation.

post
/api/v2/settings/tasks

Last updated