forked from podaac/cloud-notification-message-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cumulus_sns_schema.json
191 lines (191 loc) · 5.7 KB
/
cumulus_sns_schema.json
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"file": {
"type": "object",
"properties": {
"type": {
"description": "The type of file. science files (netcdf, HDF, binary) should use the 'data' type. More can be added if need and consensus demand.",
"type": "string",
"enum": [
"data",
"browse",
"metadata",
"ancillary",
"linkage"
]
},
"subtype": {
"description": "An optional, specific implmentation of the file::type. e.g. NetCDF for a file of type 'data'",
"type": "string"
},
"uri": {
"description": "the URI of the file (s3://...)",
"type": "string"
},
"name": {
"description": "The human readable filename that this file represents. ",
"type": "string"
},
"checksumType": {
"description ": "Type of the checksum (e.g. md5). Optional. If no checksumType is defined for a file, it is assumed to be md5",
"type": "string",
"enum": [
"SHA-1",
"md5"
]
},
"checksum": {
"description": "Checksum of the file.",
"type": "string"
},
"size": {
"description": "Size, in bytes, of the file.",
"type": "number"
}
},
"required": [
"type",
"uri",
"size",
"checksum",
"checksumType",
"name"
]
},
"filegroup": {
"type": "object",
"properties": {
"id": {
"type":"string",
"description":"string id of the filegroup by which all files are associated."
},
"files": {
"description": "array of files that make up this product",
"type": "array",
"items": { "$ref": "#/definitions/file" }
}
},
"required": [
"id",
"files"
]
}
},
"title": "Cloud Notification Message (cnm) 1.2 ",
"description": "A message format to trigger or respond to processing. Version 1.2",
"type": "object",
"properties": {
"version":{
"description" : "The CNM Version used. e.g. 'v1.2'",
"type":"string",
"enum": [
"1.0",
"1.1"
]
},
"receivedTime": {
"description": "Time message was received by the ingest system",
"type":"string"
},
"processCompleteTime": {
"description": "The time processing completed by the receiving entity.",
"type":"string"
},
"submissionTime": {
"description": "The time the message was created (and presumably sent) to the publication mechanism.",
"type":"string"
},
"identifier": {
"description":"Unique identifier for the message as a whole. It is the senders responsibility to ensure uniqueness. This identifier can be used in response messages to provide tracability.",
"type":"string"
},
"collection": {
"description": "The collection to which these granules will belong.",
"type": "string"
},
"provider": {
"description": "the name of the provider (e.g. SIP, SDS, etc. ) producing these files.",
"type": "string"
},
"trace": {
"description": "Information on the message or who is sending it.",
"type": "string"
},
"response":{
"description": "The response message type sent. Can be a success message or error message. Akin to both the PAN and PDRD",
"type": "object",
"properties": {
"status":{
"description":"Successful or error.",
"type":"string",
"enum": [
"SUCCESS",
"FAILURE"
]
},
"ingestionMetadata":{
"description":"Object defining ingestion metadata, like CMR Concept IDs, URLS, etc",
"type": "object",
"properties": {
"catalogId":{
"description":"Identifier for catalog",
"type":"string"
},
"catalogUrl":{
"description":"URL of catalog entry",
"type":"string"
}
}
},
"errorCode": {
"description":"Error message. Success messages can be ignored.",
"type":"string",
"enum": [
"VALIDATION_ERROR",
"ACCESS_ERROR",
"PROCESSING_ERROR"
]
},
"errorMessage":{
"description":"The message error for the failure that occured.",
"type":"string"
}
},
"required": [
"status"
]
},
"product": {
"type": "object",
"properties": {
"name": {
"description": "Identifier/name of the product",
"type": "string"
},
"dataVersion": {
"description": "Version of this product",
"type": "string"
},
"files": {
"description": "array of files that make up this product",
"type": "array",
"items": { "$ref": "#/definitions/file" }
},
"filegroups": {
"description": "array of filegroups that make up this product",
"type": "array",
"items": { "$ref": "#/definitions/filegroup" }
}
},
"oneOf": [
{"required": ["name","files"]},
{"required": ["name","filegroups"]}
]
}
},
"oneOf": [
{"required": ["version","submissionTime","collection", "identifier", "product"]},
{"required": ["version","receivedTime","processCompleteTime","submissionTime","identifier","collection", "response"] }
]
}