-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add updateIdMetadata
method to MNAdmin API
#1766
Comments
The proposed REST call (
From these descriptions it sounds like PATCH might fit best, but my understanding is that it's not widely supported by browsers etc. In that case, maybe In summary - I don't think GET is right, but I don't think there's a clear "right answer" from the other options - so am totally open to discussion. Once that's decided, the REST call might look like this (Assuming we use
Followup QuestionIs there any reason we can't accept a mix of pids and formatIds in the same REST call? Could we allow the caller to mix them, instead of having to define |
I agree with much of what Matthew said. Let's discuss this before you implement. In addition, REST is all about managing resources, rather than modeling remote procedure calls (RPC). So each API should be against a specific resource or collection of resources. Typically that is the For a single identifier, the traditional REST structure would look like:
For the collection-wide operation, it might be more like:
Note there is no method like "batchUpdate" in a REST style API -- instead, we are modifying either a single resource or a whole collection. Let's discuss. |
updateDatacite
method to MNAdmin APIupdateIdsMetadata
method to MNAdmin API
updateIdsMetadata
method to MNAdmin APIupdateIdMetadata
method to MNAdmin API
In our today's backend developers' meeting, we revised the rest API:
Methods:
updateAllIdMetadata(Session session, Enum type)
|
LGTM! |
Overall looks good, but I think you can omit the DOI part of the rest url. The service should be able to tell what kind of identifier it is. |
@mbjones @artntek
Does the first one mean we update metadata for all identifiers of all supported types (e.g. doi, ark)? |
Earlier, I proposed: For a single identifier, the service will update that one identifier's metadata based on its type (e.g., DOIs go one place and arks go another):
For the collection-wide operation, we can update multiple at once, and for each PID, the right location to update is determined by the identifier type:
So, under that scenario, your two calls are below in the proposed REST syntax:
Let's discuss on slack or in our meeting and summarize here when we reach a conclusion. |
Final Version:Rest Calls: PUT /identifiers/{pid1}
PUT /identifiers[/]?[all=true] | [&pid={pid1}] | [&formatId={formatId1}]
PUT /identifiers/{pid1} //update pid1
PUT /identifiers/?all=true //update everything
PUT /identifiers/?pid={pid1}&pid={pid2} //update pid1 and pid2
PUT /identifiers/?formatId={formatId1}&formatId={formatId2} //update dois with formatId1 or formatId2
PUT /identifiers?formatId={formatId1}&pid={pid2} //process all elements in a mixed list
PUT /identifiers?all=true&formatId={formatId}&pid={pid2} //formatIds and pids ignored, since `all=true` updates everything anyway
PUT /identifiers?all=false&pid={pid2} //update pid2 Two Methods:
updateAllIdMetadata(Session session)
|
need to add this to admin guide documentation too, since it's not part of D1 API docs |
We are removing the Metacat
replication
servlet, which has the methods to update the Datacite metadata documents for DOIs. So we need a new method in MNAdmin API to allow operator to do the same tasks.Here is the proposed method:
updateDatacite(session, option, pid[], formatId[])
GET /updateDatacite?option={all | pids | formatIds} [&pid={pid}] [&formatId={formatId}]
This method triggers an updating task to ensure the all or partial (specified by either a list of pids or format ids) DOI objects' metadata is up-to-date. If the caller specify option
all
, bothpid
andformatId
parameters will be ignored. If the caller specify optionpids
, the formatId parameter will be ignored. For many implementations, this method would only queue an asynchronous updating task, and not wait for the task to complete.Parameters
all
,pids
andformatIds
all
orformatIds
.all
orpids
.- Exceptions.NotImplemented – The service is not implemented. (errorCode=501, detailCode=????)
- Exceptions.ServiceFailure – (errorCode=500, detailCode=????)
- Exceptions.InvalidRequest – The request was malformed. (errorCode=400, detailCode=????)
- - Exceptions.NotAuthorized – The supplied identity information is not authorized for the requested operation. (errorCode=400, detailCode=????)
The text was updated successfully, but these errors were encountered: