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

Is it possible to create filter(not shared) for specified user by admin with using rest api? #99

Closed
lifemanship opened this issue Apr 6, 2017 · 3 comments
Assignees
Labels
help wanted Issue contains request for team help question
Milestone

Comments

@lifemanship
Copy link

lifemanship commented Apr 6, 2017

I want to automate the procedure of creating user through REST API.

  1. create user
  2. assign to the specified(shared) project
  3. add some filters
@DzmitryHumianiuk DzmitryHumianiuk added help wanted Issue contains request for team help question labels Apr 7, 2017
@DzmitryHumianiuk
Copy link
Member

image
http://YOUR_INSTANCE:PORT/ui/swagger-ui.html

  1. create user
    http://YOUR_INSTANCE:PORT/ui/swagger-ui.html#!/user-controller/createUserByAdminUsingPOST
    image
{
  "accountRole": "USER",
  "default_project": "string",
  "email": "string",
  "full_name": "string",
  "login": "string",
  "password": "string",
  "projectRole": "CUSTOMER"
}
  1. if you need assigment only to one project, you can make it previous request
  2. create filter
    http://YOUR_INSTANCE:PORT/ui/swagger-ui.html#!/user-filter-controller
    image
{
  "elements": [
    {
      "description": "string",
      "entities": [
        {
          "condition": "string",
          "filtering_field": "string",
          "is_negative": true,
          "value": "string"
        }
      ],
      "is_link": true,
      "name": "string",
      "selection_parameters": {
        "is_asc": true,
        "page_number": 0,
        "sorting_column": "string"
      },
      "share": true,
      "type": "launch"
    }
  ]
}

@DzmitryHumianiuk DzmitryHumianiuk added this to the 3.0 milestone Apr 7, 2017
@lifemanship
Copy link
Author

Just to clarify.
In the last step(3. create filter) we will create filter for user that send the request.
As client for RP I am using https://github.com/reportportal/client-net that sends user's token(UUID) for authorization. But after step 1(create user) i know only username\password of the created user. To obtain user's token(UUID) i need to login(through UI) with created user credentials.
The question is:
Does RP REST API support basic authentication?

@avarabyeu
Copy link
Member

@lifemanship no it doesn't. but you can request token the same way as ui does (via basic auth) and then use it. Have a look at request to server after clicking login button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue contains request for team help question
Projects
None yet
Development

No branches or pull requests

4 participants