Tier | Version | REST | Function |
---|---|---|---|
1 | 1.0 | GET /monitor/ping | MNCore.ping() |
1 | 1.0, 2.0 | GET /log?[fromDate={fromDate}][&toDate={toDate}][&event={event}][&idFilter={idFilter}][&start={start}][&count={count}] | MNCore.getLogRecords() |
1 | 1.0 | GET / and GET /node | MNCore.getCapabilities() |
1 | 1.0 | GET /object/{id} | MNRead.get() |
1 | 1.0 | GET /meta/{id} | MNRead.getSystemMetadata() |
1 | 1.0 | HEAD /object/{id} | MNRead.describe() |
1 | 1.0 | GET /checksum/{pid}[?checksumAlgorithm={checksumAlgorithm}] | MNRead.getChecksum() |
1 | 1.0 | GET /object[?fromDate={fromDate}&toDate={toDate}&identifier={identifier}&formatId={formatId}&replicaStatus={replicaStatus}&start={start}&count={count}] | MNRead.listObjects() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
package org.dataone.tests; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(xml2) | |
library(httr) | |
# Get the XML from the CN | |
nodes_xml <- GET("https://cn.dataone.org/cn/v2/node") | |
# Build an xml document object | |
node_document <- read_xml(nodes_xml) | |
# Filter out CNs and dedicated replica MNs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
package org.dataone.tests; | |
import com.hazelcast.client.ClientConfig; | |
import com.hazelcast.client.HazelcastClient; | |
import com.hazelcast.config.GroupConfig; | |
import com.hazelcast.core.IQueue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
from d1_client.cnclient_2_0 import CoordinatingNodeClient_2_0 | |
from d1_common.types import dataoneTypes | |
import os | |
# Set up the CN client with a token | |
token = os.environ["token"] | |
headers = {"Authorization": "Bearer " + token} | |
base_url = "https://cn.dataone.org/cn" | |
cn = CoordinatingNodeClient_2_0(base_url, headers = headers) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
from d1_client.mnclient_2_0 import MemberNodeClient_2_0 | |
from d1_common.types import dataoneTypes | |
import uuid | |
import hashlib | |
import io | |
# Log in and get a token from https://knb.ecoinformatics.org | |
# or https://dev.nceas.ucsb.edu if using a a test server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.dataone.client.javafx; | |
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.layout.VBox; | |
import javafx.scene.web.WebView; | |
import javafx.stage.Stage; | |
import java.io.BufferedReader; | |
import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from d1_client.mnclient_2_0 import MemberNodeClient_2_0 | |
import os | |
# Log in and get a token from https://search.dataone.org | |
# (or https://search-stage.test.dataone.org if using a test server) | |
# and set the token as a shell variable | |
token = os.getenv("token") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fiona | |
from pprint import pprint | |
from shapely.geometry import Point, Polygon | |
from descartes import PolygonPatch | |
import matplotlib.pyplot as plt | |
from pathlib import Path | |
data_folder = os.path.join( | |
Path.home(), | |
"Documents", |