DataONE API - 2.0
Document Status: | |||||
---|---|---|---|---|---|
|
Contents
In order to accommodate changes to the the SystemMetadata type, new API methods will be introduced. Many existing v1 methods will have the same signatures but any method that deals with the SystemMetadata type will need to have a v2 version.
# MN.v1.create()
# Synch
- MN.v1.listOjects()
- CN.v1.create()
# Valid getSystemMetadata() calls
- CN.v2.getSystemMetadata() –> v2.SystemMetadata
- CN.v1.getSystemMetadata() –> v1.SystemMetadata
- MN.v1.getSystemMetadata() –> v1.SystemMetadata
# MN.v2.create()
# Synch
- MN.v2.listOjects()
- CN.v2.create()
# Valid getSystemMetadata() calls
- CN.v2.getSystemMetadata() –> v2.SystemMetadata
- MN.v2.getSystemMetadata() –> v2.SystemMetadata
- CN.v1.getSystemMetadata() –> v1.SystemMetadata
- MN.v1.getSystemMetadata() –> v1.SystemMetadata
# MN.v1.create()
# Synch
- MN.v1.listOjects()
- CN.[v1|v2].create()
# Valid get() calls
- CN.v2.getSystemMetadata() –> v2.SystemMetadata
- CN.v1.getSystemMetadata() –> v1.SystemMetadata
- MN.v1.getSystemMetadata() –> v1.SystemMetadata
# Replication to MN.target1 running v1 API
- MN.v1.getReplica()
- MN.target1.v1.getSystemMetadata() –> v1.SystemMetadata
# Replication to MN.target2 running v2 API
- MN.v1.getReplica()
- MN.target2.v1.getSystemMetadata() –> v1.SystemMetadata
- MN.target2.v2.getSystemMetadata() –> v2.SystemMetadata
# Updates
- CN.v1.setAccessPolicy() –> MN.target1.v1.systemMetadataChanged()
- CN.v1.setAccessPolicy() –> MN.target2.v2.systemMetadataChanged()
- CN.v2.setAccessPolicy() –> MN.target1.v1.systemMetadataChanged() ALLOWED?
- CN.v2.setAccessPolicy() –> MN.target2.v2.systemMetadataChanged()
Figure 1. Mixed MN API version interactions with replication
# MN.v2.create()
# Synch
- MN.v1.listOjects()
- CN.[v1|v2].create()
# Valid get() calls
- CN.v2.getSystemMetadata() –> v2.SystemMetadata
- CN.v1.getSystemMetadata() –> v1.SystemMetadata
- MN.v1.getSystemMetadata() –> v1.SystemMetadata
# Replication to MN.target running v1 API
- NOT ALLOWED
# Replication to MN.target running v2 API
- MN.v1.getReplica()
- MN.target.v1.getSystemMetadata() –> v1.SystemMetadata
- MN.target.v2.getSystemMetadata() –> v2.SystemMetadata
Figure 2. Mixed MN API version interactions with replication The original MN is running v2 of the API