Skip to content
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

Create Category API URL failing #7

Open
thillaibirla opened this issue Feb 22, 2018 · 12 comments
Open

Create Category API URL failing #7

thillaibirla opened this issue Feb 22, 2018 · 12 comments

Comments

@thillaibirla
Copy link

@kochhar
Tried creating a category under the framework AI as per the details given in
http://www.sunbird.org/apis/framework/#operation/FrameworkV1CategoryCreatePost

  1. Tried calling the API using the URL - https://sunbird.juliacomputing.io/api/framework/v1/category/v1/category/create/items?id=AI

The above URL is as per the Server URL given in the site(v1/category/ is repeated in the server URL) and the framework id is apended to the URL as mentioned in the site.

We are getting a 404 Not found error in postman.
{
"request_path": "/framework/v1/category/v1/category/create/items",
"message": "API not found with these values",
"request_host": [
"sunbird.juliacomputing.io"
]
}

  1. when tried calling the API using the below URL
    https://sunbird.juliacomputing.io/api/framework/v1/category/create/items?id=AI

We got 404 Not Found again

<title>Error</title>
Cannot POST /v1/framework/category/create/items

Can you please let us know whats the correct URL for calling the create category API for the AI framework created.

Please let me know if you need further information.
Thanks,
Thillai

@manzarul
Copy link
Contributor

@maheshkumargangula Can you have a look.

@kochhar
Copy link
Contributor

kochhar commented Feb 22, 2018 via email

@thillaibirla
Copy link
Author

@kochhar @maheshkumargangula

https://sunbird.juliacomputing.io/api/framework/v1/category/create/?framework=AI

tried the above API link, getting 400 Bad request error.

{
"id": "api.category.create",
"ver": "1.0",
"ts": "2018-02-23T05:24:36.236Z",
"params": {
"resmsgid": "d65cc4c0-1859-11e8-8b56-958c4f55e5ca",
"msgid": null,
"status": "failed"
},
"responseCode": "CLIENT_ERROR",
"result": {}

@HarishGangula
Copy link

HarishGangula commented Feb 23, 2018

@thillaibirla AI is this framework created ? otherwise please create one and URL should be https://sunbird.juliacomputing.io/api/framework/v1/category/create?framework=AI

@thillaibirla
Copy link
Author

thillaibirla commented Feb 23, 2018 via email

@HarishGangula
Copy link

@thillaibirla can you share the curl of the request

@thillaibirla
Copy link
Author

@harishgilimi - we are using postman, and below is our request
{
"request": {
"category": {
"name": "AI1",
"description": "Machine Learning",
"code": "AI1"
}
}
}

postman - screenshot category api

@maheshkumargangula
Copy link
Contributor

@thillaibirla - AI1 is not the valid code to use for categories. Please use the below codes for categories creation.

  1. board
  2. gradeLevel
  3. subject
  4. medium

@kochhar
Copy link
Contributor

kochhar commented Feb 23, 2018 via email

@thillaibirla
Copy link
Author

thillaibirla commented Feb 23, 2018

@maheshkumargangula -- is there a set of available values for term creation API for the label and value fields in the below request? the below request link is from the sunbird documentation.

{
"request": {
"term": {
"label": "Class2",
"value": "class2",
"description": "Term for Class 2"
}
}
}

@mohitga
Copy link

mohitga commented Feb 27, 2018

@vrayulu @maheshkumargangula
let us see what is missing from the API side.

@kochhar End-user facing documentation is still in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants