Code Monkey home page Code Monkey logo

Comments (17)

rrjanbiah avatar rrjanbiah commented on June 2, 2024

@drpepper Basically all actions should be possible through API. The API server is oAuth2 compliant.

Simple documentation and API explorer/sandbox can be viewed in browser at http://yourdomain/api_explorer/ For example, http://board.demo.restya.com/api_explorer/

Just now, we have noticed that file upload endpoints are not included in above explorer; we'll add them in upcoming version.

For your case, the possible flow will be:

  1. GET /v1/oauth.json - to get guest access_token for all other API calls (All API calls are oAuth protected)
  2. POST /v1/users/login.json - to login to admin user. This will return higher level access_token that you can pass it for high level API calls
  3. POST /v1/boards.json - create new board

Please let us know how it goes!

from board.

drpepper avatar drpepper commented on June 2, 2024

Great, I'll try that out!

from board.

drpepper avatar drpepper commented on June 2, 2024

After going through the API explorer, which is great by the way, I have a few further questions, please:

  1. We are planning on integrating the Restyaboard interface via an iFrame, and using our existing server to create users and boards for our existing users and groups, and logging these users automatically within the iframe. Would this be possible? I don't see anything about embedding in the docs...
  2. How are the notifications sent from the server to the client? Are they accessible via the API as well?
  3. What do you use to format the API explorer, please?

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

We are planning on integrating the Restyaboard interface via an iFrame, and using our existing server to create users and boards for our existing users and groups, and logging these users automatically within the iframe. Would this be possible? I don't see anything about embedding in the docs...

Untested, but might work. After login, please try storing access_token in auth key in sessionStorage

Refer https://github.com/RestyaPlatform/board/blob/master/client/js/views/login_view.js#L54

How are the notifications sent from the server to the client? Are they accessible via the API as well?

Yes, through activities.json endpoint

What do you use to format the API explorer, please?

We use Swagger UI https://github.com/swagger-api/swagger-ui

It is mentioned in credits section of "About" page http://board.demo.restya.com/#/about This page is accessible by clicking Restyaboard icon found in left corner of the footer.

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

@drpepper Are things working as expected?

from board.

drpepper avatar drpepper commented on June 2, 2024

@rrjanbiah Haven't done it yet but will keep you posted!

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

@drpepper OK, sure!

from board.

jaiBITS avatar jaiBITS commented on June 2, 2024

Hi,

I am trying to access rest API through postman using auth. But request to api only returns access token. But not able to do it.

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

@jaiBITS As I mentioned above #17 (comment), all API endpoints, except /v1/oauth.json are oAuth2 protected. You'll need access_token to access all other APIs.

We're not familiar with postman. So, if you're able to figure it out, please share your findings.

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

@jaiBITS Were you able to figure it out? Do you need any help from us?

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

Closing this for now. If you get any issues, please feel free to reopen.

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

Reopening this as we're getting similar such requests. Have to properly document the workflow somewhere.

from board.

lmarikannan avatar lmarikannan commented on June 2, 2024

Fixed on this commit ae6b1c0.

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

@lmarikannan Reopening this as above fix is not really helpful in understanding the API workflow. Need proper documentation.

from board.

rrjanbiah avatar rrjanbiah commented on June 2, 2024

This isn't look like a correct fix/solution. Reopening.

from board.

lmarikannan avatar lmarikannan commented on June 2, 2024

Updated on restya.com API documentation - http://restya.com/board/docs/api

from board.

SheheryarGhaznavi avatar SheheryarGhaznavi commented on June 2, 2024

#17 (comment)

i am trying to login into restyaboard through api
i first get the outh token (success)
then login though login.json (sucess)
then i redirect to domain.com/#/boards it redirect me to login page

from board.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.