swagger: '2.0'
info:
    version: 0.9.3
    title: STARFACE Rest Api
    description: A Rest API for STARFACE
    termsOfService: https://www.starface.com/agb/
    license:
        name: STARFACE proprietary license
        url: http://www.starface.com
consumes:
- application/json
produces:
- application/json
schemes:
- https
- http
paths:
    /users/{userId}/phonenumberconfig/phonenumbers/{phoneNumberId}:
        get:
            operationId: getPhoneNumberAssignment
            summary: Fetches the PhoneNumberAssignment
            description: Fetches the PhoneNumberAssignment for the corresponding {phoneNumberId} of the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneNumberId
                in: path
                description: Id of the PhoneNumber thats is assigned to the User with the given {userId}
                required: true
                type: integer
            responses:
                200:
                    description: Ok. Returning the PhoneNumberAssignment for the corresponding {phoneNumberId} of the User with the given {userId}
                    schema:
                        $ref: '#/definitions/PhoneNumberAssignment'
                400:
                    description: Unexpected error
                    schema:
                        $ref: '#/definitions/PhoneNumberAssignment'
                500:
                    description: Unexpected error.
        delete:
            operationId: deletePhoneNumberAssignment
            summary: Deletes the PhoneNumberAssignment
            description: Deletes the PhoneNumberAssignment from the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneNumberId
                in: path
                description: Id of the PhoneNumber that gets unassigned from the User with the given {userId}
                required: true
                type: integer
            responses:
                204:
                    description: No Content. The PhoneNumber with the given {phoneNumberId} has successfully been unassigned from the User
                400:
                    description: Unexpected error
                500:
                    description: Unexpected error.
    /login:
        post:
            operationId: login
            summary: Login to the Rest-Service
            description: This endpoint is used to login to the STARFACE Rest-Service. By providing a template Login-Object from this endpoints GET-Request with the users secret. If the loginType is INTERNAL the secret can be calculated with <login>:SHA512(<loginId><nonce>SHA512(<password>)). For loginType ACTIVE_DIRECTORY the secret will be BASE64(loginId+nonce+password). For security reasons it's recommended to use HTTPS over HTTP for the login. The returned token must then be used in a HTTP header paramether named "authToken" in order to use this login.
            parameters:
            -   name: login
                in: body
                description: Login-Object with the users secret.
                required: true
                schema:
                    $ref: '#/definitions/Login'
            responses:
                200:
                    description: login was successful, returning the users authToken
                    schema:
                        $ref: '#/definitions/AuthToken'
                400:
                    description: invalid login
                    schema:
                        $ref: '#/definitions/AuthToken'
                500:
                    description: Unexpected error
                    schema:
                        $ref: '#/definitions/AuthToken'
        get:
            operationId: getLogin
            summary: Get a template Login-Object filled with loginType and nonce
            description: This endpoint returns a template of an Login-Object that proviedes the loginType required by the Server and a nonce. The template Login-Object can then be used to authorize a user by sending a POST-Request to this endpoint providing the users secret. See the description of this endpoind's POST-Request on how to derive the secret from a users loginId and password.
            responses:
                200:
                    description: A template Login-Object
                    schema:
                        $ref: '#/definitions/Login'
                500:
                    description: Unexpected error
                    schema:
                        $ref: '#/definitions/Login'
        delete:
            operationId: logout
            summary: invalidate the provided authToken.
            description: User for the given authToken will be logged out. The authToken will be invalidated
            parameters:
            -   name: authToken
                in: header
                description: the authToken to check
                required: true
                type: string
            responses:
                204:
                    description: If a valid authToken was provided it has just been invalidated
                500:
                    description: Unexpected error
    /phonenumbers:
        get:
            operationId: getPhoneNumbers
            summary: Retrive a list of all configured PhoneNumbers
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: type
                in: query
                description: filter for the type of the PhoneNumber
                required: false
                type: string
            -   name: assigned
                in: query
                description: filter for only assigned or unassigned PhoneNumbers
                required: false
                type: boolean
            responses:
                200:
                    description: A list of available PhoneNumbers
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/PhoneNumber'
                500:
                    description: Unexpected error.
    /users/{userId}/phoneconfig:
        get:
            operationId: getPhoneConfig
            summary: Fetch the PhoneConfig
            description: Fetch the PhoneConfig of the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            responses:
                200:
                    description: Ok. Returning the PhoneConfig of the User with the given {userId}
                    schema:
                        $ref: '#/definitions/PhoneConfig'
                500:
                    description: Unexpected error.
        put:
            operationId: putPhoneConfig
            summary: Update the PhoneConfig
            description: Update the PhoneConfig of the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            responses:
                204:
                    description: No Content. The PhoneConfig has been successfully been updated
                200:
                    description: Unexpected error
                500:
                    description: Unexpected error.
    /callservices/{serviceId}:
        get:
            operationId: getCallService
            summary: Fetch a CallService
            description: Fetch the CallService with the given {serviceId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: serviceId
                in: path
                description: Id of the CallService that will be fetched
                required: true
                type: integer
            responses:
                200:
                    description: OK. Returning the CallService object with the given {serviceId}
                    schema:
                        $ref: '#/definitions/CallService'
                404:
                    description: Not Found. A CallService with the given {serviceId} was not found
                    schema:
                        $ref: '#/definitions/CallService'
                500:
                    description: Unexpected error.
    /fmcPhones:
        post:
            operationId: postFmcPhone
            summary: Create a new FmcPhone
            description: Create a new FmcPhone
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fmcPhone
                in: body
                description: FmcPhone object to add
                required: true
                schema:
                    $ref: '#/definitions/FmcPhone'
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                201:
                    description: The FmcPhone has successfully been created
                500:
                    description: Unexpected error.
        get:
            operationId: getFmcPhones
            summary: Retrieve a list of FmcPhones
            description: Retrieve a list of STARFACE IFMC phones for the current user.
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            responses:
                200:
                    description: A list of available FmcPhones
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/FmcPhone'
                500:
                    description: Unexpected error.
    /contacts/tags/{tagId}:
        get:
            operationId: getTag
            summary: Fetch a tag
            description: Fetch the tag with the given {tagId} from the addressbook
            parameters:
            -   name: tagId
                in: path
                description: id of the Tag
                required: true
                type: string
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            responses:
                200:
                    description: OK
                    schema:
                        $ref: '#/definitions/Tag'
                500:
                    description: Unexpected error.
        delete:
            operationId: deleteTag
            summary: Delete a tag
            description: Delete the tag with the given {tagId} from the addressbook
            parameters:
            -   name: tagId
                in: path
                description: id of the Tag
                required: true
                type: string
            responses:
                204:
                    description: tag successfully deleted response
                500:
                    description: Unexpected error.
        put:
            operationId: putTag
            summary: Update a tag
            description: Updates the tag with the given {tagId} from the addressbook
            parameters:
            -   name: tagId
                in: path
                description: id of the Tag
                required: true
                type: string
            -   name: tag
                in: body
                description: updated tag
                required: true
                schema:
                    $ref: '#/definitions/Tag'
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            responses:
                204:
                    description: OK
                500:
                    description: Unexpected error.
    /users/{userId}/phoneconfig/phones:
        post:
            operationId: assignPhone
            summary: Assignes a phone to the User
            description: Assignes a phone to the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            responses:
                201:
                    description: Created. The phone has successfully been assigned to the User with the given {userId}
                200:
                    description: Unexpected error
                500:
                    description: Unexpected error.
        get:
            operationId: listAssignedPhones
            summary: Fetches a list of assigned phones
            description: Fetches a list of assigned phones for the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            responses:
                200:
                    description: Ok. Returning a list of assigned phones for the User with the given {userId}
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/PhoneAssignment'
                500:
                    description: Unexpected error.
    /users/{userId}/avatar:
        get:
            operationId: getAvatar
            summary: Fetch the Avatar
            description: Fetch the Avatar of the user with the given {userId}
            consumes:
            - application/json
            produces:
            - image/jpeg
            parameters:
            -   name: userId
                in: path
                description: Id of the User thats avatar will be fetched
                required: true
                type: integer
            responses:
                200:
                    description: OK. Returning the Avatar of the User with the given {userId}
                404:
                    description: Not Found. An User with the given {userId} was not found
                500:
                    description: Unexpected error.
        delete:
            operationId: deleteAvatar
            summary: Delete the Avatar
            description: Delete the Avatar of the user with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User thats avatar will be updated
                required: true
                type: integer
            responses:
                204:
                    description: No Content. The Avatar of the User with the given {userId} has successfully been deleted
                404:
                    description: Not Found. An User with the given {userId} was not found
                500:
                    description: Unexpected error.
        put:
            operationId: setAvatar
            summary: Set the Avatar
            description: Set the Avatar of the user with the given {userId}
            consumes:
            - multipart/form-data
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User thats avatar will be updated
                required: true
                type: integer
            responses:
                204:
                    description: No Content. The Avatar of the User with the given {userId} has successfully been set
                404:
                    description: Not Found. An User with the given {userId} was not found
                500:
                    description: Unexpected error.
    /phonenumbers/{phoneNumberId}:
        get:
            operationId: getPhoneNumber
            summary: Fetch a PhoneNumber
            description: Fetch the PhoneNumber with the given {phoneNumberId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: phoneNumberId
                in: path
                description: Id of the PhoneNumber that will be fetched
                required: true
                type: integer
            responses:
                200:
                    description: OK. Returning the PhoneNumber object with the given {phoneNumberId}
                    schema:
                        $ref: '#/definitions/PhoneNumber'
                404:
                    description: Not Found. A PhoneNumber with the given {phoneNumberId} was not found
                    schema:
                        $ref: '#/definitions/PhoneNumber'
                500:
                    description: Unexpected error.
    /fmcPhones/{fmcId}:
        get:
            operationId: getFmcPhone
            summary: Fetch a FmcPhone
            description: Fetch the FmcPhone with the given {fmcId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fmcId
                in: path
                description: Id of the FmcPhone that will be fetched
                required: true
                type: string
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: OK. Returning the FmcPhone object with the given {fmcId}
                    schema:
                        $ref: '#/definitions/FmcPhone'
                404:
                    description: Not Found. A FmcPhone with the given {fmcId} was not found
                    schema:
                        $ref: '#/definitions/FmcPhone'
                500:
                    description: Unexpected error.
        delete:
            operationId: deleteFmcPhone
            summary: Delete a FmcPhone
            description: Delete the FmcPhone with the given {fmcId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fmcId
                in: path
                description: Id of the FmcPhone that will be deleted
                required: true
                type: string
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                204:
                    description: OK. The FmcPhone with the given {fmcId} has successfully been deleted
                404:
                    description: Not Found. A FmcPhone with the given {fmcId} was not found
                500:
                    description: Unexpected error.
        put:
            operationId: putFmcPhone
            summary: Update a FmcPhone
            description: Update the FmcPhone with the given {fmcId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fmcId
                in: path
                description: Id of the FmcPhone that will be updated
                required: true
                type: string
            -   name: fmcPhone
                in: body
                description: FmcPhone-Object with updated values that should be applied
                required: true
                schema:
                    $ref: '#/definitions/FmcPhone'
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                204:
                    description: OK. The FmcPhone with the given {fmcId} has successfully been updated
                404:
                    description: Not Found. A FmcPhone with the given {fmcId} was not found
                    schema:
                        $ref: '#/definitions/FmcPhone'
                500:
                    description: Unexpected error.
    /contacts/tags:
        post:
            operationId: postTag
            summary: Create a new tag
            description: Create a new tag
            parameters:
            -   name: tag
                in: body
                description: tag to add to the system
                required: true
                schema:
                    $ref: '#/definitions/Tag'
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            responses:
                201:
                    description: the created tag
                    schema:
                        $ref: '#/definitions/Tag'
                500:
                    description: Unexpected error.
        get:
            operationId: getTagList
            summary: Retrieve a list of tags
            description: Retrieve a list of tags this user can access.
            parameters:
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            -   name: page
                in: query
                description: The page number for this request

                required: false
                type: integer
            -   name: pagesize
                in: query
                description: The page size to use. Default is 20

                required: false
                type: integer
            -   name: sort
                in: query
                description: The fieldname to sort for

                required: false
                type: string
            -   name: sortdirection
                in: query
                description: The fieldname to order for

                required: false
                type: string
            responses:
                200:
                    description: OK
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/Tag'
                500:
                    description: Unexpected error.
    /callservices:
        get:
            operationId: getCalServices
            summary: Retrive a list of all available call services
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: type
                in: query
                description: filter for a call service type. If none or an invalid type is provided the type filter will default to FOR_USER_ACCOUNTS
                required: false
                type: string
            responses:
                200:
                    description: A list of available CallServices
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/CallService'
                500:
                    description: Unexpected error.
    /functionkeysets/{fkSetId}/phone:
        put:
            operationId: putFunctionKeySetOnPhone
            description: Provisions a phone with the given function key set
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: phone
                in: body
                description: The phone
                required: true
                schema:
                        type: string
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: Provisions a phone with the given function key set
                500:
                    description: Unexpected error.
    /users/me:
        get:
            operationId: usersMeGet
            summary: Get own user
            description: endpoint alias for /users/{userId} of the user that is corrently logged in
            consumes:
            - application/json
            produces:
            - application/json
            responses:
                200:
                    description: OK. Returning the User object of the user that is corrently logged in
                    schema:
                        $ref: '#/definitions/User'
                500:
                    description: Unexpected error.
    /redirects:
        get:
            operationId: getRedirects
            summary: Retrieve a list of redirects
            description: Retrieve a list of redirects for the current user.
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            responses:
                200:
                    description: A list of available redirects
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/Redirection'
                500:
                    description: Unexpected error.
    /users/{userId}:
        get:
            operationId: getUser
            summary: Fetch a user
            description: Fetch the STARFACE user with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User that will be fetched
                required: true
                type: integer
            responses:
                200:
                    description: OK. Returning the User object with the given {userId}
                    schema:
                        $ref: '#/definitions/User'
                404:
                    description: Not Found. A User with the given {userId} was not found
                    schema:
                        $ref: '#/definitions/User'
                500:
                    description: Unexpected error.
        delete:
            operationId: deleteUser
            summary: Delete a user
            description: Delete the STARFACE user with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User that will be deleted
                required: true
                type: integer
            responses:
                204:
                    description: No Content. The User with the given {userId} has successfully been deleted
                404:
                    description: Not Found. An User with the given {userId} was not found
                500:
                    description: Unexpected error.
        put:
            operationId: putUser
            summary: Update a user
            description: Update the STARFACE user with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User that will be updated
                required: true
                type: integer
            -   name: user
                in: body
                description: User-Object with updated values that should be applied
                required: true
                schema:
                    $ref: '#/definitions/User'
            responses:
                204:
                    description: No Content. The User with the given {userId} has successfully been updated
                404:
                    description: Not Found. An User with the given {userId} was not found
                    schema:
                        $ref: '#/definitions/User'
                200:
                    description: Unexpected error
                    schema:
                        $ref: '#/definitions/User'
                500:
                    description: Unexpected error.
    /users/{userId}/phoneconfig/phones/{phoneId}:
        get:
            operationId: getPhoneAssignment
            summary: Fetches the PhoneAssignment
            description: Fetches the PhoneAssignment for the corresponding {phoneId} of the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneId
                in: path
                description: Id of a phone
                required: true
                type: integer
            responses:
                200:
                    description: Ok. Returning the PhoneAssignment for the corresponding {phoneId} of the User with the given {userId}
                500:
                    description: Unexpected error.
        delete:
            operationId: deletePhoneAssignment
            summary: Deletes the PhoneAssignment
            description: Deletes the PhoneAssignment from the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneId
                in: path
                description: Id of a phone
                required: true
                type: integer
            responses:
                204:
                    description: No Content. The phone with the given {phoneId} has successfully been unassigned from the User
                200:
                    description: Unexpected error
                500:
                    description: Unexpected error.
    /functionkeysets/{fkSetId}/phones:
        get:
            operationId: getPhonesForFunctionKeySet
            description: Fetch the phones for functionkeyset with the given {fkSetId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: Returning the FunctionKey object with the given {keyId}
                    schema:
                        type: array
                        items:
                            type: string
                500:
                    description: Unexpected error.
    /users:
        post:
            operationId: postUser
            summary: Create a new user
            description: Create a new STARFACE user
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: user
                in: body
                description: User object to add
                required: true
                schema:
                    $ref: '#/definitions/User'
            responses:
                201:
                    description: Created.  User has successfully been created
                200:
                    description: Unexpected error
                500:
                    description: Unexpected error.
        get:
            operationId: getUsers
            summary: Retrieve a list of users
            description: Retrieve a list of STARFACE users the current user can access.
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: searchTerm
                in: query
                description: The searchTerm to query users.
                required: false
                type: string
            responses:
                200:
                    description: OK. A list of accessable User
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/User'
                500:
                    description: Unexpected error.
    /functionkeysets/{fkSetId}/:
        post:
            operationId: createFunctionKey
            description: Creates a new FunctionKey and appends it to the end of the FunctionKeySet if no position is provided. Otherwise the Functionkey will shift other keys aside.
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: functionKey
                in: body
                description: The new functionKey to create
                required: true
                schema:
                    $ref: '#/definitions/FunctionKey'
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                201:
                    description: The FunctionKey has successfully been created
                    schema:
                        $ref: '#/definitions/FunctionKey'
                500:
                    description: Unexpected error.
        get:
            operationId: getFunctionKeys
            description: Retrieve the list of FunctionKeys contained in the given FunctionKeySet.
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: The list of contained FunctionKeys
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/FunctionKey'
                500:
                    description: Unexpected error.
        put:
            operationId: updateFunctionKeySet
            description: Update the FunctionKeySet with the given {fkSetId}. This operation can be used to reorder the FunctionKeys contained in this set. NOTE keys on phones must be refreshed (GET /{fkSetId}/phones and PUT /{fkSetId}/phone).
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: functionKeys
                in: body
                description: The updated FunctionKeySet to reorder FunctionKeys
                required: true
                schema:
                    type: array
                    items:
                                        $ref: '#/definitions/FunctionKey'
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                204:
                    description: The FunctionKeySet with the given {fkSetId} has successfully been updated
                500:
                    description: Unexpected error.
    /users/{userId}/phonenumberconfig:
        get:
            operationId: getPhoneNumberConfig
            summary: Fetch the PhoneNumberConfig
            description: Fetch the PhoneNumberConfig of the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            responses:
                200:
                    description: Ok. Returning the PhoneNumberConfig of the User with the given {userId}
                    schema:
                        $ref: '#/definitions/PhoneNumberConfig'
                500:
                    description: Unexpected error
                    schema:
                        $ref: '#/definitions/PhoneNumberConfig'
        put:
            operationId: putPhoneNumberConfig
            summary: Update the PhoneNumberConfig
            description: Update the PhoneNumberConfig of the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User thats PhoneNumberConfig will be updated
                required: true
                type: integer
            -   name: phoneNumberConfig
                in: body
                description: PhoneNumberConfig-Object with updated values that should be applied
                required: true
                schema:
                    $ref: '#/definitions/PhoneNumberConfig'
            responses:
                200:
                    description: Ok. Returning the PhoneNumberConfig of the User with the given {userId}
                    schema:
                        $ref: '#/definitions/PhoneNumberConfig'
                500:
                    description: Unexpected error
                    schema:
                        type: string
    /contacts/scheme:
        get:
            operationId: getScheme
            summary: Get the Contact-Scheme
            description: Get the Contact-Scheme
            parameters:
            -   name: lang
                in: query
                description: Language identifiers as specified by RFC 3066 for i18nDisplayName
                required: false
                type: string
            responses:
                200:
                    description: OK
                    schema:
                        $ref: '#/definitions/ContactsScheme'
                500:
                    description: Unexpected error.
    /contacts/{contactId}:
        get:
            operationId: getContact
            summary: Fetch a contact
            description: Fetch the contact with the given {contactId} from the addressbook
            parameters:
            -   name: contactId
                in: path
                description: id of the contact
                required: true
                type: string
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            responses:
                200:
                    description: OK
                    schema:
                        $ref: '#/definitions/Contact'
                500:
                    description: Unexpected error.
        delete:
            operationId: deleteContact
            summary: Delete a contact
            description: Delete the contact with the given {contactId} from the addressbook
            parameters:
            -   name: contactId
                in: path
                description: id of the contact
                required: true
                type: string
            responses:
                204:
                    description: contact successfully deleted response
                500:
                    description: Unexpected error.
        put:
            operationId: putContact
            summary: Update a contact
            description: Updates the contact with the given {contactId} from the provided payload
            parameters:
            -   name: contactId
                in: path
                description: id of the contact
                required: true
                type: string
            -   name: contact
                in: body
                description: updated contact
                required: true
                schema:
                    $ref: '#/definitions/Contact'
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            responses:
                204:
                    description: OK
                500:
                    description: Unexpected error.
    /users/{userId}/phoneconfig/phones/{phoneId}/numbers:
        get:
            operationId: getNumbersForAssignedPhone
            summary: Fetches a list of NumberForPhoneAssignment
            description: Fetches a list of NumberForPhoneAssignment of the User with the given {userId} and the Phone with the given {phoneId}.
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneId
                in: path
                description: Id of a phone
                required: true
                type: integer
            responses:
                200:
                    description: Ok. Returning a list of assigned numbers to the assigned phone with the given {phoneId} for the User with the given {userId}
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/NumberForPhoneAssignment'
                500:
                    description: Unexpected error.
        put:
            operationId: updateNumbersForAssignedPhones
            summary: Updates the list of NumberForPhoneAssignment
            description: Updates the list of NumberForPhoneAssignment of the User with the given {userId} and the Phone with the given {phoneId}. Only the active-flag can be changed. Elements in the list cannot be added or removed.
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneId
                in: path
                description: Id of a phone
                required: true
                type: integer
            responses:
                204:
                    description: No Content. The list of assigned numbers to the assigned phone with the given {phoneId} has been updated successfully.
                200:
                    description: Unexpected error
                500:
                    description: Unexpected error.
    /redirects/{redirectId}:
        get:
            operationId: redirectsRedirectIdGet
            summary: Fetch a Redirection
            description: Fetch the Redirection with the given {redirectId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: redirectId
                in: path
                description: Id of the Redirection that will be fetched
                required: true
                type: string
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: OK. Returning the Redirection object with the given {redirectId}
                    schema:
                        $ref: '#/definitions/Redirection'
                404:
                    description: Not Found. A Redirection with the given {redirectId} was not found
                    schema:
                        $ref: '#/definitions/Redirection'
                500:
                    description: Unexpected error.
        put:
            operationId: redirectsRedirectIdPut
            summary: Update a Redirection
            description: Update the Redirection with the given {redirectId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: redirectId
                in: path
                description: Id of the Redirection that will be updated
                required: true
                type: string
            -   name: redirection
                in: body
                description: Redirection-Object with updated values that should be applied
                required: true
                schema:
                    $ref: '#/definitions/Redirection'
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                204:
                    description: OK. The Redirection with the given {redirectId} has successfully been updated
                404:
                    description: Not Found. A Redirection with the given {redirectId} was not found
                    schema:
                        $ref: '#/definitions/Redirection'
                200:
                    description: Unexpected error
                    schema:
                        $ref: '#/definitions/Redirection'
                500:
                    description: Unexpected error.
    /functionkeysets/{fkSetId}/{keyId}:
        get:
            operationId: getFunctionKey
            description: Fetch the FunctionKey with the given {keyId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: keyId
                in: path
                description: The Id of the FunctionKey
                required: true
                type: string
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: Returning the FunctionKey object with the given {keyId}
                    schema:
                        $ref: '#/definitions/FunctionKey'
                500:
                    description: Unexpected error.
        delete:
            operationId: deleteFunctionKey
            description: Delete the FunctionKey with the given {keyId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: keyId
                in: path
                description: The Id of the FunctionKey
                required: true
                type: string
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                204:
                    description: The FunctionKey with the given {keyId} has successfully been deleted
                500:
                    description: Unexpected error.
        put:
            operationId: updateFunctionKey
            description: Update the FunctionKey with the given {keyId}. NOTE keys on phones must be refreshed (GET /{fkSetId}/phones and PUT /{fkSetId}/phone).
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: keyId
                in: path
                description: The Id of the FunctionKey
                required: true
                type: string
            -   name: functionKey
                in: body
                description: The new functionKey to create
                required: true
                schema:
                    $ref: '#/definitions/FunctionKey'
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: The FunctionKey with the given {keyId} has successfully been updated
                500:
                    description: Unexpected error.
    /functionkeysets:
        get:
            operationId: getFunctionKeySets
            summary: Retrieve a list of FunctionKeySets
            description: Retrieve a list of FunctionKeySets for the current user.
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: A list of available FunctionKeySets
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/FunctionKeySet'
                500:
                    description: Unexpected error.
    /accounts:
        get:
            operationId: getAccountsList
            summary: Retrieve a list of accounts
            description: Retrieve a list of accounts.
            responses:
                200:
                    description: OK
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/Account'
                500:
                    description: Unexpected error.
    /users/{userId}/phonenumberconfig/phonenumbers/delete:
        post:
            operationId: deletePhoneNumberAssignments
            summary: Deletes the PhoneNumberAssignments
            description: Deletes the PhoneNumberAssignments from the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneNumberAssignments
                in: body
                description: A List of PhoneNumberAssignment-Objects
                required: true
                schema:
                    type: array
                    items:
                                        $ref: '#/definitions/PhoneNumberAssignment'
            responses:
                204:
                    description: No Content. The PhoneNumbers have successfully been unassigned from the User
                400:
                    description: Unexpected error
                500:
                    description: Unexpected error.
    /functionkeysets/{fkSetId}/edit/{keyId}:
        get:
            operationId: getEditFunctionKey
            description: Returns edit informations for the given key {keyId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: fkSetId
                in: path
                description: The Id of the FunctionKeySet
                required: true
                type: string
            -   name: keyId
                in: path
                description: The Id of the FunctionKey
                required: true
                type: string
            -   name: actOnBehalfOf
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.
                required: false
                type: string
            responses:
                200:
                    description: Returning the EditFunctionKey object with the given {keyId}
                    schema:
                        $ref: '#/definitions/EditFunctionKey'
                500:
                    description: Unexpected error.
    /users/{userId}/phonenumberconfig/phonenumbers/:
        post:
            operationId: assignPhoneNumber
            summary: Assignes phone numbers to the User
            description: Assignes phone numbers to the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneNumberAssignments
                in: body
                description: A List of PhoneNumberAssignment-Objects
                required: true
                schema:
                    type: array
                    items:
                                        $ref: '#/definitions/PhoneNumberAssignment'
            responses:
                200:
                    description: OK. The phone numbers have successfully been assigned to the User with the given {userId}
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/PhoneNumberAssignment'
                400:
                    description: Request error
                    schema:
                        type: string
                500:
                    description: Server error
                    schema:
                        type: string
        get:
            operationId: listPhoneNumberAssignment
            summary: Fetches a list of assigned phone numbers
            description: Fetches a list of assigned phone numbers for the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            responses:
                200:
                    description: Ok. Returning a list of assigned phone numbers for the User with the given {userId}
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/PhoneNumberAssignment'
                400:
                    description: Unexpected error
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/PhoneNumberAssignment'
                500:
                    description: Unexpected error.
    /users/{userId}/phonenumberconfig/phonenumbers:
        put:
            operationId: updatePhoneNumberAssignments
            summary: Update PhoneNumberAssignments of the User
            description: Update the PhoneNumberAssignment with the given {phoneNumberId} of the User with the given {userId}
            consumes:
            - application/json
            produces:
            - application/json
            parameters:
            -   name: userId
                in: path
                description: Id of the User
                required: true
                type: integer
            -   name: phoneNumberAssignments
                in: body
                description: A List of PhoneNumberAssignment-Objects
                required: true
                schema:
                    type: array
                    items:
                                        $ref: '#/definitions/PhoneNumberAssignment'
            responses:
                200:
                    description: Ok. Returning a list of assigned phone numbers for the User with the given {userId}
                    schema:
                        type: array
                        items:
                            $ref: '#/definitions/PhoneNumberAssignment'
                500:
                    description: Unexpected error
                    schema:
                        type: string
    /contacts:
        post:
            operationId: postContact
            summary: Create a new contact
            description: Create a new contact
            parameters:
            -   name: contact
                in: body
                description: user to add to the system
                required: true
                schema:
                    $ref: '#/definitions/Contact'
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            responses:
                201:
                    description: the created contact
                    schema:
                        $ref: '#/definitions/Contact'
                500:
                    description: Unexpected error.
        get:
            operationId: getContactList
            summary: Retrieve a list of contacts
            description: Retrieve a list of contacts this user can access.
            parameters:
            -   name: userId
                in: query
                description: Perform an operation on behalf of another user. This requires administrative privileges.

                required: false
                type: string
            -   name: tags
                in: query
                description: comma seperated list of tags to filter for
                required: false
                type: array
                items:
                    type: string
            -   name: searchTerms
                in: query
                description: the string to search for ... to be defined
                required: false
                type: string
            -   name: page
                in: query
                description: The page number for this request

                required: false
                type: integer
            -   name: pagesize
                in: query
                description: The page size to use. Default is 20

                required: false
                type: integer
            -   name: sort
                in: query
                description: The fieldname to sort for

                required: false
                type: string
            -   name: sortdirection
                in: query
                description: The fieldname to order for

                required: false
                type: string
            responses:
                200:
                    description: OK
                    schema:
                        $ref: '#/definitions/ContactList'
                500:
                    description: Unexpected error.
definitions:
    TimeFrame:
        description: A TimeFrame defines a TimeRange in 24 hour format between 00:00 and 24:00 for each day of week
        properties:
            timeBegin:
                description: the time defining the beginning of the TimeRange (inclusive)
                type: string
            timeEnd:
                description: the time defining the end of the TimeRange (inclusive)
                type: string
            monday:
                type: boolean
            tuesday:
                type: boolean
            wednesday:
                type: boolean
            thursday:
                type: boolean
            friday:
                type: boolean
            saturday:
                type: boolean
            sunday:
                type: boolean
    Account:
        description: A basic account.
        properties:
            accountId:
                description: the accountId of the account
                type: integer
            firstname:
                description: the firstname of the account
                type: string
            lastname:
                description: the lastname of the account
                type: string
    PhoneNumberConfig:
        description: Representation of phone number config options for a User
        properties:
            getSignalingNumberId:
                description: the Id of the PhoneNumber that is used as the signaling phone number
                type: integer
            getPrimaryInternalNumberId:
                description: the Id of the PhoneNumber that is used as the primary internal phone number
                type: integer
            getPrimaryExternalNumberId:
                description: the Id of the PhoneNumber that is used as the primary external phone number
                type: integer
    User:
        description: A representation of a STARFACE user
        properties:
            password:
                description: defines a new password when a user is created or updated. This field will be empty when a user is fetched.
                type: string
            email:
                description: the email address of the user
                type: string
            firstName:
                description: the name of the user
                type: string
            faxCallerId:
                description: the callerId for faxes send by this user
                type: string
            faxHeader:
                description: the header for faxes send by this user
                type: string
            missedCallReport:
                description: whether the user recieves a report on missed calls
                type: boolean
            namespace:
                description: the namespace defining the location of an user account
                type: string
            login:
                description: the login number for this user. The login number will be used as Jabber Id
                type: string
            personId:
                description: the Id of the corresponding person contact object
                type: string
            faxEmailJournal:
                description: whether the user recieves a email journal of send faxes
                type: boolean
            faxCoverPage:
                description: whether to send a cover page for faxes send by this user
                type: boolean
            familyName:
                description: the family name of the user
                type: string
            language:
                description: the language of a user
                type: string
            id:
                description: the Id of the user
                type: integer
    PhoneConfig:
        description: Representation of phone config options for a User
        properties:
            getPrimaryPhoneId:
                description: the Id of the primary Phone of the User
                type: integer
            getDisplayNumberId:
                description: the Id of the PhoneNumber that is displayed when the User makes a call
                type: integer
            getDoNotDisturb:
                description: the flag that indicates whether the user is DND and thus won't recieve calls
                type: boolean
            getCallWaiting:
                description: the flag that indicates whether a call gets rejected if the User is currently busy
                type: boolean
    Attribute:
        description: Schlüssel für String internationalisierung. Bei USER_DEFINED wird der der Attributname gezeigt
        properties:
            displayKey:
                type: string
                enum:
                - NAME
                - SURNAME
                - SALUTATION
                - TITLE
                - EMAIL
                - COUNTRY
                - CITY
                - STATE
                - POSTAL_CODE
                - STREET
                - URL
                - COMPANY
                - MESSENGER
                - BIRTHDAY
                - NOTE
                - JOB_TITLE
                - PHONE_NUMBER
                - PRIVATE_PHONE_NUMBER
                - OFFICE_PHONE_NUMBER
                - MOBILE_PHONE_NUMBER
                - FAX_NUMBER
                - DESCRIPTION
                - USER_DEFINED
            additionalValues:
                description: Additional values for this Attribute, for example SHORT_DIAL

                type: object
                additionalProperties:
                    type: string
            i18nDisplayName:
                description: Vom Server aufgelöster displayKey in jeweiliger Benutzersprache

                type: string
            name:
                type: string
            value:
                type: string
    RedirectMailboxDestination:
        description: This RedirectDestination will redirect to the mailbox with the given mailboxId
        properties:
            mailboxId:
                type: string
            redirectDestinationType:
                description: The type of the RedirectDestination determining the concrete RedirectDestination implementation
                type: string
                enum:
                - MAILBOX
                - PHONENUMBER
    EditFunctionKeyPhoneContact:
        description: A representation of a EditFunctionKeyPhoneContact Form
        properties:
            selectedFolder:
                description: the selectedFolder of the FunctionKey
                type: string
            addressbookRequest:
                description: the addressbookRequest of the FunctionKey
                type: string
                enum:
                - CONTACTLIST
                - CONTACTSEARCH
            folders:
                description: the folders of the FunctionKey
                type: array
                items:
                    type: string
            name:
                description: the name of the FunctionKey
                type: string
    EditFunctionKeySeperator:
        description: A representation of a EditFunctionKeySeperator Form
        properties:
            name:
                description: the name of the FunctionKey
                type: string
    EditFunctionKeyQuickDial:
        description: A representation of a EditFunctionKeyQuickDial Form
        properties:
            name:
                description: the name of the FunctionKey
                type: string
            number:
                description: the user telephonenumber of the FunctionKey
                type: string
    RedirectDestination:
        description: Abstract base for mailbox and phonenumber destination
        properties:
            redirectDestinationType:
                description: The type of the RedirectDestination determining the concrete RedirectDestination implementation
                type: string
                enum:
                - MAILBOX
                - PHONENUMBER
    FmcPhone:
        description: A representation of an FmcPhone
        properties:
            active:
                description: whether this FmcPhone is activated or deactivated
                type: boolean
            telephoneId:
                description: the Id of the corresponding telephone
                type: string
            delay:
                description: defines the delay before the FmcPhone is called
                type: integer
            confirm:
                description: whether the user must confirm a call with the FmcPhone
                type: boolean
            fmcSchedule:
                description: List of TimeFrames that define when this FmcPhone is called
                type: array
                items:
                    $ref: '#/definitions/TimeFrame'
            id:
                description: the Id of the FmcPhone
                type: string
            number:
                description: the number that will be called
                type: string
    Redirection:
        description: A representation of a Redirection
        properties:
            groupNumber:
                description: True if the phoneNumber of this Redirection is assigned to a group, false otherwise
                type: boolean
            phoneNumber:
                description: The phoneNumber that will be handled by this Redirection
                type: string
            redirectTrigger:
                $ref: '#/definitions/RedirectTrigger'
            redirectDestination:
                $ref: '#/definitions/RedirectDestination'
            lastMailboxDestination:
                $ref: '#/definitions/RedirectMailboxDestination'
            lastPhoneNumberDestination:
                $ref: '#/definitions/RedirectPhoneNumberDestination'
            enabled:
                description: Whether this Redirection is enabled or disabled
                type: boolean
            id:
                description: The Id of the Redirection
                type: string
    EditFunctionKeyDnd:
        description: A representation of a EditFunctionKeyDnd Form
        properties:
            name:
                description: the name of the FunctionKey
                type: string
    EditFunctionKeyGroupLogin:
        description: A representation of a EditFunctionKeyGroupLogin Form
        properties:
            editFunctionKeyGlGroupSettings:
                description: the EditFunctionKeyGlGroupSettings of the FunctionKey
                type: array
                items:
                    $ref: '#/definitions/EditFunctionKeyGroupLoginGroupSettings'
            name:
                description: the name of the FunctionKey
                type: string
    EditFunctionKeyForwardNumberUnconditionalNumberSetting:
        description: A representation of a EditFunctionKeyForwardNumberUnconditionalNumberSetting Form
        properties:
            group:
                description: is number setting a group
                type: boolean
            activated:
                description: is number setting activated
                type: boolean
            numberId:
                description: the numberId of the setting
                type: integer
            number:
                description: the number of the setting
                type: string
    EditFunctionKeyGroupLoginGroupSettings:
        description: A representation of a EditFunctionKeyGroupLoginGroupSettings Form
        properties:
            groupAccountId:
                description: the groupAccountId
                type: integer
            activated:
                description: is number setting activated
                type: boolean
            groupname:
                description: the groupname
                type: string
    CallService:
        description: Representation of a call service
        properties:
            getServiceId:
                description: the Id of the CallService
                type: integer
            getServiceName:
                description: the name of the CallService
                type: string
            getLabel:
                description: the label of the CallService that is used in the UI
                type: string
    EditFunctionKeyCcbs:
        description: A representation of a EditFunctionKeyCcbs Form
        properties:
            name:
                description: the name of the FunctionKey
                type: string
    ContactSummary:
        description: Kurzusammenfassung der Werte eines Contacts ohne Schema-Information
        properties:
            additionalValues:
                description: Additional values for the ContactSummary, for example INTERNALPHONE, EXTERNALPHONE, AVATAR
                type: object
                additionalProperties:
                    type: string
            summaryValues:
                type: array
                items:
                    type: string
            phoneNumberValues:
                type: array
                items:
                    type: string
            id:
                type: string
    FunctionKey:
        description: A representation of a FunctionKey
        properties:
            accountId:
                description: the accountId of the FunctionKey
                type: string
            forwardType:
                description: Type of forward
                type: string
                enum:
                - ALWAYS
                - BUSY
                - TIMEOUT
            dtmf:
                description: Dtmf to send
                type: string
            functionKeyType:
                description: The type of the FunctionKey determining the concrete FunctionKey implementation
                type: string
                enum:
                - SIGNALNUMBER
                - SEPARATOR
                - QUICKDIAL
                - PHONEGENERICURL
                - PHONEDTMF
                - ADDRESSBOOK
                - PHONECALLLIST
                - PARKANDORBIT
                - MODULEACTIVATION
                - GROUPLOGIN
                - FORWARDNUMBER
                - FORWARD
                - DONOTDISTURB
                - COMPLETIONOFCALLSTOBUSYSUBSCRIBER
                - BUSYLAMPFIELD
            displayNumberId:
                description: Displaynumberid to signal
                type: integer
            addressBookFolderName:
                description: AddressBookFolderName
                type: string
            genericURL:
                description: generic URL to send
                type: string
            addressbookRequest:
                description: Type of AddressbookRequest
                type: string
                enum:
                - CONTACTLIST
                - CONTACTSEARCH
            activateModuleIds:
                description: Modules to activate
                type: array
                items:
                    type: string
            poNumber:
                description: Number of park and orbit position
                type: string
            groupIds:
                description: Groupids to activate or deactivate
                type: array
                items:
                    type: integer
            redirectNumberIds:
                description: NumberIds to redirect
                type: array
                items:
                    type: integer
            directCallTargetnumber:
                description: Number to call
                type: string
            blfAccountId:
                description: AccountId of busy lamp field
                type: integer
            callListRequest:
                description: Type of requested list
                type: string
                enum:
                - INCOMING
                - OUTGOING
                - MISSED
            position:
                description: the position of the FunctionKey wthin its FunctionKeySet
                type: integer
            name:
                description: the display name of the FunctionKey
                type: string
            id:
                description: the Id of the FunctionKey
                type: string
    FunctionKeySet:
        description: An ordered set of FunctionKeys that can be used for changing the order of FunctionKeys
        properties:
            keyOrder:
                description: List of Ids of contained FunctionKeys. The ordering of this List defines the positioning of the FunctionKeys.
                type: array
                items:
                    type: string
            name:
                description: the name of the FunctionKeySet
                type: string
            id:
                description: the Id of the FunctionKeySet
                type: string
    EditFunctionKeyParkAndOrbit:
        description: A representation of a EditFunctionKeyParkAndOrbit Form
        properties:
            parkAndOrbitNumber:
                description: the parkAndOrbitNumber of the FunctionKey
                type: string
            name:
                description: the name of the FunctionKey
                type: string
    EditFunctionKeyCallList:
        description: A representation of a EditFunctionKeyCallList Form
        properties:
            callListRequest:
                description: the call list type of the FunctionKey
                type: string
                enum:
                - INCOMING
                - OUTGOING
                - MISSED
            name:
                description: the name of the FunctionKey
                type: string
    EditFunctionKeyGenericUrl:
        description: A representation of a EditFunctionKeyGenericUrl Form
        properties:
            genericURL:
                description: the url of the FunctionKey
                type: string
            name:
                description: the name of the FunctionKey
                type: string
    Login:
        properties:
            secret:
                type: string
            nonce:
                type: string
            loginType:
                type: string
                enum:
                - Internal
                - ActiveDirectory
    EditFunctionKeyDtmf:
        description: A representation of a EditFunctionKeyDtmf Form
        properties:
            dtmf:
                description: the dtmf of the FunctionKey
                type: string
            name:
                description: the name of the FunctionKey
                type: string
    ContactList:
        description: Bandbreitesparendes Rückgabeobjekt für Liste von Contacts. Einmal Schema für den Summary-Block sowie den Phonenumbers-Block. Die ContactSummary-Daten können mit diesem Schema interpretiert werden.
        properties:
            metadata:
                $ref: '#/definitions/RequestMetadata'
            summaryBlockSchema:
                $ref: '#/definitions/Block'
            phoneNumbersBlockSchema:
                $ref: '#/definitions/Block'
            contacts:
                type: array
                items:
                    $ref: '#/definitions/ContactSummary'
    RedirectTrigger:
        description: Abstract base for always, busy and timeout trigger
        properties:
            redirectTriggerType:
                description: The type of the RedirectTrigger determining the concrete RedirectTrigger implementation
                type: string
                enum:
                - ALWAYS
                - BUSY
                - TIMEOUT
    EditFunctionKeyModuleActivationModuleSettings:
        description: A representation of a EditFunctionKeyModuleActivationModuleSettings Form
        properties:
            moduleId:
                description: the moduleId of the FunctionKey
                type: string
            activated:
                description: is setting activated
                type: boolean
            name:
                description: the name of the FunctionKey
                type: string
    RedirectPhoneNumberDestination:
        description: This RedirectDestination will redirect to a phoneNumber
        properties:
            phoneNumber:
                type: string
            redirectDestinationType:
                description: The type of the RedirectDestination determining the concrete RedirectDestination implementation
                type: string
                enum:
                - MAILBOX
                - PHONENUMBER
    EditFunctionKeySignalNumber:
        description: A representation of a EditFunctionKeySignalNumber Form
        properties:
            phoneNumber:
                description: the phoneNumber of the FunctionKey
                type: string
            phoneNumberId:
                description: the phoneNumberId of the FunctionKey
                type: integer
            name:
                description: the name of the FunctionKey
                type: string
    RequestMetadata:
        properties:
            totalPages:
                type: integer
            pagesize:
                type: integer
            page:
                type: integer
            sortdirection:
                type: string
                enum:
                - ASC
                - DESC
            sort:
                type: string
    Contact:
        description: contact information
        properties:
            accountId:
                type: integer
            primaryInternalNumber:
                type: string
            primaryExternalNumber:
                type: string
            editable:
                type: boolean
            tags:
                type: array
                items:
                    $ref: '#/definitions/Tag'
            jabberId:
                type: string
            blocks:
                type: array
                items:
                    $ref: '#/definitions/Block'
            id:
                type: string
    ContactsScheme:
        properties:
            summaryBlock:
                $ref: '#/definitions/Block'
            phoneNumbersBlock:
                $ref: '#/definitions/Block'
            detailBlocks:
                type: array
                items:
                    $ref: '#/definitions/Block'
    EditFunctionKeyForwardNumberUnconditional:
        description: A representation of a EditFunctionKeyForwardNumberUnconditional Form
        properties:
            editFunctionKeyFnuNumberSetting:
                type: array
                items:
                    $ref: '#/definitions/EditFunctionKeyForwardNumberUnconditionalNumberSetting'
            name:
                description: the name of the FunctionKey
                type: string
    EditFunctionKeyForwardCall:
        description: A representation of a EditFunctionKeyForwardCall Form
        properties:
            forwardType:
                description: the forward type allways busy timeout
                type: string
                enum:
                - ALWAYS
                - BUSY
                - TIMEOUT
            name:
                description: the name of the FunctionKey
                type: string
    EditFunctionKeyModuleActivation:
        description: A representation of a EditFunctionKeyModuleActivation Form
        properties:
            editFunctionKeyMaModuleSettings:
                description: the editFunctionKeyMaModuleSettings of the FunctionKey
                type: array
                items:
                    $ref: '#/definitions/EditFunctionKeyModuleActivationModuleSettings'
            name:
                description: the name of the FunctionKey
                type: string
    NumberForPhoneAssignment:
        description: Representation of an assignment from a PhoneNumber to a Phone.
        properties:
            getActive:
                description: the flag that indicates whether the PhoneNumber is active for this assignment.
                type: boolean
            getPhoneNumber:
                description: The number of the PhoneNumber
                type: string
            getPhoneNumberId:
                description: the Id of the PhoneNumber that is assigned
                type: integer
    AuthToken:
        properties:
            token:
                type: string
    PhoneNumber:
        description: A representation of a phone number
        properties:
            getNationalPrefix:
                description: the national prefix of the phone number
                type: string
            getLocalPrefix:
                description: the local prefix of the phone number
                type: string
            getExitCode:
                description: the exit code of the phone number
                type: string
            getNumberBlockId:
                description: the id of the corresponding NumberBlock
                type: integer
            getAssignedUserAccountId:
                description: the id of the account this phone number is assigned to or null if it is not assigned to an account
                type: integer
            getAssignedGroupAccountId:
                description: the id of the account this phone number is assigned to or null if it is not assigned to an account
                type: integer
            getAssignedModuleInstanceId:
                description: the id of the module instance this phone number is assigned to or null if it is not assigned to a module
                type: string
            getId:
                description: the Id of the phone number
                type: integer
            getType:
                description: the type of the phone number
                type: string
                enum:
                - INVALID
                - INTERNAL
                - EXTERNAL
                - RESERVED
                - NT
                - DISPLAY
                - FXO
            getNumber:
                description: the number itself (extention)
                type: string
    Block:
        description: Zusammenfassung von Attributen in Blöcke
        properties:
            resourceKey:
                type: string
            name:
                type: string
            attributes:
                type: array
                items:
                    $ref: '#/definitions/Attribute'
    EditFunctionKey:
        description: A representation of a EditFunctionKey Form
        properties:
            editFunctionKeyBusyLampField:
                $ref: '#/definitions/EditFunctionKeyBusyLampField'
            editFunctionKeyQuickDial:
                $ref: '#/definitions/EditFunctionKeyQuickDial'
            editFunctionKeyForwardNumberUnconditional:
                $ref: '#/definitions/EditFunctionKeyForwardNumberUnconditional'
            editFunctionKeyForwardCall:
                $ref: '#/definitions/EditFunctionKeyForwardCall'
            editFunctionKeyGroupLogin:
                $ref: '#/definitions/EditFunctionKeyGroupLogin'
            editFunctionKeyDnd:
                $ref: '#/definitions/EditFunctionKeyDnd'
            editFunctionKeyCcbs:
                $ref: '#/definitions/EditFunctionKeyCcbs'
            editFunctionKeyParkAndOrbit:
                $ref: '#/definitions/EditFunctionKeyParkAndOrbit'
            editFunctionKeySignalNumber:
                $ref: '#/definitions/EditFunctionKeySignalNumber'
            editFunctionKeyModuleActivation:
                $ref: '#/definitions/EditFunctionKeyModuleActivation'
            editFunctionKeyPhoneContact:
                $ref: '#/definitions/EditFunctionKeyPhoneContact'
            editFunctionKeyCallList:
                $ref: '#/definitions/EditFunctionKeyCallList'
            editFunctionKeyDtmf:
                $ref: '#/definitions/EditFunctionKeyDtmf'
            editFunctionKeyGenericUrl:
                $ref: '#/definitions/EditFunctionKeyGenericUrl'
            editFunctionKeySeperator:
                $ref: '#/definitions/EditFunctionKeySeperator'
    Tag:
        properties:
            alias:
                type: string
            owner:
                type: string
            name:
                type: string
            id:
                type: string
    PhoneAssignment:
        description: Representation of an assignment from a Phone to a User
        properties:
            getActive:
                description: the flag that indicates whether the Phone is active for the User. Inactive Phones won't ring on incoming calls.
                type: boolean
            getPhoneName:
                description: The name of the Phone that is assigned to the User.
                type: string
            getPhoneId:
                description: the Id of the Phone that is assigned to the User
                type: integer
            getUserId:
                description: the Id of the User
                type: integer
            getIsIFMC:
                description: the flag that indicates whether the assigned Phone is a STARFACE iFMC Phone
                type: boolean
    PhoneNumberAssignment:
        description: Representation of an assignment from a PhoneNumber to a User
        properties:
            getAccountId:
                description: the Id of the Account
                type: integer
            getServiceId:
                description: the Id of the call service rule that is used for this phone number.
                type: integer
            getPhoneNumberId:
                description: the Id of the PhoneNumber that is assigned to the User
                type: integer
    EditFunctionKeyBusyLampField:
        description: A representation of a EditFunctionKeyBusyLampField Form
        properties:
            blfAccountId:
                description: accountId of busy lamp field
                type: integer
            blfUsername:
                description: the user name of the FunctionKey
                type: string
            name:
                description: the name of the FunctionKey
                type: string
            number:
                description: the user telephonenumber of the FunctionKey
                type: string
