Comments (2)
@tloubrieu-jpl I am trying to to send up a doi reservation request as specified in the swagger hub API https://app.swaggerhub.com/apis/PDS_APIs/pds_doi_api/0.1#/dois/post_dois but I keep getting a 400 bad request error.
I tried testing by sending up the exact example that is shown in swaggerhub but it still throws a 400 bad request error. Can you please clarify as to what the parameters should look like?
I am sending this POST request payload:
{
"labels": [
{
"status": "Reserved",
"title": "Laboratory Shocked Feldspars Bundle",
"publication_date": "2020-03-11",
"product_type_specific": "PDS4 Collection",
"author_last_name": "Johnson",
"author_first_name": "J. R.",
"related_resource": "urn:nasa:pds:lab_shocked_feldspars"
}
]
}
To this URL:
http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois?action=reserve&[email protected]&node=eng
I am tunneled in and am sure since I can see the list at http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois
I am not sure if I am missing something here.
from doi-ui.
@eddiesarevalo I updated the server since the error message are clearer with the new version.
I tested the request as follow and it worked:
curl --location --request POST 'http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois?action=reserve&[email protected]&node=eng'
--header 'Content-Type: application/json'
--data-raw '{
"labels": [
{
"status": "Reserved",
"title": "Laboratory Shocked Feldspars Bundle collection",
"publication_date": "2020-03-11",
"product_type_specific": "PDS4 Collection",
"author_last_name": "Johnson",
"author_first_name": "J. R.",
"related_resource": "urn:nasa:pds:lab_shocked_feldspars"
}
]
}
'
Howver if you re-run it you should have error 400 because of duplication, but you'll have the error message in response.
You should use it to display the error to the user.
Thanks
from doi-ui.
Related Issues (20)
- Deploy doi-ui in production on AWS HOT 8
- DOI UI Menu jump HOT 1
- As a user, I want to access the DOI UI from outside JPL HOT 3
- Upgrade deployment of DOI UI to patched v1.0.1 HOT 5
- Replace authentication with Cognito on DOI UI and DOI service HOT 3
- Complete JPL AppScan of the application HOT 1
- create an ASR for the application HOT 1
- Error messages are inconsistent HOT 1
- doi-ui still has too many high vulnerabilities HOT 3
- Develop DOI Editor and Service Documentation HOT 1
- Keywords text box and info icon do not appear correctly HOT 2
- Update DOI notification box to be centered HOT 1
- Update subjects to include reference to UAT when inserted from UAT
- When authentication is not valid anymore, need to make a different message than when the API is down. HOT 4
- Sometimes there is a null error message when there is no error HOT 2
- doi-editor release ui inoperable under Firefox HOT 6
- Make the latest doi-ui work with JPL AWS SSO HOT 13
- service does not start on at least 2 laptops HOT 2
- Move the logout inside the main header bar HOT 1
- When back-end service is offline, html tags shows up in error message
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doi-ui.