REST API
The SLT REST API’s support added for create shift, update and get shifts. Each resource supports a POST method to create a new shift with unique shift_id. There are also GET and PUT method for a resource identifier to retrieve and update the shift, retrospectively.
Once deployed, the API should be available at <HOST>/slt/api/<MAJOR_VERSION>/<RESOURCE> and the Swagger UI at <HOST>/api/<MAJOR_VERSION>/ui.
The host depends on the environment that the server is deployed to, and may include a k8s namespace - see the README for more details.
For example, to retrieve slt shift between shift_start and shift_end from the staging environment, the request would be
Database Transaction Management
The service includes robust transaction management for database operations, with special handling for dependent operations across multiple tables:
Key Features
Automatic Rollback: If any operation in a transaction fails, all changes are automatically rolled back
Isolation Levels: Configurable isolation levels with SERIALIZABLE as default for multi-table operations
$ curl -iX GET -H -d "https://k8s.stfc.skao.int/staging-ska-oso-slt-services/slt/api/<MAJOR_VERSION>/shifts?shift_start=2024-08-13T00%3A00%3A00&shift_end=2024-08-13T16%3A00%3A00"
* Response
.. code:: python
[
{
"annotations": "Routine maintenance shift.",
"comments": "All systems operational.",
"created_time": "2024-08-13T12:28:39.085048Z",
"id": 42,
"media": [
{
"path": "/path/to/test_image.png",
"type": "image"
}
],
"shift_end": "2024-08-13T12:45:00Z",
"shift_id": "shift-20240813-42",
"shift_logs": [
{
"info": {
"eb_id": "eb-t0001-20240813-00010",
"interface": "https://schema.skao.int/ska-oso-pdm-eb/0.1",
"metadata": {
"created_by": "DefaultUser",
"created_on": "2024-08-13T06:59:22.909729Z",
"last_modified_by": "DefaultUser",
"last_modified_on": "2024-08-13T06:59:22.909729Z",
"version": 1
},
"request_responses": [
{
"request": "ska_oso_scripting.functions.devicecontrol.release_all_resources",
"request_args": {
"kwargs": {
"subarray_id": "1"
}
},
"request_sent_at": "2022-09-23T15:43:53.971548Z",
"response": {
"result": "this is a result"
},
"response_received_at": "2022-09-23T15:43:53.971548Z",
"status": "OK"
},
{
"error": {
"detail": "this is an error"
},
"request": "ska_oso_scripting.functions.devicecontrol.scan",
"request_sent_at": "2022-09-23T15:43:53.971548Z",
"status": "ERROR"
}
],
"sbd_ref": "sbd-t0001-20240812-00001",
"sbd_version": 1,
"sbi_ref": "sbi-t0001-20240812-00002",
"sbi_status": "Created",
"telescope": "ska_mid"
},
"log_time": "2024-08-13T12:29:24.155159Z",
"source": "ODA"
},
{
"info": {
"eb_id": "eb-t0001-20240813-00009",
"interface": "https://schema.skao.int/ska-oso-pdm-eb/0.1",
"metadata": {
"created_by": "DefaultUser",
"created_on": "2024-08-13T06:58:45.693863Z",
"last_modified_by": "DefaultUser",
"last_modified_on": "2024-08-13T06:58:45.693863Z",
"version": 1
},
"request_responses": [
{
"request": "ska_oso_scripting.functions.devicecontrol.release_all_resources",
"request_args": {
"kwargs": {
"subarray_id": "1"
}
},
"request_sent_at": "2022-09-23T15:43:53.971548Z",
"response": {
"result": "this is a result"
},
"response_received_at": "2022-09-23T15:43:53.971548Z",
"status": "OK"
},
{
"error": {
"detail": "this is an error"
},
"request": "ska_oso_scripting.functions.devicecontrol.scan",
"request_sent_at": "2022-09-23T15:43:53.971548Z",
"status": "ERROR"
}
],
"sbd_ref": "sbd-t0001-20240812-00001",
"sbd_version": 1,
"sbi_ref": "sbi-t0001-20240812-00002",
"sbi_status": "Created",
"telescope": "ska_mid"
},
"log_time": "2024-08-13T12:28:49.104331Z",
"source": "ODA"
}
],
"operator_name": {
"name": "John Doe"
},
"shift_start": "2024-08-13T12:28:39.085060Z"
}
]
The SLT API endpoints, with the accepted requests and expected responses, are documented below:
- GET /ska-oso-slt-services/slt/api/v3/shift/operators
Get all operator names
Retrieve a list of all unique operator names.
This endpoint returns a list of all unique operator names in the system. It can be used to populate dropdown menus or autocomplete fields in the UI.
- Parameters:
shift_service (ShiftService) – Injected shift service
- Returns:
A list of unique operator names
- Return:
List[str]
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift/operators HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ "string" ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shift
Get a shift
Retrieve a specific shift by its ID.
- Parameters:
shift_id (str) – The unique identifier of the shift
service (ShiftService) – Injected shift service
- Returns:
The shift data
- Return:
Shift
- Query Parameters:
shift_id ({'string', 'null'}) – (Required)
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift?shift_id=string HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- POST /ska-oso-slt-services/slt/api/v3/shift
Create a new shift
Create a new shift.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
shift (Shift) – The shift data to create
service (ShiftService) – Injected shift service
- Returns:
The created shift
- Return:
Shift
- Raises ShiftCreationError:
If there’s already a running shift or creation fails
Example request:
POST /ska-oso-slt-services/slt/api/v3/shift HTTP/1.1 Host: example.com Content-Type: application/json { "id": 1, "user_id": "string", "shift_id": 1, "shift_start": "2026-05-20T05:28:35.077397", "shift_end": "2026-05-20T05:28:35.077397", "operator_name": "string", "shift_logs": [ { "id": 1, "shift_id": 1, "eb_id": 1, "sbd_ref": 1, "sbi_ref": 1, "eb_status": "Created", "sbi_status": "Created", "sbd_version": 1, "request_response": [ {} ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "source": "string", "log_time": "2026-05-20T05:28:35.077397" } ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "comments": [ { "id": 1, "shift_fk": 1, "prj_fk": "string", "sbd_fk": "string", "sbi_fk": "string", "eb_fk": "string", "comment": "string", "tags": [ "string" ], "jira_links": [ "string" ], "image": [ { "content_type": "string", "media_content": "01010101", "file_key": "string", "path": "string", "unique_id": "string", "file_name": "string", "timestamp": "2026-05-20T05:28:35.077397" } ], "comment_id": 1, "comment_version": 1, "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "replies": [ { "id": 1, "reply_id": 1, "shift_id": 1, "comment_id": "string", "reply_text": "string", "tags": [ "string" ], "jira_links": [ "string" ], "image": [ { "content_type": "string", "media_content": "01010101", "file_key": "string", "path": "string", "unique_id": "string", "file_name": "string", "timestamp": "2026-05-20T05:28:35.077397" } ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } } ] } ], "annotations": [ { "id": 1, "annotation": "string", "shift_id": 1, "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } } ] }
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shifts
Retrieve shift data based on shift attributes like shift_id,match type and entity status
Retrieve all shifts. This endpoint returns a list of all shifts in the system.
- Query Parameters:
id ({'integer', 'string', 'null'})
user_id ({'string', 'null'})
shift_id ({'integer', 'string', 'null'})
shift_start ({'date-time', 'null'})
shift_end ({'date-time', 'null'})
operator_name ({'string', 'null'})
match_type ({'string', 'null'})
sbi_status ({'string', 'null'})
sbi_id ({'string', 'null'})
eb_id ({'string', 'null'})
Example request:
GET /ska-oso-slt-services/slt/api/v3/shifts HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- PUT /ska-oso-slt-services/slt/api/v3/shift/{shift_id}
Update an existing shift
Update an existing shift.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
shift_id (string) – The unique identifier of the shift to update
shift (Shift) – The updated shift data
service (ShiftService) – Injected shift service
shift_id
- Returns:
The updated shift
- Return:
Shift
- Raises ShiftEndedException:
If attempting to update non-immutable fields after shift has ended
Example request:
PUT /ska-oso-slt-services/slt/api/v3/shift/{shift_id} HTTP/1.1 Host: example.com Content-Type: application/json { "id": 1, "user_id": "string", "shift_id": 1, "shift_start": "2026-05-20T05:28:35.077397", "shift_end": "2026-05-20T05:28:35.077397", "operator_name": "string", "shift_logs": [ { "id": 1, "shift_id": 1, "eb_id": 1, "sbd_ref": 1, "sbi_ref": 1, "eb_status": "Created", "sbi_status": "Created", "sbd_version": 1, "request_response": [ {} ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "source": "string", "log_time": "2026-05-20T05:28:35.077397" } ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "comments": [ { "id": 1, "shift_fk": 1, "prj_fk": "string", "sbd_fk": "string", "sbi_fk": "string", "eb_fk": "string", "comment": "string", "tags": [ "string" ], "jira_links": [ "string" ], "image": [ { "content_type": "string", "media_content": "01010101", "file_key": "string", "path": "string", "unique_id": "string", "file_name": "string", "timestamp": "2026-05-20T05:28:35.077397" } ], "comment_id": 1, "comment_version": 1, "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "replies": [ { "id": 1, "reply_id": 1, "shift_id": 1, "comment_id": "string", "reply_text": "string", "tags": [ "string" ], "jira_links": [ "string" ], "image": [ { "content_type": "string", "media_content": "01010101", "file_key": "string", "path": "string", "unique_id": "string", "file_name": "string", "timestamp": "2026-05-20T05:28:35.077397" } ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } } ] } ], "annotations": [ { "id": 1, "annotation": "string", "shift_id": 1, "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } } ] }
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- PUT /ska-oso-slt-services/slt/api/v3/shift/{shift_id}/end
Update an existing shift end time
Update an existing shift end time.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
shift_id (string) – The unique identifier of the shift to update
shift (Shift) – The updated shift data
service (ShiftService) – Injected shift service
shift_id
- Returns:
The updated shift
- Return:
Shift
- Raises HTTPException:
If the shift is not found
Example request:
PUT /ska-oso-slt-services/slt/api/v3/shift/{shift_id}/end HTTP/1.1 Host: example.com Content-Type: application/json { "id": 1, "user_id": "string", "shift_id": 1, "shift_start": "2026-05-20T05:28:35.077397", "shift_end": "2026-05-20T05:28:35.077397", "operator_name": "string", "shift_logs": [ { "id": 1, "shift_id": 1, "eb_id": 1, "sbd_ref": 1, "sbi_ref": 1, "eb_status": "Created", "sbi_status": "Created", "sbd_version": 1, "request_response": [ {} ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "source": "string", "log_time": "2026-05-20T05:28:35.077397" } ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "comments": [ { "id": 1, "shift_fk": 1, "prj_fk": "string", "sbd_fk": "string", "sbi_fk": "string", "eb_fk": "string", "comment": "string", "tags": [ "string" ], "jira_links": [ "string" ], "image": [ { "content_type": "string", "media_content": "01010101", "file_key": "string", "path": "string", "unique_id": "string", "file_name": "string", "timestamp": "2026-05-20T05:28:35.077397" } ], "comment_id": 1, "comment_version": 1, "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" }, "replies": [ { "id": 1, "reply_id": 1, "shift_id": 1, "comment_id": "string", "reply_text": "string", "tags": [ "string" ], "jira_links": [ "string" ], "image": [ { "content_type": "string", "media_content": "01010101", "file_key": "string", "path": "string", "unique_id": "string", "file_name": "string", "timestamp": "2026-05-20T05:28:35.077397" } ], "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } } ] } ], "annotations": [ { "id": 1, "annotation": "string", "shift_id": 1, "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } } ] }
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shift/current
Get Current Shift
Retrieve the current active shift.
This endpoint returns the most recent shift based on the last modified or created time. It does not require any input parameters and is used to retrieve the latest shift that is currently active in the system.
- Parameters:
service (ShiftService) – Injected shift service
- Returns:
The latest shift object in the system
- Return:
Shift
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift/current HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- PATCH /ska-oso-slt-services/slt/api/v3/shift/{shift_id}/logs
Update Shift Log info
Partially update an existing shift.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
shift_id ({'string', 'null'}) – The unique identifier of the shift to update
service (ShiftService) – Injected shift service
shift_id
- Returns:
The updated shift
- Return:
Shift
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- POST /ska-oso-slt-services/slt/api/v3/shift/annotation
Create a new shift annotation
Create a new annotation.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
shift_annotation (ShiftAnnotation) – The shift annotation to create
- Returns:
The created shift annotation
- Return:
ShiftAnnotation
Example request:
POST /ska-oso-slt-services/slt/api/v3/shift/annotation HTTP/1.1 Host: example.com Content-Type: application/json { "id": 1, "annotation": "string", "shift_id": 1, "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } }
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shift/annotation
Get Shift annotation
Get Annotation based on shift_id.
- Parameters:
shift_id (str) – The shift ID to get annotations for
- Returns:
The shift annotation
- Return:
ShiftAnnotation
- Query Parameters:
shift_id (string) – (Required)
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift/annotation?shift_id=string HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- PUT /ska-oso-slt-services/slt/api/v3/shift/annotation/{annotation_id}
Update an existing shift annotation
Update an existing shift annotation.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
annotation_id (str) – The unique identifier of the shift to update
shift_annotation (ShiftAnnotation) – The updated shift annotation data
- Returns:
The updated shift annotation
- Return:
ShiftAnnotation
Note
Annotations are editable only by the users who created them. If a user attempts to edit another user’s annotation, a 403 Forbidden error will be raised.
- Parameters:
annotation_id (string)
Example request:
PUT /ska-oso-slt-services/slt/api/v3/shift/annotation/{annotation_id} HTTP/1.1 Host: example.com Content-Type: application/json { "id": 1, "annotation": "string", "shift_id": 1, "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } }
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- POST /ska-oso-slt-services/slt/api/v3/shift/comment
Create a new shift comment
Create a new shift comment.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
shift_comment (ShiftLogComment) – The shift comment to create
files (Optional[Any], optional) – Optional files or attachments to include with the comment. Defaults to None.
- Returns:
The created shift comment
- Return:
ShiftLogComment
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shift/comment
Retrieve shift comments based on shift ID
Retrieve shift comments based on shift ID.
- Parameters:
shift_id (Optional[str]) – The shift ID to filter comments by
- Returns:
List of shift comments
- Query Parameters:
shift_id ({'string', 'null'})
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift/comment HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shift/comment/{comment_id}/version_history
Retrieve shift comment version history based on comment ID
Retrieve shift comment version history based on comment ID.
- Parameters:
comment_id (string) – The comment ID to retrieve version history
shift_id – The shift ID associated with the comment
comment_id
- Returns:
List of shift comments
- Return:
List[ShiftLogComment]
- Query Parameters:
shift_id (string) – (Required)
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift/comment/{comment_id}/version_history?shift_id=string HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- PUT /ska-oso-slt-services/slt/api/v3/shift/comment/{comment_id}
Update an existing shift comment
Update an existing shift comment.
- Parameters:
comment_id (string) – The unique identifier of the comment to update
shift_comment (ShiftLogComment) – The updated shift comment data
files (Optional[List[UploadFile]]) – Optional files or attachments to include with the comment. Defaults to None.
auth (AuthContext) – API authorisation based on roles and scopes
comment_id
- Returns:
The updated shift comment
- Return:
ShiftLogComment
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- POST /ska-oso-slt-services/slt/api/v3/shift/comment/{comment_id}/reply
Post reply for existing shift comment
Update an existing shift comment.
- Parameters:
comment_id (string) – The unique identifier of the comment to update
shift_comment (ShiftLogComment) – The updated shift comment data
files (Optional[List[UploadFile]]) – Optional files or attachments to include with the comment. Defaults to None.
auth (AuthContext) – API authorisation based on roles and scopes
comment_id
- Returns:
The updated shift comment
- Return:
ShiftLogComment
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- POST /ska-oso-slt-services/slt/api/v3/shift/{shift_id}/comment/image
Upload an image for a shift comment
Upload an image for a shift comment.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
file (UploadFile) – The image file to upload
shift_id (string) – Shift id against upload image
operator_name (str) – Name of operator
shift_id
- Returns:
A message indicating success
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shift/comment/{comment_id}/images
Download images for a shift comment
Download images associated with a shift comment.
- Parameters:
comment_id (string) – The ID of the comment
comment_id
- Returns:
List of image URLs
- Return:
List[str]
- Query Parameters:
version ({'integer', 'null'})
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift/comment/{comment_id}/images HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shift/reply/{reply_id}/images
Download images for a shift comment reply
Download images associated with a shift comment.
- Parameters:
comment_id (str) – The ID of the comment
reply_id (string)
- Returns:
List of image URLs
- Return:
List[str]
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift/reply/{reply_id}/images HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- PUT /ska-oso-slt-services/slt/api/v3/shift/comment/{comment_id}/image
Upload image for shift
Upload one or more image files for a specific shift.
This endpoint allows uploading multiple image files associated with a particular shift identified by the shift_id.
- Parameters:
auth (AuthContext) – API authorisation based on roles and scopes
comment_id ({'string', 'null'}) – The unique identifier of the comment to which the images will be associated
files (list[UploadFile]) – A list of files to be uploaded. Each file should be an image
comment_id
- Returns:
A list containing the media (image) data associated with the comment
- Return:
list
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- POST /ska-oso-slt-services/slt/api/v3/tag
Create a new tag
Create a new tag.
- Parameters:
auth – API authorization based on roles and scopes
tag – The tag to create
- Returns:
The created tag
Example request:
POST /ska-oso-slt-services/slt/api/v3/tag HTTP/1.1 Host: example.com Content-Type: application/json { "id": 1, "tag_name": "string", "metadata": { "created_by": "string", "created_on": "2026-05-20T05:28:35.077397", "last_modified_by": "string", "last_modified_on": "2026-05-20T05:28:35.077397" } }
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/tag
Get all tags
Get all tags.
- Returns:
List[Tag] of all tags
Example request:
GET /ska-oso-slt-services/slt/api/v3/tag HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- DELETE /ska-oso-slt-services/slt/api/v3/tag/{tag_id}
Delete a tag
Delete a tag.
- Parameters:
auth – API authorisation based on roles and scopes
tag_id (string) – The ID of the tag to delete
tag_id
- Returns:
Success message
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ {} ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- POST /ska-oso-slt-services/slt/api/v3/jira/tickets
Create Sprts Ticket
Create a new SPRTS ticket in JIRA.
- Parameters:
jira_ticket_data – The ticket data to create
- Return:
The created ticket details
- Return:
TicketResponse
Example request:
POST /ska-oso-slt-services/slt/api/v3/jira/tickets HTTP/1.1 Host: example.com Content-Type: application/json { "summary": "string", "description": "string", "issue_type": "string", "components": [ "string" ], "priority": "string", "severity": "string" }
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result_data": [ { "id": 1, "key": "string", "summary": "string", "description": "string", "components": [ { "part_number": "string", "name": "string" } ], "status": "string", "resolution": "string", "created_date": 1, "resolution_date": 1, "url": "string" } ], "result_status": "string", "result_code": 100 }
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID
- GET /ska-oso-slt-services/slt/api/v3/shift/stream
stream shift data for real time update to multiple users
Stream shift comment, annotation, shift start, shift end and comment reply for real time update to multiple users.
Example request:
GET /ska-oso-slt-services/slt/api/v3/shift/stream HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful Response
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
Validation Error
Example response:
HTTP/1.1 422 Unprocessable Entity Content-Type: application/json { "detail": [ { "loc": [ "string", 1 ], "msg": "string", "type": "string" } ] }
- Request Headers:
X-Request-ID