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

Write API documentation #7

Closed
2 of 3 tasks
retrixe opened this issue Apr 28, 2022 · 5 comments
Closed
2 of 3 tasks

Write API documentation #7

retrixe opened this issue Apr 28, 2022 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@retrixe
Copy link
Owner

retrixe commented Apr 28, 2022

Some initial work has started in API.md for now, but documentation is far from complete.

  • Document reverse proxying and security practices to follow with Octyne.
  • Complete documenting all endpoints with parameters and responses.
  • Document possible error responses.
@retrixe retrixe self-assigned this Apr 28, 2022
@retrixe retrixe added documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed labels Apr 28, 2022
@retrixe retrixe modified the milestones: Octyne 1.1.0, Octyne 1.2.0 Apr 28, 2022
@chaneth8
Copy link

chaneth8 commented May 8, 2022

Hi, I'd love to help with this issue but I'm having some problems getting your APIs to run.

What I've done so far is to move config.json and users.json into the same directory as main.go. I then ran the following in the terminal:
Screen Shot 2022-05-08 at 4 10 47 PM

The errors I got were:

command-line-arguments

./main.go:17:22: undefined: Config
./main.go:36:13: undefined: Config
./main.go:55:15: undefined: InitializeConnector
./main.go:61:6: undefined: CreateProcess

I'm wondering how to resolve these errors, so that the code will run?

Thanks so much!

@retrixe
Copy link
Owner Author

retrixe commented May 8, 2022

@chaneth8 it should run correctly with go run .

go run main.go will only compile main.go and ignore all the other Go files.

Alternatively, you can use any of the uploaded binaries on the releases page instead if you don't want to run from source.

@chaneth8
Copy link

@retrixe Thank you for getting back. Is it okay if I ask a few more questions?

I'm trying to test the API on postman to get an idea of what it outputs for each endpoint. But I'm running into some trouble getting the authentication token. When I ran the following, I got:

Screen Shot 2022-05-15 at 3 14 53 PM

Do I need to be running an app with octyne in order to log in? If so, how do I do that?

Or do I need to edit users.json? This is what I have currently:
Screen Shot 2022-05-15 at 3 15 05 PM

Thanks.

@Sanguineous1
Copy link
Collaborator

@chaneth8 You are passing the login details through query parameters, you need to pass them through headers as Username and Password for logging in.

Also for users.json yes you do need to modify it, replace username with your username of choice and the password with a SHA256 hash, you can convert your password to a hash at https://sha256.vercel.app/

@retrixe retrixe removed this from the Octyne 1.1.0 milestone Jan 25, 2023
@retrixe retrixe pinned this issue Jan 25, 2023
@retrixe retrixe added this to the Octyne 1.3.0 milestone Jul 24, 2023
@retrixe retrixe closed this as completed Jan 12, 2024
@retrixe
Copy link
Owner Author

retrixe commented Jan 12, 2024

Complete with 1.2.0, documenting potential API errors is too much for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants