Palo Alto Networks User Management API

The User Management API from Palo Alto Networks — 5 operation(s) for user management.

OpenAPI Specification

palo-alto-networks-user-management-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 'Prisma Cloud: Managed Security Service Provider (MSSP) User Management API'
  description: 'APIs to interact with the MSSP Backend Service


    # Authentication


    '
  version: '1.0'
servers:
- url: https://mssp-api.prismacloud.io
tags:
- name: User Management
paths:
  /api/v1/user/{username}/credential:
    put:
      tags:
      - User Management
      summary: Change Password
      description: Change password for user
      operationId: resetPassword
      parameters:
      - name: username
        in: path
        description: Username
        required: true
        schema:
          maxLength: 128
          minLength: 1
          type: string
      requestBody:
        content:
          application/json; charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
        required: true
      responses:
        '204':
          description: Successful operation
        '400':
          description: Bad password
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many api request
      security:
      - UserJwt: []
      x-public: 'true'
  /api/v1/mssp/{mssp-id}/user/{username}:
    get:
      tags:
      - User Management
      summary: Get User by username
      description: Get User by username
      operationId: getUser
      parameters:
      - name: username
        in: path
        description: username of the user
        required: true
        schema:
          type: string
      - name: mssp-id
        in: path
        description: the id of the MSSP of interest
        required: true
        schema:
          type: string
      responses:
        '200':
          description: User details for given username
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsspUserResponse'
        '400':
          description: Bad request. One of the required arguments is missing or fails a constraint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsspUserResponse'
      security:
      - UserJwt: []
      x-public: 'true'
    put:
      tags:
      - User Management
      summary: Update an existing user
      description: Update an existing user
      operationId: updateUser
      parameters:
      - name: username
        in: path
        description: username of the user
        required: true
        schema:
          type: string
      - name: mssp-id
        in: path
        description: the id of the MSSP of interest
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json; charset=UTF-8:
            schema:
              $ref: '#/components/schemas/MsspUserRequest'
        required: true
      responses:
        '200':
          description: User updated successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsspUserResponse'
        '400':
          description: Bad request. One of the required arguments is missing or fails a constraint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsspUserResponse'
      security:
      - UserJwt: []
      x-public: 'true'
    delete:
      tags:
      - User Management
      summary: Delete an existing user
      description: Delete an existing user
      operationId: deleteUser
      parameters:
      - name: username
        in: path
        description: Username of the user
        required: true
        schema:
          type: string
      - name: mssp-id
        in: path
        description: the id of the MSSP of interest
        required: true
        schema:
          type: string
      responses:
        '204':
          description: User deleted successful
        '400':
          description: Bad request. One of the required arguments is missing or fails a constraint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
      security:
      - UserJwt: []
      x-public: 'true'
  /api/v1/user/{username}/credential/reset-token/validate:
    post:
      tags:
      - User Management
      summary: Validate Forgot Password Token
      description: Triggers the validation of a forgot password token and generating a special JWT upon successful validation of the forgot password token
      operationId: validateToken
      parameters:
      - name: username
        in: path
        description: Username
        required: true
        schema:
          maxLength: 128
          minLength: 1
          type: string
      requestBody:
        content:
          application/json; charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ValidateTokenRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateTokenResponse'
        '400':
          description: Bad request token / Request token expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many api request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateTokenResponse'
      x-public: 'true'
  /api/v1/mssp/{mssp-id}/user:
    get:
      tags:
      - User Management
      summary: List users
      description: List users for given mssp console
      operationId: listUsers
      parameters:
      - name: next_page_token
        in: query
        description: Token to fetch next page. Max pagesize is 60.
        required: false
        schema:
          type: string
      - name: mssp-id
        in: path
        description: The id of the MSSP of interest
        required: true
        schema:
          type: string
      responses:
        '200':
          description: List of users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsspListUserResponse'
        '400':
          description: Bad request. One of the required arguments is missing or fails a constraint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsspListUserResponse'
      security:
      - UserJwt: []
      x-public: 'true'
    post:
      tags:
      - User Management
      summary: Create a new user
      description: Create a new user under a specific MSSP account
      operationId: createUser
      parameters:
      - name: mssp-id
        in: path
        description: the id of the MSSP of interest
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json; charset=UTF-8:
            schema:
              $ref: '#/components/schemas/MsspUserRequest'
        required: true
      responses:
        '201':
          description: User created successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsspUserResponse'
        '400':
          description: Bad request. One of the required arguments is missing or fails a constraint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflicting username found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsspUserResponse'
      security:
      - UserJwt: []
      x-public: 'true'
  /api/v1/user/{username}/credential/reset-token:
    get:
      tags:
      - User Management
      summary: Generate password reset token
      description: Triggers the forgot password flow where a password reset token is emailed to a validated user
      operationId: resetToken
      parameters:
      - name: username
        in: path
        description: Username
        required: true
        schema:
          maxLength: 128
          minLength: 1
          type: string
      responses:
        '204':
          description: Successful operation
        '429':
          description: Too many api request
      x-public: 'true'
components:
  schemas:
    ValidateTokenResponse:
      type: object
      properties:
        token:
          type: string
          description: Reset Password Restricted JWT
    MsspListUserResponse:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/MsspUserResponse'
        nextPageToken:
          type: string
    ErrorResponse:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
    ValidateTokenRequest:
      required:
      - resetToken
      type: object
      properties:
        resetToken:
          type: string
          description: Reset password token
    MsspUserRequest:
      required:
      - firstName
      - lastName
      - username
      type: object
      properties:
        username:
          maxLength: 128
          minLength: 1
          type: string
          description: User name of the user.
        firstName:
          maxLength: 63
          minLength: 1
          type: string
          description: First name of the user.
        lastName:
          maxLength: 63
          minLength: 1
          type: string
          description: Last name of the user.
    MsspUserResponse:
      type: object
      properties:
        username:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        lastModifiedBy:
          type: string
        lastModifiedAt:
          type: integer
          format: int64
    Error:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        target:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    ChangePasswordRequest:
      required:
      - password
      type: object
      properties:
        password:
          type: string
          description: New Password
  securitySchemes:
    ServiceJwt:
      type: http
      description: Service to Service communication JWT. Such tokens are available to other microservices
      scheme: bearer
      bearerFormat: JWT
    UserJwt:
      type: http
      description: JWT for User to Service communication. Such tokens are available to MSSP account users
      scheme: bearer
      bearerFormat: JWT
x-tagGroups:
- tags:
  - User Authentication
  - MSSP Account Management
  - User Management
  - MSSP Managed Tenant Lifecycle Endpoints
  - Tenant Group Lifecycle Endpoints
  - Policy Group Lifecycle Endpoints
  - Policy Group to Tenant Group Management
  - MSSP Operations Retry
  - Mssp License Endpoints
  - Stack Details Endpoint
  - Proxy Endpoint Provider
  name: public
- tags:
  - Managed Tenant Management Service
  - MSSP Async Change Management
  - Licensing Job Schedule Management
  - OIDC Discovery Endpoint
  - MSSP Account Management Service Endpoint
  name: service
- tags:
  - Hard Delete Managed Tenant
  name: support