Sunbird-Lern / userorg-service

API services for Learning management system of sunbird
MIT License
32 stars 144 forks source link

Create Category API URL failing #7

Open thillaibirla opened 6 years ago

thillaibirla commented 6 years ago

@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" ] }

2) 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 <!DOCTYPE html>

Error
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 commented 6 years ago

@maheshkumargangula Can you have a look.

thillaibirla commented 6 years ago

@maheshkumargangula, @manzarul , @kochhar Tried with the below link as well, its not working https://sunbird.juliacomputing.io/api/framework/v1/framework/v1/category/create/items?framework=AI https://sunbird.juliacomputing.io/api/framework/category/create/items?framework=AI

Same error as above.

kochhar commented 6 years ago

@maheshkumargangula the url should be /api/framework/v1/category/create/items correct?

On Thu, Feb 22, 2018 at 5:27 PM thillaibirla notifications@github.com wrote:

@maheshkumargangula https://github.com/maheshkumargangula, @manzarul https://github.com/manzarul , @kochhar https://github.com/kochhar Tried with the below link as well, its not working

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

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

Same error as above.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/project-sunbird/sunbird-lms-service/issues/7#issuecomment-367658652, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGVqofr9OucA8LCXoYNtqLbIxjn2Q-Lks5tXVYagaJpZM4SPEXb .

thillaibirla commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

It's already created as the first step, now we are getting 400 error

On 23-Feb-2018 5:39 PM, "harishkumar gangula" notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/project-sunbird/sunbird-lms-service/issues/7#issuecomment-367992643, or mute the thread https://github.com/notifications/unsubscribe-auth/AiwP-OKe1yg7J_UJ1jhRpOJn-8BRPw7kks5tXqpegaJpZM4SPEXb .

HarishGangula commented 6 years ago

@thillaibirla can you share the curl of the request

thillaibirla commented 6 years ago

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

postman - screenshot category api

maheshkumargangula commented 6 years ago

@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 commented 6 years ago

@maheshkumargangula this instance is not for k-12 education. An entirely new framework is being created for AI programming. Board, Subject, Medium are not applicable here.

On 23-Feb-2018 18:47, "Mahesh Kumar Gangula" notifications@github.com wrote:

@thillaibirla https://github.com/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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/project-sunbird/sunbird-lms-service/issues/7#issuecomment-368006523, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGVqtK-5mGVrKEaYxJQ4lTeTViQB4fhks5tXrqDgaJpZM4SPEXb .

thillaibirla commented 6 years ago

@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 commented 6 years ago

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

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