Purpose
This WS allows to find Device registry Jobs in Admin panel using search params.
Key points
This is a graphQl query method used in Administration panel only
Only authenticated and authorized NHS employee with appropriate scope can search Device registry Jobs
Query returns a list of Device registry Jobs filtered by search params
...
Expand |
---|
title | deviceRegistryJobs.graphql |
---|
|
Code Block |
---|
| """
Filter for Device registry job.
"""
input DeviceRegistryJobFilter {
"Device registry job status filters."
status: JobStatus
}
"""
List of fields to sort both asc and desc side `DeviceRegistryJob`.
"""
enum DeviceRegistryJobOrderBy {
"Sort Device registry job by started at in ascending order"
STARTED_AT_ASC
"Sort Device registry job by started at in descending order"
STARTED_AT_DESC
}
"""
A connection to a list of `DeviceRegistryJob` values.
"""
type DeviceRegistryJobConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of nodes."
nodes: [DeviceRegistryJob]
"A list of edges."
edges: [DeviceRegistryJobEdge]
}
"""
Reads and enables pagination through a set of `DeviceRegistryJob`.
"""
type DeviceRegistryJobEdge {
"The item at the end of the edge."
node: DeviceRegistryJob!
"A cursor for use in pagination."
cursor: String!
}
"""
An object for DeviceRegistryJob.
"""
type DeviceRegistryJob implements Node {
"The ID of an object"
id: ID!
"Primary key identifier from the database"
databaseId: UUID!
"Job name."
name: String
"Device registry Job status."
status: JobStatus!
"Job execution strategy."
strategy: JobStrategy!
"Date and time when the job starts."
startedAt: DateTime!
"Date and time when the job ends."
endedAt: DateTime
"Tasks within this job."
tasks(
"A condition to be used in determining which values should be returned by the collection."
filter: TaskFilter
"The method to use when ordering collection items."
orderBy: TaskOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): TaskConnection!
"Type of register originating device registry data. The value should be present in the `REGISTER_TYPE` dictionary."
registerType: String!
"Device registry job reason description."
reasonDescription: String!
} |
|
Authorization
Verify the validity of access token
Verify that token is not expired
Check user scopes in order to perform this action (scope = 'device_registry_job:read')
Validate legal entity
Extract client_id from token.
Check legal entity status (status = ACTIVE)
Check client type (type = NHS)
Service logic
Get list of all Device registry Jobs from jobs table in JABBA DB, filtered by:
device registry job types (jabba.jobs.type):
upload_device_definitions_registry
submitted additional search params
status. Search by jobs.status
Apply optional ordering
by default order records by inserted_at field in descending order
Render a response according to specification