Purpose
This WS allows to get detailed Device registry Job info from Admin panel.
Key points
This is a graphQl query used in Administration panel only
Only authenticated and authorized NHS employee with appropriate scope can get Device registry Job details.
Query returns single Device registry Job by job identifier.
Specification
Expand |
---|
|
Code Block |
---|
| "Reads a single `DeviceRegistryJob` using its globally unique ID."
deviceRegistryJob(id: ID!): DeviceRegistryJob |
|
Expand |
---|
title | deviceRegistryJobs.graphql |
---|
|
Code Block |
---|
| """
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
): DeviceRegistryTaskConnection!
"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!
}
"""
A connection to a list of `DeviceRegistryTask` values.
"""
type DeviceRegistryTaskConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of nodes."
nodes: [DeviceRegistryTask]
"A list of edges."
edges: [DeviceRegistryTaskEdge]
}
"""
Reads and enables pagination through a set of `DeviceRegistryTask`.
"""
type DeviceRegistryTaskEdge {
"The item at the end of the edge."
node: DeviceRegistryTask!
"A cursor for use in pagination."
cursor: String!
}
"""
A child of a `DeviceRegistryJob`, contains the result of task execution.
"""
type DeviceRegistryTask implements Node {
"The ID of an object"
id: ID!
"Primary key identifier from the database"
databaseId: UUID!
"Task name."
name: String
"Task status, is set automatically."
status: TaskStatus!
"Task meta data."
meta: DeviceRegistryTaskMeta
"Date and time when task was executed."
endedAt: DateTime
"Task error."
error: TaskError
"Technical information when task was inserted into the DB."
insertedAt: DateTime!
"Technical information when task was updated in the DB."
updatedAt: DateTime!
}
"""
Metadata of a `DeviceRegistryTask`.
"""
type DeviceRegistryTaskMeta {
"Primary key identifier of an entity from the database."
databaseId: UUID
"Line number of csv file from input."
csvDataLine: Int
} |
|
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 Device registry job by id from jobs table in JABBA DB.
Get Device registry job tasks by job id from tasks table in JABBA DB.
Render detailed Device registry job data according to schema.