-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yaml
94 lines (93 loc) · 3.12 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
openapi: 3.0.0
info:
title: Usage Tracker API
description: The Usage Tracker API works with the [DataCite Usage Tracker](https://support.datacite.org/docs/datacite-usage-tracker) to log usage events in compliance with the COUNTER Code of Practice for Research Data.
contact:
name: DataCite Support
url: 'https://support.datacite.org'
email: support@datacite.org
version: 0.10.0
servers:
- url: 'https://analytics.datacite.org'
tags:
- name: usage-tracker
description: Usage Tracker Metric API
paths:
/api/metric:
post:
summary: Create a Usage Tracker usage metric event.
tags: [usage-tracker]
security: []
parameters:
- in: header
name: X-Forwarded-For
required: true
schema:
type: string
description: Originating IP address of the client. Used for de-duplication of events. Not stored.
- in: header
name: User-Agent
required: true
schema:
type: string
description: Originating User-Agent of the client. Used to filter bots and for de-duplication of events. Not stored.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- n
- u
- i
- p
properties:
n:
type: string
description: The metric type of the event.
enum:
- view
- download
u:
type: string
description: The URL source of the reported view or download event.
example: https://examplerepo.org/10.5072/1234abc
i:
type: string
description: The [data-repoid unique identifier of the Repository](https://support.datacite.org/docs/datacite-usage-tracker#setup) for tracking usage analytics.
example: da-1a2b34
p:
type: string
description: The downcased DOI name of the reported view or download event.
example: 10.5072/1234abc
responses:
'200':
description: Success.
'/api/check/{data-repoid}':
get:
summary: Check the last time in UTC a data-repoid received usage metric data.
tags: [usage-tracker]
security: []
parameters:
- name: data-repoid
in: path
description: The [data-repoid unique identifier of the Repository](https://support.datacite.org/docs/datacite-usage-tracker#setup)
required: true
schema:
type: string
responses:
'200':
description: Success.
content:
text/plain:
schema:
type: string
example: 2024-09-26T20:59:13Z
'404':
description: No events found.
content:
text/plain:
schema:
type: string
example: No events found.