-
Notifications
You must be signed in to change notification settings - Fork 2
/
dataset-json-api.html
55 lines (54 loc) · 15.9 KB
/
dataset-json-api.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui/swagger-ui.css" >
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
<style>
html
{
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after
{
box-sizing: inherit;
}
body {
margin:0;
background: #fafafa;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="./swagger-ui/swagger-ui-bundle.js"> </script>
<script src="./swagger-ui/swagger-ui-standalone-preset.js"> </script>
<script>
window.onload = function() {
var spec = {"openapi": "3.1.0", "info": {"title": "Dataset-JSON API", "description": "CDISC Dataset-JSON Standard API", "license": {"name": "MIT", "url": "https://opensource.org/license/mit/"}, "version": "0.0.1"}, "paths": {"/about": {"get": {"summary": "Get About the API", "operationId": "about_about_get", "responses": {"200": {"description": "About the API", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/About"}}}}}}}, "/studies": {"get": {"summary": "Get the list of studies", "operationId": "studies_studies_get", "responses": {"200": {"description": "The list of studies", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Study"}, "title": "Response Studies Studies Get"}}}}}}, "post": {"summary": "Create a new study", "operationId": "add_study_studies_post", "parameters": [{"name": "api-key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Study"}}}}, "responses": {"201": {"description": "The created study", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Study"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/studies/{studyOID}": {"get": {"summary": "Get a study", "operationId": "study_studies__studyOID__get", "parameters": [{"name": "studyOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Studyoid"}}], "responses": {"200": {"description": "The requested study", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Study"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"summary": "Update a study", "operationId": "update_study_studies__studyOID__put", "parameters": [{"name": "studyOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Studyoid"}}, {"name": "api-key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Study"}}}}, "responses": {"200": {"description": "The updated study", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Study"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"summary": "Delete a study", "operationId": "delete_study_studies__studyOID__delete", "parameters": [{"name": "studyOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Studyoid"}}, {"name": "api-key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Api-Key"}}], "responses": {"204": {"description": "No content"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/studies/{studyOID}/datasets": {"get": {"summary": "Get the list of datasets for a study", "operationId": "datasets_studies__studyOID__datasets_get", "parameters": [{"name": "studyOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Studyoid"}}, {"name": "standard", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Standard"}}, {"name": "if-modified-since", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "If-Modified-Since"}}], "responses": {"200": {"description": "List of datasets for a study", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/StudyDataset"}, "title": "Response Datasets Studies Studyoid Datasets Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"summary": "Create a new dataset", "operationId": "post_dataset_studies__studyOID__datasets_post", "parameters": [{"name": "standard", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Standard"}}, {"name": "api-key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Api-Key"}}], "responses": {"201": {"description": "Study dataset metadata (not the entire dataset)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StudyDataset"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/studies/{studyOID}/datasets/{datasetOID}": {"get": {"summary": "Get a dataset", "operationId": "dataset_studies__studyOID__datasets__datasetOID__get", "parameters": [{"name": "studyOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Studyoid"}}, {"name": "datasetOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Datasetoid"}}, {"name": "metadataonly", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Metadataonly"}}, {"name": "offset", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": 0, "title": "Offset"}}, {"name": "limit", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": 0, "title": "Limit"}}, {"name": "accept-encoding", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Accept-Encoding"}}, {"name": "if-modified-since", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "If-Modified-Since"}}], "responses": {"200": {"description": "The requested dataset content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StudyDataset"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"summary": "Update a dataset", "operationId": "update_dataset_studies__studyOID__datasets__datasetOID__put", "parameters": [{"name": "datasetOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Datasetoid"}}, {"name": "standard", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Standard"}}, {"name": "api-key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatasetJson"}}}}, "responses": {"200": {"description": "Updated dataset metadata (not the entire dataset)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StudyDataset"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"summary": "Append records to a dataset", "operationId": "append_dataset_studies__studyOID__datasets__datasetOID__patch", "parameters": [{"name": "studyOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Studyoid"}}, {"name": "datasetOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Datasetoid"}}, {"name": "api-key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ItemData"}}}}, "responses": {"200": {"description": "Updated dataset metadata (not the entire dataset)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StudyDataset"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"summary": "Delete a dataset", "operationId": "delete_dataset_studies__studyOID__datasets__datasetOID__delete", "parameters": [{"name": "studyOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Studyoid"}}, {"name": "datasetOID", "in": "path", "required": true, "schema": {"type": "string", "title": "Datasetoid"}}, {"name": "api-key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "", "title": "Api-Key"}}], "responses": {"204": {"description": "No content"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"About": {"properties": {"lastUpdated": {"type": "string", "format": "date-time", "title": "Lastupdated"}, "author": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Author"}, "repo": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Repo"}, "links": {"items": {"$ref": "#/components/schemas/Link"}, "type": "array", "title": "Links"}}, "type": "object", "required": ["lastUpdated", "author", "repo", "links"], "title": "About", "description": "about the API "}, "DatasetJson": {"properties": {"creationDateTime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Creationdatetime", "default": "2024-03-15T10:10:16.997178"}, "datasetJSONVersion": {"type": "string", "enum": ["1.0.0", "1.1.0"], "title": "Datasetjsonversion"}, "fileOID": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fileoid"}, "asOfDateTime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Asofdatetime"}, "originator": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Originator"}, "sourceSystem": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sourcesystem"}, "sourceSystemVersion": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sourcesystemversion"}, "datasetType": {"type": "string", "enum": ["clinicalData", "referenceData"], "title": "Datasettype"}, "OID": {"type": "string", "title": "Oid"}, "studyOID": {"type": "string", "title": "Studyoid"}, "metaDataVersionOID": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Metadataversionoid"}, "metaDataRef": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri"}, {"type": "null"}], "title": "Metadataref"}, "records": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Records", "default": 0}, "name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "items": {"items": {"$ref": "#/components/schemas/Item"}, "type": "array", "title": "Items"}, "itemData": {"items": {}, "type": "array", "title": "Itemdata", "default": []}}, "type": "object", "required": ["datasetJSONVersion", "datasetType", "OID", "studyOID", "name", "label", "items"], "title": "DatasetJson", "description": "Dataset-JSON dataset model, including metadata and data "}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "Item": {"properties": {"OID": {"type": "string", "title": "Oid"}, "name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "type": {"type": "string", "enum": ["string", "integer", "decimal", "float", "double", "boolean"], "title": "Type"}, "length": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Length"}, "displayFormat": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Displayformat"}, "keySequence": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Keysequence"}}, "type": "object", "required": ["OID", "name", "label", "type"], "title": "Item", "description": "Dataset column, or variable, metadata - one Item per column in the dataset "}, "ItemData": {"properties": {"itemData": {"items": {}, "type": "array", "title": "Itemdata", "default": []}}, "type": "object", "title": "ItemData", "description": "Dataset-JSON records to append to an existing dataset "}, "Link": {"properties": {"name": {"type": "string", "title": "Name"}, "href": {"type": "string", "title": "Href"}}, "type": "object", "required": ["name", "href"], "title": "Link", "description": "API links to related content "}, "Study": {"properties": {"oid": {"type": "string", "title": "Oid"}, "name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "standards": {"anyOf": [{"items": {"type": "string", "enum": ["SDTMIG", "SENDIG", "ADaMIG", "Other"]}, "type": "array"}, {"type": "null"}], "title": "Standards", "default": []}, "href": {"type": "string", "title": "Href"}, "path": {"anyOf": [{"type": "string", "format": "path"}, {"type": "null"}], "title": "Path"}, "creationDateTime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Creationdatetime", "default": "2024-03-15T10:10:16.991178"}, "datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/StudyDataset"}, "type": "array"}, {"type": "null"}], "title": "Datasets", "default": []}}, "type": "object", "required": ["oid", "name", "label", "href"], "title": "Study", "description": "Study metadata for each study with associated Dataset-JSON datasets "}, "StudyDataset": {"properties": {"oid": {"type": "string", "title": "Oid"}, "name": {"type": "string", "title": "Name"}, "label": {"type": "string", "title": "Label"}, "type": {"type": "string", "title": "Type"}, "standard": {"anyOf": [{"type": "string", "enum": ["SDTMIG", "SENDIG", "ADaMIG", "Other", ""]}, {"type": "null"}], "title": "Standard"}, "records": {"type": "integer", "title": "Records"}, "href": {"type": "string", "title": "Href"}, "creationDateTime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Creationdatetime", "default": "2024-03-15T10:10:16.989178"}, "filename": {"type": "string", "format": "path", "title": "Filename"}}, "type": "object", "required": ["oid", "name", "label", "type", "records", "href", "filename"], "title": "StudyDataset", "description": "Dataset metadata maintained for each dataset associated with a study "}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}}};
// Build a system
const ui = SwaggerUIBundle({
spec: spec,
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
window.ui = ui
}
</script>
</body>
</html>