Skip to content

Commit 15e407c

Browse files
committed
Merged in CST-12467 (pull request DSpace#45)
CST-12467 refactor qatopic to always refer to a qasource
2 parents b653401 + e5ea4cf commit 15e407c

File tree

3 files changed

+76
-33
lines changed

3 files changed

+76
-33
lines changed

qualityassuranceevents.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ Attributes
4444
* the *trust* attribute is the level of accuracy of the quality assurance event (values from 0.00 to 1.00)
4545
* the *status* attribute is one of (ACCEPTED, REJECTED, DISCARDED, PENDING)
4646
* the *eventDate* attribute is the timestamp of the event reception
47-
* the *message* attribute is a json object which structure depends on the source and on the topic of the event. When the "topic" type is
47+
* the *message* attribute is a json object which structure depends on the source and on the topic of the event. When the source is "openaire" and the "topic" type is
4848
* ENRICH/MISSING/PID and ENRICH/MORE/PID: fills `message.type` with the type of persistent identifier (doi, pmid, etc.) and `message.value` with the corresponding value
4949
* ENRICH/MISSING/ABSTRACT: fills `message.abstract`
5050
* ENRICH/MISSING/SUBJECT/ACM: fills the `message.value` with the actual keywords, the subject classification is defined by the last part of the topic (ACM, JEL, DDC, etc.)
5151
* ENRICH/MISSING/PROJECT: fills `acronym`, `code`, `funder`, `fundingProgram`, `jurisdiction` and `title`
5252

5353
Exposed links:
5454
* topic: link to the topic to which the event belong to (see [qualityassurancetopics](qualityassurancetopics.md))
55-
* target: link to the item that represent the targe to whom the quality assurance event apply
55+
* target: link to the item that represent the target to whom the quality assurance event apply
5656
* related: link to an optional second item that is involved in the qa events (i.e. the project item for OpenAIRE ENRICH/MISSING/PROJECT event)
5757

5858
Status codes:
@@ -63,18 +63,17 @@ Status codes:
6363

6464
## Search methods
6565
### Get qualityassuranceevents by a given topic
66-
**GET /api/integration/qualityassuranceevents/search/findByTopic?topic=:topic-key[&target=:item-uuid&size=10&page=0]**
66+
**GET /api/integration/qualityassuranceevents/search/findByTopic?topic=:topic-key[&size=10&page=0]**
6767

6868
It returns the list of qa events from a specific topic, eventually filtered by the target they refer to
6969

7070
The supported parameters are:
7171
* page, size [see pagination](README.md#Pagination)
72-
* topic: mandatory, the key associated with the requested topic
73-
* target: optional, the uuid of the target item to restrict the qa events
72+
* topic: mandatory, the key associated with the requested topic. Please note that the topic could contain the uuid of a specific target item to restrict the qa events. See the note about the [qa topic id](qualityassurancetopics.md#get-single-topic)
7473

7574
Return codes:
7675
* 200 OK - if the operation succeed
77-
* 400 Bad Request - if the topic parameter is missing or invalid
76+
* 400 Bad Request - if the topic parameter is missing
7877

7978
Provide paginated list of the qa events available.
8079

qualityassurancesources.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Provide access to the Quality Assurance sources. It returns the list of the Qual
2323
Attributes:
2424
* lastEvent: the date of the last update from the specific Quality Assurance source
2525
* totalEvents: the total number of quality assurance events provided by the Quality Assurance source
26-
* id: is the identifier to use in GET Single Source
26+
* id: is the identifier to use in GET Single Source. It can be composed of a source alias followed by colon : and the target uuid when the qa source data are focused on a specific item
2727

2828
Return codes:
2929
* 200 OK - if the operation succeed
@@ -48,3 +48,42 @@ Return codes:
4848
* 401 Unauthorized - if you are not authenticated
4949
* 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access
5050
* 404 Not found - if the source doesn't exist
51+
52+
## Search methods
53+
### Get qualityassurancesources by a given target
54+
**/api/integration/qualityassurancesources/search/byTarget**
55+
56+
It returns the list of qa sources that have events related to the specific target.
57+
58+
```json
59+
...
60+
_embedded: {
61+
qualityassurancesources:
62+
[
63+
64+
{
65+
id: "openaire:<target-uuid>",
66+
type: "qualityassurancesource",
67+
totalEvents: "3"
68+
},
69+
{
70+
id: "coar-notify:<target-uuid>",
71+
type: "qualityassurancesource",
72+
totalEvents: "2"
73+
},
74+
...
75+
]
76+
}
77+
```
78+
79+
The supported parameters are:
80+
* page, size [see pagination](README.md#Pagination)
81+
* source: mandatory, the name associated with a specific source
82+
83+
Return codes:
84+
* 200 OK - if the operation succeed
85+
* 400 Bad Request - if the topic parameter is missing or invalid
86+
* 401 Unauthorized - if you are not authenticated
87+
* 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access
88+
89+

qualityassurancetopics.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,14 @@
22
Provide access to the Quality Assurance topics. A topic represents a specific type of event (such as a missing abstract can be).
33

44
**GET /api/integration/qualityassurancetopics**
5-
It returns the list of the Quality Assurance Broker topics.
5+
This method is not implemented as we haven't a use case that require to iterate over all the qa topics regardless of their source. Please use the search/bySource method instead.
66

7-
```json
8-
[
97

10-
{
11-
id: "ENRICH!MORE!PID",
12-
type: "qualityassurancetopic",
13-
name: "ENRICH/MORE/PID",
14-
lastEvent: "2020/10/09 10:11 UTC",
15-
totalSuggestions: "33"
16-
},
17-
{
18-
id: "ENRICH!MISSING!ABSTRACT",
19-
type: "qualityassurancetopic",
20-
name: "ENRICH/MISSING/ABSTRACT",
21-
lastEvent: "2020/10/09 10:11 UTC",
22-
totalSuggestions: "21"
23-
},
24-
...
25-
]
26-
```
278
Attributes:
289
* name: the name of the topic to display on the frontend user interface
2910
* lastEvent: the date of the last update from Quality Assurance Broker
3011
* totalEvents: the total number of quality assurance events provided by Quality Assurance Broker for this topic
31-
* id: is the identifier to use in GET Single Topic
12+
* id: is the identifier to use in GET Single Topic. It is composed of the source, the topic name and optionally the target item uuid to which the data will be restricted
3213

3314
Return codes:
3415
* 200 OK - if the operation succeed
@@ -42,7 +23,7 @@ Provide detailed information about a specific Quality Assurance Broker topic. Th
4223
4324
```json
4425
{
45-
id: "ENRICH!MORE!PID",
26+
id: "openaire:ENRICH!MORE!PID",
4627
type: "qualityassurancetopic",
4728
name: "ENRICH/MORE/PID",
4829
lastEvent: "2020/10/09 10:11 UTC",
@@ -60,7 +41,32 @@ Return codes:
6041
### Get qualityassurancetopics by a given source
6142
**/api/integration/qualityassurancetopics/search/bySource**
6243

63-
It returns the list of qa topics from a specific source
44+
It returns the list of qa topics from a specific source. Provide paginated list of the qa topics available.
45+
46+
```json
47+
...
48+
_embedded: {
49+
qualityassurancetopics:
50+
[
51+
52+
{
53+
id: "openaire:ENRICH!MORE!PID",
54+
type: "qualityassurancetopic",
55+
name: "ENRICH/MORE/PID",
56+
lastEvent: "2020/10/09 10:11 UTC",
57+
totalSuggestions: "33"
58+
},
59+
{
60+
id: "openaire:ENRICH!MISSING!ABSTRACT",
61+
type: "qualityassurancetopic",
62+
name: "ENRICH/MISSING/ABSTRACT",
63+
lastEvent: "2020/10/09 10:11 UTC",
64+
totalSuggestions: "21"
65+
},
66+
...
67+
]
68+
}
69+
```
6470

6571
The supported parameters are:
6672
* page, size [see pagination](README.md#Pagination)
@@ -72,15 +78,14 @@ Return codes:
7278
* 401 Unauthorized - if you are not authenticated
7379
* 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access
7480

75-
Provide paginated list of the qa topics available.
7681

7782
### Get qualityassurancetopics by a given target
78-
**GET /api/integration/qualityassurancetopics/search/byTarget?target=:item-uuid[&source=:source-id]**
83+
**GET /api/integration/qualityassurancetopics/search/byTarget?target=:item-uuid&source=:source-id**
7984

8085
It returns the list of qa topics (from a specific source) to a specific targeted item.
8186

8287
Return codes:
8388
* 200 OK - if the operation succeed
84-
* 400 Bad Request - if the target parameter is missing or invalid
89+
* 400 Bad Request - if the target or the source parameters are missing or invalid (the target is not an uuid)
8590
* 401 Unauthorized - if you are not authenticated
8691
* 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access

0 commit comments

Comments
 (0)