Hi,

You’re trying to connect to www.reviewboard.org, which is not a review
board server.

-David
On Mon, Apr 9, 2018 at 9:36 AM Vladimir Bazhmin <rixte...@gmail.com> wrote:

> Greetings,
>
> RBTools 7.0
>
> I've tried the following documentation to establish connection to RB via
> RBTools for python.
>
> https://www.reviewboard.org/docs/rbtools/0.7/api/tutorial/#creating-a-review-request
>
> I wasn't able to connect to RB by using following code:
>
> client = RBClient('http://www.reviewboard.org', username='...',
> password='...')
>
> *rbtools.api.errors.AuthorizationError: The username or password was not
> correct (HTTP 401, API Error 104)*
>
> Credentials were tested in browser.
>
> Though I was able to connect by using api key(which i generated for my
> account profile) and the following code:
>
> client = RBClient('http://www.reviewboard.org', api_key='...')
> print client.get_root()
>
> Code's output provided me with the *default* methods for RB:
>
> ItemResource(transport=<SyncTransport(url='http://www.reviewboard.org',
> cookie_file=u'<SECRET_PATH>.rbtools-cookies', agent='RBTools/0.7')>,
> payload={u'stat': u'ok', u'uri_templates': {u'product': u'
> http://www.reviewboard.org/api/products/{product_name}/',
> u'store_categories': u'http://www.reviewboard.org/api/store/categories/',
> u'releases': u'
> http://www.reviewboard.org/api/products/{product_name}/releases/',
> u'store_screenshot': u'
> http://www.reviewboard.org/api/store/products/{product_slug}/screenshots/{screenshot_id}/',
> u'store_screenshots': u'
> http://www.reviewboard.org/api/store/products/{product_slug}/screenshots/',
> u'store_product': u'
> http://www.reviewboard.org/api/store/products/{product_slug}/',
> u'release': u'
> http://www.reviewboard.org/api/products/{product_name}/releases/{release_id}/',
> u'products': u'http://www.reviewboard.org/api/products/',
> u'store_releases': u'
> http://www.reviewboard.org/api/store/products/{product_slug}/releases/',
> u'store_category': u'
> http://www.reviewboard.org/api/store/categories/{category_slug}/',
> u'store_products': u'http://www.reviewboard.org/api/store/products/',
> u'root': u'http://www.reviewboard.org/api/', u'store': u'
> http://www.reviewboard.org/api/store/', u'store_release': u'
> http://www.reviewboard.org/api/store/products/{product_slug}/releases/{version}/'},
> u'links': {u'self': {u'href': u'http://www.reviewboard.org/api/',
> u'method': u'GET'}, u'products': {u'href': u'
> http://www.reviewboard.org/api/products/', u'method': u'GET'}, u'store':
> {u'href': u'http://www.reviewboard.org/api/store/', u'method': u'GET'}}},
> url=u'http://www.reviewboard.org/api/', token=u'uri_templates')
>
> By following the above mentioned documentation I tried to get repositories:
>
> repos = root.get_repositories()
>
> And I've got the following error:
>
> *AttributeError*
>
> Which is logical if we watch the output because it doesn't contain the
> needed method:
>
> *https://reviewboard.eng.vmware.com/api/repositories/
> <https://reviewboard.eng.vmware.com/api/repositories/>*
>
> After that I tried to check the link "http://www.reviewboard.org/api/";
> and managed to find many new methods which were needed.
> One of them for example was to get repositories.
>
> Could You please correct me what I'm doing wrong to get these
> *non-default* methods. Many thanks!
>
> Regards,
> Vladimir Bazhmin
>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to