Tenable User API

A Tenable.ad user

OpenAPI Specification

tenable-user-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.0
  title: Downloads About User API
  description: 'The Downloads API enables customers to access and download installation and update files for available Tenable products. You can use the API endpoints to list product pages, list downloads available for a specific product, and to download a file. The endpoints can also be used to determine and download the latest version of a file to facilitate the automation of an installation.


    **Note:** The Tenable Downloads API uses a different server URL than the Tenable Vulnerability Management API:


    `https://www.tenable.com/downloads/api/v2/pages`.


    ### Authentication


    Like the Downloads website, certain files require authentication to download. When files have a `"requires_auth": true` attribute on the product list page, the Downloads API uses bearer token authentication and requires a valid token in the Authorization header to download the file:

    ```

    Authorization: Bearer AbCdEf123456

    ```


    To access or reset your authentication token, navigate to the [Authentication Token](https://www.tenable.com/downloads/api-docs) page.


    Examples of product downloads that **do not** require authentication include Nessus and Nessus Agents.'
servers:
- url: https://www.tenable.com/downloads/api/v2
security:
- Bearer: []
tags:
- name: User
  description: A Tenable.ad user
paths:
  /api/users:
    get:
      summary: Get all users
      description: 'Required license type: none'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                description: Validates the get /users response
                type: array
                items:
                  description: User
                  type: object
                  additionalProperties: false
                  required:
                  - id
                  - name
                  - email
                  - roles
                  - eulaVersion
                  - identifier
                  - provider
                  - lockedOut
                  properties:
                    id:
                      type: number
                    surname:
                      type: string
                      nullable: true
                    name:
                      type: string
                    email:
                      type: string
                    lockedOut:
                      type: boolean
                    department:
                      type: string
                      nullable: true
                    biography:
                      type: string
                      nullable: true
                    active:
                      type: boolean
                    roles:
                      type: array
                      items:
                        type: number
                    identifier:
                      type: string
                    provider:
                      description: User auth provider
                      type: string
                      enum:
                      - tenable
                      - ldap
                      - saml
                      - tone
                    eulaVersion:
                      type: number
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      security:
      - ApiKey: []
    post:
      summary: Create user instance.
      description: 'Required license type: none'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                description: Validates the get /users response
                type: array
                minItems: 1
                items:
                  description: User
                  type: object
                  additionalProperties: false
                  required:
                  - id
                  - name
                  - email
                  - roles
                  - eulaVersion
                  - identifier
                  - provider
                  - lockedOut
                  properties:
                    id:
                      type: number
                    surname:
                      type: string
                      nullable: true
                    name:
                      type: string
                    email:
                      type: string
                    lockedOut:
                      type: boolean
                    department:
                      type: string
                      nullable: true
                    biography:
                      type: string
                      nullable: true
                    active:
                      type: boolean
                    roles:
                      type: array
                      items:
                        type: number
                    identifier:
                      type: string
                    provider:
                      description: User auth provider
                      type: string
                      enum:
                      - tenable
                      - ldap
                      - saml
                      - tone
                    eulaVersion:
                      type: number
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      security:
      - ApiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Validates the POST /users request
              type: array
              minItems: 1
              items:
                type: object
                additionalProperties: false
                required:
                - name
                - password
                - email
                properties:
                  surname:
                    type: string
                  name:
                    type: string
                  email:
                    type: string
                  password:
                    description: User password (one lowercase, one uppercase, one number & one special character)
                    type: string
                    pattern: ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\W).{12,}$
                    minLength: 12
                    x-secret: true
                  department:
                    type: string
                  biography:
                    type: string
                  active:
                    type: boolean
                    default: false
  /api/users/whoami:
    get:
      summary: Get a user's information
      description: 'Required license type: none'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                description: User
                type: object
                additionalProperties: false
                required:
                - id
                - name
                - email
                - roles
                - eulaVersion
                - internal
                - provider
                - tenableCloudUserName
                properties:
                  id:
                    type: number
                  surname:
                    type: string
                    nullable: true
                  name:
                    type: string
                  email:
                    type: string
                  provider:
                    type: string
                  lockedOut:
                    type: boolean
                  department:
                    type: string
                    nullable: true
                  roles:
                    type: array
                    items:
                      description: Role
                      type: object
                      additionalProperties: false
                      required:
                      - id
                      - name
                      - description
                      - permissions
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        description:
                          type: string
                        permissions:
                          type: array
                          items:
                            description: Permission
                            type: object
                            additionalProperties: false
                            required:
                            - entityIds
                            - action
                            - entityName
                            properties:
                              entityName:
                                type: string
                              action:
                                type: string
                              entityIds:
                                type: array
                                items:
                                  type: string
                                nullable: true
                              dynamicId:
                                type: string
                                enum:
                                - self-user-id
                                - null
                                default: null
                                nullable: true
                  biography:
                    type: string
                    nullable: true
                  active:
                    type: boolean
                  identifier:
                    type: string
                  eulaVersion:
                    type: number
                  internal:
                    type: boolean
                  tenableCloudUserName:
                    type: string
                    nullable: true
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      security:
      - ApiKey: []
  /api/users/{id}:
    get:
      summary: Get user instance by id.
      description: 'Required license type: none'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                description: User
                type: object
                additionalProperties: false
                required:
                - id
                - name
                - email
                - roles
                - eulaVersion
                - identifier
                - provider
                - lockedOut
                properties:
                  id:
                    type: number
                  surname:
                    type: string
                    nullable: true
                  name:
                    type: string
                  email:
                    type: string
                  lockedOut:
                    type: boolean
                  department:
                    type: string
                    nullable: true
                  biography:
                    type: string
                    nullable: true
                  active:
                    type: boolean
                  roles:
                    type: array
                    items:
                      type: number
                  identifier:
                    type: string
                  provider:
                    description: User auth provider
                    type: string
                    enum:
                    - tenable
                    - ldap
                    - saml
                    - tone
                  eulaVersion:
                    type: number
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      - name: id
        in: path
        schema:
          type: string
          pattern: ^[0-9]+$
          x-patternError: should be a numerical string
        required: true
        deprecated: false
      security:
      - ApiKey: []
    patch:
      summary: Update user instance.
      description: 'Required license type: none'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                description: User
                type: object
                additionalProperties: false
                required:
                - id
                - name
                - email
                - roles
                - eulaVersion
                - identifier
                - provider
                - lockedOut
                properties:
                  id:
                    type: number
                  surname:
                    type: string
                    nullable: true
                  name:
                    type: string
                  email:
                    type: string
                  lockedOut:
                    type: boolean
                  department:
                    type: string
                    nullable: true
                  biography:
                    type: string
                    nullable: true
                  active:
                    type: boolean
                  roles:
                    type: array
                    items:
                      type: number
                  identifier:
                    type: string
                  provider:
                    description: User auth provider
                    type: string
                    enum:
                    - tenable
                    - ldap
                    - saml
                    - tone
                  eulaVersion:
                    type: number
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      - name: id
        in: path
        schema:
          type: string
          pattern: ^[0-9]+$
          x-patternError: should be a numerical string
        required: true
        deprecated: false
      security:
      - ApiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: User
              type: object
              additionalProperties: false
              properties:
                surname:
                  type: string
                name:
                  type: string
                password:
                  description: User password (one lowercase, one uppercase, one number & one special character)
                  type: string
                  pattern: ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\W).{12,}$
                  minLength: 12
                  x-secret: true
                email:
                  type: string
                department:
                  type: string
                biography:
                  type: string
                active:
                  type: boolean
                lockedOut:
                  type: boolean
                  enum:
                  - false
    delete:
      summary: Delete user instance.
      description: 'Required license type: none'
      responses:
        '204':
          description: ''
          content:
            application/json:
              schema:
                description: User
                additionalProperties: false
                nullable: true
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      - name: id
        in: path
        schema:
          type: string
          pattern: ^[0-9]+$
          x-patternError: should be a numerical string
        required: true
        deprecated: false
      security:
      - ApiKey: []
  /api/users/password:
    patch:
      summary: Update a user's password
      description: 'Required license type: none'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                description: Validates the get /users response
                nullable: true
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      security:
      - ApiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Validates the PUT /users/password request
              type: object
              additionalProperties: false
              required:
              - oldPassword
              - newPassword
              properties:
                oldPassword:
                  description: User password (one lowercase, one uppercase, one number & one special character)
                  type: string
                  pattern: ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\W).{12,}$
                  minLength: 12
                  x-secret: true
                newPassword:
                  description: User password (one lowercase, one uppercase, one number & one special character)
                  type: string
                  pattern: ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\W).{12,}$
                  minLength: 12
                  x-secret: true
  /api/login:
    post:
      summary: Logs in a user
      description: 'Required license type: none'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                - authToken
                - needPasswordReset
                properties:
                  authToken:
                    type: string
                    x-secret: true
                  needPasswordReset:
                    type: boolean
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: User
              type: object
              additionalProperties: false
              required:
              - password
              - email
              properties:
                password:
                  type: string
                  minLength: 1
                  x-secret: true
                email:
                  type: string
                  minLength: 1
  /api/logout:
    post:
      summary: Logs out a user
      description: 'Required license type: none'
      responses:
        '204':
          description: ''
          content:
            application/json:
              schema:
                enum:
                - 'null'
                - undefined
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      security:
      - ApiKey: []
  /api/users/{id}/roles:
    put:
      summary: Replace role list for a user
      description: 'Required license type: none'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                description: Validates the POST /users/:userId/roles response
                type: object
                additionalProperties: false
                required:
                - roles
                properties:
                  roles:
                    type: array
                    items:
                      minItems: 1
                      type: integer
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      tags:
      - User
      x-tenablead-required-product-license-type: []
      parameters:
      - name: x-api-key
        description: The user's API key
        in: header
        schema:
          type: string
          default: put-your-api-key-here
        required: true
        deprecated: false
      - name: id
        in: path
        schema:
          type: string
          pattern: ^[0-9]+$
          x-patternError: should be a numerical string
        required: true
        deprecated: false
      security:
      - ApiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: User roles
              type: object
              additionalProperties: false
              required:
              - roles
              properties:
                roles:
                  type: array
                  items:
                    minItems: 1
                    type: integer
components:
  securitySchemes:
    Bearer:
      type: apiKey
      in: header
      name: Authorization
      description: 'Example: Bearer {{token}}'
x-readme:
  proxy-enabled: false
  explorer-enabled: true
  samples-enabled: true
  samples-languages:
  - python
  - curl
  - node
  - powershell
  - ruby
  - javascript
  - objectivec
  - java
  - php
  - csharp
  - go
  - swift
  - kotlin