Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

TAJO-1647: Change Create Database Tajo Rest API address from POST /databases to POST /databases/{database_name}#604

Closed
charsyam wants to merge 4 commits into
apache:masterfrom
charsyam:feature/change-api-create-database
Closed

TAJO-1647: Change Create Database Tajo Rest API address from POST /databases to POST /databases/{database_name}#604
charsyam wants to merge 4 commits into
apache:masterfrom
charsyam:feature/change-api-create-database

Conversation

@charsyam
Copy link
Copy Markdown
Contributor

in Rest API
POST /databases/{database_name} is more understandable
comparing to POST /databases with database_name parameter

@jihoonson
Copy link
Copy Markdown
Contributor

Hi @charsyam, thanks for your patch.
Since I'm not familiar with RESTful API, I would like to ask a question.
Given a create database statement, the database_name is a variable defined by users.
For such variables, IMHO, passing database_name as a parameter looks more intuitive.
Are there any conventions in designing RESTful API?

@charsyam
Copy link
Copy Markdown
Contributor Author

@jihoonson Hi, jihoon. Thanks for your review :)
You're right. It is not real REST style.
but in my case, POST /databases has only one parameter as its name.
so I think POST /databases/{database-name} is more simple and understable. :)

But, It is not REST API.
so. I don't matter if you close this issue :)

@jihoonson
Copy link
Copy Markdown
Contributor

Thanks for your comment.
In terms of the consistency of APIs, I think that create database API should have the equivalent form of create table API.
So, passing database_name as a parameter looks good to me.

@charsyam charsyam closed this Jun 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants