openapi: '3.0.3'
info:
  title: Posit Connect API Reference
  version: '1.0.1'
  description: |
    ## Overview

    The Posit Connect Server API can be used to perform certain
    user actions remotely. You will need to install a tool or library
    that can make HTTP requests. We recommend using one of our SDKs, which
    are designed to make it easier to interact with the API.

    - Python: [posit-sdk](https://github.com/posit-dev/posit-sdk-py/)
    - R: [connectapi](https://posit-dev.github.io/connectapi/)

    The SDKs are designed to work with the following values set in environment
    variables, though you may provide them directly to the SDK if you prefer:

    - `CONNECT_SERVER` - The URL of the Posit Connect server.
    - `CONNECT_API_KEY` - Your API key.

    Please note that all API paths are relative to the base API URL
    (e.g., `https://connect.example.com/__api__`).
    Unless otherwise noted, all endpoints which accept a request body
    will require the body to be in JSON format.
    Similarly, all response bodies will be returned in JSON format.

    ### Specifications {#download}

    The Posit Connect Server API OpenAPI specification is available for
    download as either JSON or YAML. Both formats contain the same
    information, also presented on this page.

    * <a href="openapi.json" title="OpenAPI (JSON)" target="_blank">OpenAPI (JSON)</a>
    * <a href="openapi.yaml" title="OpenAPI (YAML)" target="_blank">OpenAPI (YAML)</a>

    ### Versioning of the API {#versioning-policy}

    The Posit Connect Server API uses a simple, single number versioning scheme as noted
    as the first part of each endpoint path.  This version number will only be incremented
    in the event that non-backward compatible changes are made to an existing endpoint.
    Note that this occurs on a per-endpoint basis; see the section on
    [deprecation](#deprecation) below for more information.

    Changes that are considered backward compatible are:

    * New fields in responses.
    * New non-required fields in requests.
    * New endpoint behavior which does not violate the current functional intent of the
      endpoint.

    Changes that are considered non-backward compatible are:

    * Removal or rename of request or response fields.
    * A change of the type or format of one or more request or response fields.
    * Addition of new required request fields.
    * A substantial deviation from the current functional intent of the endpoint.

    The points relating to functional intent are assumed to be extremely rare as more
    often such situations will result in a completely new endpoint, which makes the
    change a backward compatible addition.

    #### Experimentation

    Posit Connect labels experimental endpoints in the API by including `/experimental`
    in the endpoint path immediately after the version indicator.  If an endpoint is noted
    as experimental, it should not be relied upon for any production work.  These are
    endpoints that Posit Connect is making available to our customers to solicit
    feedback; they are subject to change without notice.  Such changes include anything
    from altered request/response shapes, to complete abandonment of the endpoint.

    This public review of an experimental endpoint will last as long as necessary to either
    prove its viability or to determine that it's not really needed.  The time for this
    will vary based on the intricacies of each endpoint.  When the endpoint is finalized,
    the next release of Posit Connect will mark the experimental path as deprecated while
    adding the endpoint without the `/experimental` prefix. The path with the experimental
    prefix will be removed six months later.  The documentation for the endpoint will also
    note, during that time, the original, experimental, path.

    All experimental endpoints are clearly marked as such in this documentation.

    #### Deprecation and removal of old versions {#deprecation}

    It is possible that Posit Connect may decide to deprecate an endpoint.  This will
    happen if either the endpoint serves no useful purpose because its functionality is
    now handled by a different endpoint or because there is a newer version of the endpoint
    that should be used.

    If a deprecated endpoint is called, the response to it will include an extra HTTP
    header called, `X-Deprecated-Endpoint` and will have as a value the path of the
    endpoint that should be used instead.  If the functionality has no direct replacement,
    the value will be set to `n/a`.

    Deprecated versions of an endpoint will be supported for 1 year from the release date
    of Posit Connect in which the endpoint was marked as deprecated.  At that time, the
    endpoint is subject to removal at the discretion of Posit Connect.  The life cycle
    of an endpoint will follow these steps.

    1. The `/v1/endpoint` is public and in use by Posit Connect customers.
    1. Posit Connect makes `/v2/experimental/endpoint` available for testing and feedback.
       Customers should still use `/v1/endpoint` for production work.
    1. Posit Connect moves version 2 of the endpoint out of experimentation so, all within
       the same release:
        1. `/v1/endpoint` is marked as deprecated.
        1. `/v2/experimental/endpoint` is marked as deprecated.
        1. `/v2/endpoint` is made public.
    1. Six months later, `/v2/experimental/endpoint` is removed from the product.
    1. Twelve months later, `/v1/endpoint` is removed from the product.

    Note that it is possible that Posit Connect may produce a new version of an existing
    endpoint without making an experimental version of it first.  The same life cycle,
    without those parts, will still be followed.

    ### Authentication {#authentication}

    API endpoints require you to identify yourself as a valid Posit Connect
    user. You do this by specifying an API key when you make a call to the
    server. The [API Keys](../user/api-keys/) chapter of the Posit Connect
    User Guide explains how to create an API key.

    #### API Keys {#api-keys}

    API keys are managed by each user in the Posit Connect
    dashboard. If you ever lose an API key or otherwise feel it has
    been compromised, use the dashboard to revoke the key and create
    another one.

    **WARNING**: Keep your API key safe.  If your Posit Connect server's URL does not begin
    with `https`, your API key could be intercepted and used by a malicious actor.

    Once you have an API key, you can authenticate by passing the key with a prefix
    of `"Key "` (the space is important) in the Authorization header.

    Below are examples of invoking the "Get R Information" endpoint.

    ##### cURL

    ```bash
    curl -H "Authorization: Key XXXXXXXXXXX" \
         https://positconnect.example.com/__api__/v1/server_settings/r
    ```

    ##### R

    ```r
    library(httr)
    apiKey <- "XXXXXXXXXXX"
    result <- GET("https://positconnect.example.com/__api__/v1/server_settings/r",
      add_headers(Authorization = paste("Key", apiKey)))
    ```

    ##### Python

    ```python
    import requests
    r = requests.get(
      'https://positconnect.example.com/__api__/v1/server_settings/r',
      headers = { 'Authorization': 'Key XXXXXXXXXXX' }
    )
    ```

    ### API CORS considerations {#api-cors-considerations}

    For information about using Connect's API from web applications in different domains,
    see the [Cross-Origin Resource Sharing (CORS)](../admin/security/index.md#cors) section in
    the security documentation.

    ### API error codes {#api-error-codes}

    {{< include src/api_codes.fragment.html >}}

  license:
    name: "Commercial. Copyright 2015-2026 Posit Software, PBC. All Rights Reserved."
    url: https://posit.co/about/eula/
  contact:
    name: Posit Connect Support
    url: https://support.posit.co/hc/en-us
    email: support@posit.co
  termsOfService: https://posit.co/about/eula/
servers:
  - url: /__api__

security:
  - apiKey: []

components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header
      description: |
        Prefix your API key with `Key `, e.g. `Key ABC123`.

  schemas:
    APIErrorCode:
      type: integer
      description: 'Application-level error code returned in APIError.code. Values are stable; see the [API error codes reference](#api-error-codes).'
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
        - 20
        - 21
        - 22
        - 23
        - 24
        - 25
        - 26
        - 27
        - 28
        - 29
        - 30
        - 31
        - 32
        - 33
        - 34
        - 35
        - 36
        - 37
        - 38
        - 39
        - 40
        - 41
        - 42
        - 43
        - 44
        - 45
        - 46
        - 47
        - 48
        - 49
        - 50
        - 51
        - 52
        - 53
        - 54
        - 55
        - 56
        - 57
        - 58
        - 59
        - 60
        - 61
        - 62
        - 63
        - 64
        - 65
        - 66
        - 67
        - 68
        - 69
        - 70
        - 71
        - 72
        - 73
        - 74
        - 75
        - 76
        - 77
        - 78
        - 79
        - 80
        - 81
        - 82
        - 83
        - 84
        - 85
        - 86
        - 87
        - 88
        - 89
        - 90
        - 91
        - 92
        - 93
        - 94
        - 95
        - 96
        - 97
        - 98
        - 99
        - 100
        - 101
        - 102
        - 103
        - 104
        - 105
        - 106
        - 107
        - 108
        - 109
        - 110
        - 111
        - 112
        - 113
        - 114
        - 115
        - 116
        - 117
        - 118
        - 119
        - 120
        - 121
        - 122
        - 123
        - 124
        - 125
        - 126
        - 127
        - 128
        - 129
        - 130
        - 131
        - 132
        - 133
        - 134
        - 135
        - 136
        - 137
        - 138
        - 139
        - 140
        - 141
        - 142
        - 143
        - 144
        - 145
        - 146
        - 147
        - 148
        - 149
        - 150
        - 151
        - 152
        - 153
        - 154
        - 155
        - 156
        - 157
        - 158
        - 159
        - 160
        - 161
        - 162
        - 163
        - 164
        - 165
        - 166
        - 167
        - 168
        - 169
        - 170
        - 171
        - 172
        - 173
        - 174
        - 175
        - 176
        - 177
        - 178
        - 179
        - 180
        - 181
        - 182
        - 183
        - 184
        - 185
        - 186
        - 187
        - 188
        - 189
        - 190
        - 191
        - 192
        - 193
        - 194
        - 195
        - 196
        - 197
        - 198
        - 199
        - 200
        - 201
        - 202
        - 203
        - 204
        - 205
        - 206
        - 207
        - 208
        - 209
        - 210
        - 211
        - 212
        - 213
        - 214
        - 215
        - 216
        - 217
        - 218
        - 219
        - 220
        - 221
        - 222
        - 223
        - 224
        - 225
        - 226
        - 227
        - 228
        - 229
        - 230
        - 231
        - 232
        - 233
        - 234
        - 235
        - 236
        - 237
        - 238
        - 239
        - 240
        - 241
        - 242
        - 243
        - 244
        - 245
        - 246
        - 247
        - 248
        - 249
        - 250
        - 251
        - 252
        - 253
        - 254
        - 255
        - 256
        - 257
        - 258
        - 259
        - 260
        - 261
        - 262
        - 263
        - 264
        - 265
        - 266
        - 267
        - 268
        - 269
        - 270
      x-enumNames:
        - InternalFailure
        - BadRequest
        - InvalidId
        - ObjectDoesNotExist
        - InvalidApplicationName
        - InadequatePassword
        - InvalidUserName
        - DuplicateUserName
        - InvalidUser
        - NotObjectOwner
        - InvalidFilterField
        - ParameterMissing
        - InvalidRange
        - InvalidGroupName
        - DuplicateGroupName
        - DuplicateGroupEntry
        - RemoveNothing
        - UpdateNothing
        - NoViewPermission
        - NoRemovePermission
        - NoUpdatePermission
        - PermissionDenied
        - InvalidRoleAssignment
        - AuthRequired
        - InvalidParameter
        - DuplicateName
        - RVersionInUse
        - BundleMissing
        - TokenExpired
        - InvalidLogin
        - NoPasswordChange
        - InvalidFilter
        - InvalidCollaborator
        - InvalidCollaboratorOwner
        - CannotDelete
        - NoUsernameChange
        - InvalidStartTime
        - InvalidManifest
        - InvalidApplicationAction
        - UserNotConfirmed
        - InitialUserGeneratePassword
        - UserAlreadyConfirmed
        - MissingServerSenderEmail
        - UserMissingEmail
        - MinProcessesOverLimit
        - ImmutableUserField
        - UserMustBeProvisioned
        - AppModeChanged
        - NoLockPermission
        - UserLocked
        - VanityPathInUse
        - ProhibitedVanityPath
        - ImmutableFields
        - RunAsCurrentProhibited
        - RunAsNonExecutableProhibited
        - RunAsUserProhibited
        - RunAsUserNotFound
        - RunAsGroupMembership
        - NoRendering
        - DisallowedEmail
        - SoleAdminDemotion
        - InvalidKeyName
        - LDAPServerUnavailable
        - UserLicenseExceeded
        - APINotLicensed
        - CrossOwnership
        - SourceKeyRequired
        - PromotionWithoutRendering
        - BundleIdMismatch
        - SourceRenderingStale
        - InvalidPromotionSourceType
        - InvalidAppForVariantSchedule
        - CannotScheduleAdhocVariant
        - InvalidVariantName
        - DeleteActiveBundle
        - DuplicateUserKey
        - NoLongTagName
        - NoEmptyTagName
        - NoCategoryAppAssignment
        - IncorrectObjectVersion
        - NoDuplicateTagNames
        - BundleIdAppIdMismatch
        - TooManyResults
        - TokenClaimed
        - DupicateToken
        - MissingTokenAttributes
        - CannotParseRequestBody
        - InvalidRelationship
        - EmailFailure
        - UserSelfRegistrationDisabled
        - InvalidExternalAuthUsername
        - XSRF
        - VariantsEmailConstriction
        - PermissionsUpgradeThrottled
        - ProhibitedAuthType
        - PasswordChange
        - RedirectProhibited
        - InvalidLoginGroup
        - InRestrictedAccessMode
        - QueueItemInProgress
        - InvalidPasswordToken
        - DuplicateSchedule
        - MissingServerAddress
        - ContentChecksum
        - TensorFlowNotLicensed
        - EnvironmentVersionMismatch
        - ProhibitedUsername
        - ProhibitedEnvironment
        - ProhibitedAppMode
        - ContentCategoryChanged
        - HasParametersChanged
        - InvalidAuthRole
        - MaxProcessesOverLimit
        - MinProcessesOverMaxProcesses
        - InvalidUserStatus
        - VariantRenderingMismatch
        - UnknownAccessType
        - ProhibitedAccessType
        - PullOnPushAuth
        - PushOnPullAuth
        - InvalidJson
        - InvalidApplicationTitle
        - InvalidApplicationDescription
        - AdminMissingEmail
        - InvalidContentLength
        - BytesWrittenMismatch
        - InvalidTempTicket
        - UserBlankEmail
        - UserBlankProviderKey
        - GroupBlankProviderKey
        - DuplicateGroupKey
        - InvalidAuthProvider
        - SourceVariantInWrongApp
        - BundleWrite
        - BundleExtract
        - InvalidTimeFormat
        - InvalidTimeIntervalStart
        - InvalidTimeIntervalEnd
        - InvalidTimeIntervalLength
        - InvalidTimeInterval
        - TaskDoesNotExist
        - AppIsGitManaged
        - AppIsNotGitManaged
        - NoBundleUploadForGitManagedApp
        - GitIsDisabled
        - GitUnsupportedParameters
        - AppModeIsNotExecutable
        - InvalidAppMode
        - DuplicateEnvironmentVariable
        - InvalidLoadFactor
        - InvalidTimeout
        - InvalidPrincipalType
        - InvalidGroup
        - DuplicateUserPermission
        - DuplicateGroupPermission
        - InvalidOwner
        - InvalidParentTag
        - InvalidTag
        - DuplicatePermissionRequest
        - PermissionRequestInvalidEmail
        - InvalidInclude
        - InvalidHost
        - InactiveJob
        - GitUnsupportedProtocol
        - ProhibitedBootstrap
        - InvalidJWT
        - ReadingControlsFile
        - InvalidEnvironmentTitle
        - InvalidEnvironmentDescription
        - InvalidEnvironmentClusterName
        - InvalidEnvironmentName
        - UnknownEnvironmentMatchingType
        - InvalidInstallationPath
        - InvalidInstallationVersion
        - DuplicateEnvironmentName
        - InvalidServiceAccountName
        - InvalidEnvironmentSupervisor
        - UnrecognizedServiceAccountName
        - InvalidRuntimeLanguage
        - InvalidCacheLocation
        - InvalidMemoryRequest
        - MemoryRequestOverLimit
        - InvalidMemoryLimit
        - MemoryLimitOverLimit
        - MemoryRequestOverMemoryLimit
        - InvalidCPURequest
        - CPURequestOverLimit
        - InvalidCPULimit
        - CPULimitOverLimit
        - CPURequestOverCPULimit
        - InvalidMinProcesses
        - InvalidMaxProcesses
        - InvalidDefaultImageName
        - CacheManagementIsDisabled
        - InvalidServiceAccountConfiguration
        - InvalidAMDGPULimit
        - AMDGPULimitOverLimit
        - InvalidNvidiaGPULimit
        - NvidiaGPULimitOverLimit
        - EmailNoRecipients
        - InvalidDefaultOAuthScope
        - DefaultOAuthScopesOverLimit
        - InvalidOAuthClientId
        - InvalidOAuthTenantId
        - InvalidOAuthClientSecret
        - InvalidOAuthDescription
        - InvalidOAuthIntegrationGUID
        - InvalidOAuthIntegrations
        - InvalidOAuthAssociationAssignment
        - FormPostNotFound
        - FormPostParseFailure
        - OAuthCredentialNoAssociations
        - OAuthCredentialGrantType
        - OAuthCredentialSubjectTokenType
        - OAuthCredentialSubjectToken
        - OAuthCredentialIssClaim
        - OAuthCredentialSubClaim
        - InvalidOAuthSession
        - OAuthAccessTokenRefreshFailure
        - OAuthSessionNotFound
        - OAuthIntegrationsNotLicensed
        - LockedContentBundle
        - LockedContentProcess
        - InvalidLockedMessage
        - InvalidOAuthIntegrationName
        - InvalidOAuthIntegrationDescription
        - OAuthTemplateNotFound
        - OAuthTemplateConfig
        - OAuthTemplateProhibitedChange
        - InvalidOAuthIntegrationLogin
        - NoContent
        - InvalidBundleURL
        - UnableToGetBundleFromURL
        - InvalidKeyRole
        - OAuthInvalidRefreshToken
        - OAuthInvalidContentSessionToken
        - OAuthAssociationAuthType
        - OAuthAuthTypeMismatch
        - InvalidMaxConnsPerProcess
        - OAuthServiceAccountTestInvalidAuthType
        - OAuthUnableToRetrieveToken
        - OAuthCredentialRequestedTokenType
        - VisitorApiKeyExchangeScopeUndefined
        - VisitorApiKeyExchangeInvalidMaxAuthRole
        - InvalidSchedule
        - InvalidEnvironmentPermission
        - DuplicateEnvironmentPermission
        - AwsCredentialsExchangeFailed
        - OAuthCredentialsInvalidSubjectRequestedCombination
        - OAuthCredentialsNoSupportedHandler
        - OAuthInvalidIdToken
        - OAuthCredentialInvalidSubjectTokenTypeForAuthType
        - AppRunAsDisabled
        - EnvironmentsInvalidVolume
        - CustomDocumentationLength
        - OAuthCredentialsInvalidAudience
        - OAuthCredentialsInvalidAssociationCount
        - InvalidOAuthIntegrationsDuplicates
        - NotPublicContent
        - PublicAccessNotLicensed
        - InvalidUserGUID
        - InvalidGroupGUID
        - DuplicateGroupGid
        - InvalidEmailFormat
        - EnvironmentIsConfigManaged
        - EmptyEnvironmentVariableName
        - DuplicateBookmark
        - InvalidFirstName
        - InvalidLastName
        - NodeJsNotLicensed
    APIError:
      type: object
      description: The error object returned by the API on failure.
      required:
        - code
        - error
      properties:
        code:
          type: integer
          description: 'The specific code for the type of error returned. See the [API error codes reference](#api-error-codes) for the full set of values.'
        error:
          type: string
          description: A description of the problem that was encountered.
        payload:
          type: object
          nullable: true
    APIKey:
      description: |
        Object containing API key details.
      type: object
      properties:
        id:
          type: string
          description: |
            The unique identifier for this API key.
          example: "2"
        name:
          type: string
          description: |
            The name for this API key. The name often describes the purpose of
            the key.
          example: "Automation"
        key:
          type: string
          description: |
            The secret text for this API key. The full key is only revealed when
            the key is created. Subsequent reads only reveal the last few
            characters.
          example: "abcdefgabcdefg"
        user_role:
          type: string
          description: |
            The role of this API key.
          example: "viewer"
          enum:
            - administrator
            - publisher
            - viewer
        created_time:
          type: string
          format: date-time
          description: |
            Timestamp (in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
            format) indicating when the key was created.
          example: "2006-01-02T15:04:05-07:00"
        active_time:
          type: string
          format: date-time
          description: |
            Timestamp (in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
            format) indicating approximately when the key was last used.
            Highly active keys only receive periodic updates.
          example: "2006-01-02T15:04:05-07:00"
    APIKeyCreateInput:
      description: |
        An object sent to create an API key.
      type: object
      properties:
        name:
          type: string
          description: |
            The name for this API key. Use the name to describe the purpose of
            the key.
          example: "Automation"
        user_role:
          type: string
          description: |
            The role of this API key. Cannot be greater than the role of the
            user account. Defaults to the user account role when `null`.
          example: "viewer"
          enum:
            - administrator
            - publisher
            - viewer
    AccessTestResult:
      description: |
        The results of the public access content verification test.
      type: object
      properties:
        guid:
          type: string
          format: uuid
          description: |
            The unique identifier of this content item.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        url:
          type: string
          description: |
            The URL that was used to test access to this content. Computed from
            the associated GUID for this content or the optional vanity URL.
          example: "https://posit-connect.company.com/content/9d8e7f3e-92e8-4a08-b0ff-196319cc56ae"
        checked_at:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when the access test was performed.
          example: "2006-01-02T15:04:05-07:00"
        accessible:
          type: boolean
          description: |
            Indicates whether or not the test was able to access the content item
            on the public internet.
          example: false
        message:
          type: string
          description: |
            An optional informational message with extra details about the test
            result. See the
            [Admin Guide](../admin/licensing/index.md#public-access)
            for additional guidance about specific messages.
          example: "content is not publicly accessible"
    AuditActionResult:
      description: |
        An audit action available on your Posit Connect server.
      type: object
      properties:
        action:
          type: string
          description: |
            The name of the action.
          example: "create_user"
        description:
          type: string
          description: |
            A human-readable description of the action.
          example: "Create a new user."
    AuditLog:
      description: |
        An audit log entry.
      type: object
      properties:
        id:
          type: string
          description: |
            The identifier of the audit action.
        time:
          type: string
          format: date-time
          description: |
            Timestamp in RFC3339 format when the action was taken.
          example: "2006-01-02T15:04:05-07:00"
        user_id:
          type: string
          description: |
            The user identifier of the actor who performed the audit action.
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The user GUID of the actor who performed the audit action.
        user_description:
          type: string
          description: |
            A description of the actor.
          example: "Full name (username)"
        action:
          type: string
          description: |
            The audit action taken.
          example: "add_user"
        event_description:
          type: string
          description: |
            A human-readable description of the action.
          example: "Added user Full Name (username)"
    AuditLogEntry:
      description: |
        An audit log entry.
      type: object
      properties:
        id:
          type: string
          description: |
            The unique identifier of the audit log entry.
          example: "123"
        time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) of the audit action.
          example: "2006-01-02T15:04:05-07:00"
        user_id:
          type: string
          description: |
            The unique identifier of the user who performed the action.
          example: "456"
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The GUID of the user who performed the action.
          example: "d4aaf24e-b7d5-404f-843e-a78e4c1eab38"
        user_description:
          type: string
          description: |
            A description of the user who performed the action.
          example: "John Doe"
        action:
          type: string
          description: |
            The name of the audit action.
          example: "create_user"
        event_description:
          type: string
          description: |
            A human-readable description of the event.
          example: "Created a new user account."
    AuditLogSearchResults:
      description: |
        Audit log search results with total count.
      type: object
      properties:
        total:
          type: integer
          description: |
            The total number of matching audit log entries.
          example: 100
        results:
          type: array
          description: |
            The matching audit log entries for this page.
          items:
            $ref: '#/components/schemas/AuditLogEntry'
    AuditLogs:
      description: |
        Audit log results with keyset pagination.
      type: object
      properties:
        results:
          type: array
          description: |
            The audit logs
          items:
            $ref: '#/components/schemas/AuditLog'
        paging:
          description: |
            Paging object that can be used for navigation.
          allOf:
            - $ref: '#/components/schemas/KeysetPaging'
    Bookmark:
      description: |
        The fields that are returned when getting a bookmark.
      type: object
      properties:
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this bookmark was created.
          example: "2006-01-02T15:04:05-07:00"
    BootstrapSuccess:
      type: object
      properties:
        api_key:
          type: string
          description: |
            The API key for the newly created administrator user.
    Bundle:
      description: |
        A deployment bundle associated with a content item.
      type: object
      properties:
        id:
          type: string
          description: |
            The identifier for this bundle.
          example: "101"
        content_guid:
          type: string
          format: uuid
          description: |
            The identifier of the owning content.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        created_by:
          type: string
          format: uuid
          nullable: true
          description: |
            The GUID of the user who created the bundle.
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) of when this bundle was created.
          example: "2006-01-02T15:04:05-07:00"
        environment_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The guid of the execution environment used to run this content. Content
            running locally
            on the same server as Connect will have a `null` value.

            A `null` value is returned when the client does not have sufficient rights
            to see this
            information.
          example: "36538b83-ea6d-4839-ae8e-53c52ac5f0bf"
        cluster_name:
          type: string
          nullable: true
          description: |
            The location where this content runs. Content running on the same
            server as Connect will have either a `null` value or the string
            "Local". Gives the name of the cluster when run external to the
            Connect host.

            A `null` value is returned when the client does not have sufficient
            rights to see this information.
          example: "Local"
        image_name:
          type: string
          nullable: true
          description: |
            The name of the container image used to run this content in containerized
            environments such as Kubernetes. Content running locally
            on the same server as Connect will have either a `null` value or the string
            "Local".

            A `null` value is returned when the client does not have sufficient
            rights to see this information.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
        r_version:
          type: string
          nullable: true
          description: |
            The version of R used when last restoring this bundle. A `null`
            value represents that R is not used by this bundle or that the
            bundle has not been prepared for execution.

            R version is not disclosed to users with a "viewer" role; they
            receive a `null` value.
          example: "3.5.1"
        r_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect is managing an R environment and
            has installed the required packages for this content. The `null`
            value represents that R is not used by this bundle or that it has
            not yet been determined if an R environment is required.

            R environment management is not disclosed to users with a "viewer"
            role; they receive a `null` value.
          example: true
        py_version:
          type: string
          nullable: true
          description: |
            The version of Python used when last restoring this bundle. A `null`
            value represents that Python is not used by this bundle or that the
            bundle has not been prepared for execution.

            Python version is not disclosed to users with a "viewer" role; they
            receive a `null` value.
          example: "3.8.2"
        py_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect is managing a Python environment
            and has installed the required packages for this content. The `null`
            value represents that Python is not used by this bundle or that it
            has not yet been determined if a Python environment is required.

            Python environment management is not disclosed to users with a
            "viewer" role; they receive a `null` value.
          example: true
        quarto_version:
          type: string
          nullable: true
          description: |
            The version of Quarto used when last restoring this bundle. A `null`
            value represents that Quarto is not used by this bundle or that the
            bundle has not been successfully prepared for execution.

            Quarto version is not disclosed to users with a "viewer" role; they
            receive a `null` value.
          example: "0.2.22"
        active:
          type: boolean
          description: |
            Indicates if this bundle is active for the owning content.
          example: false
        size:
          type: integer
          format: int64
          description: |
            On-disk size in bytes of the tar.gz file associated with this bundle.
            Zero when there is no on-disk file.
          example: 1000000
        metadata:
          description: |
            Metadata object associated with this bundle.
            May be generated by Connect, if using git-backed publishing,
            or supplied by the publisher at upload time.
          allOf:
            - $ref: '#/components/schemas/BundleMetadata'
    BundleMetadata:
      description: |
        Metadata about a bundle including source control information and custom fields.
      type: object
      properties:
        source:
          type: string
          nullable: true
          description: |
            Source for this bundle.
            `git` for bundles fetched from a git repository.
        source_repo:
          type: string
          nullable: true
          description: |
            Repository URL for this bundle.
        source_branch:
          type: string
          nullable: true
          description: |
            Repository branch or ref name for this bundle.
        source_commit:
          type: string
          nullable: true
          description: |
            Commit ID (hash) for this bundle.
        archive_md5:
          type: string
          nullable: true
          description: |
            MD5 hash of the archive file for this bundle. `null` for bundles
            uploaded before this field was added.
          example: "37324238a80595c453c706b22adb83d3"
        archive_sha1:
          type: string
          nullable: true
          description: |
            SHA1 hash of the archive file for this bundle. `null` for bundles
            uploaded before this field was added.
          example: "a2f7d13d87657df599aeeabdb70194d508cfa92f"
    Content:
      description: |
        The content object models all the "things" you may deploy to Posit Connect. This includes Shiny applications, R Markdown documents, Jupyter notebooks, Plumber APIs, FastAPI and Flask APIs, Python apps, plots, and pins.
      type: object
      properties:
        guid:
          type: string
          format: uuid
          description: |
            The unique identifier of this content item.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        name:
          type: string
          description: |
            A simple identifier. Allows alpha-numeric
            characters, periods (`"."`), hyphens (`"-"`), and underscores (`"_"`).
          example: "quarterly-analysis"
        title:
          type: string
          nullable: true
          description: |
            The title of this content.
          example: "Quarterly Analysis of Team Velocity"
        description:
          type: string
          description: |
            A rich description of this content.
          example: "This report calculates per-team statistics ..."
        access_type:
          type: string
          description: |
            Access type describes how this content manages its viewers. The
            value `all` is the most permissive; any visitor to Posit Connect
            will be able to view this content. The value `logged_in` indicates
            that all Posit Connect accounts may view the content. The `acl`
            value lets specifically enumerated users and groups view the
            content. Users configured as collaborators may always view content.

            Access types may be restricted by the Connect configuration or the
            product license.
          example: "acl"
        locked:
          type: boolean
          description: |
            Whether or not the content is locked.
          example: false
        locked_message:
          type: string
          description: |
            A custom message that is displayed by the content item when locked.
            It is possible to format this message using Markdown.
          example: "# This piece of content is locked"
        connection_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            Maximum number of seconds allowed without data sent or received
            across a client connection. A value of `0` means connections will
            never time-out (not recommended). When `null`, the default
            [`Scheduler.ConnectionTimeout`](../admin/appendix/configuration/index.md#Scheduler.ConnectionTimeout) is used. Applies only to content types
            that are executed on demand.
          example: 3600
        read_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            Maximum number of seconds allowed without data received from a
            client connection. A value of `0` means a lack of client (browser)
            interaction never causes the connection to close. When `null`, the
            default [`Scheduler.ReadTimeout`](../admin/appendix/configuration/index.md#Scheduler.ReadTimeout) is used. Applies only to content
            types that are executed on demand.
          example: 3600
        init_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            The maximum number of seconds allowed for an interactive application
            to start. Posit Connect must be able to connect to a newly
            launched application before this threshold has
            elapsed. When `null`, the default [`Scheduler.InitTimeout`](../admin/appendix/configuration/index.md#Scheduler.InitTimeout) is used.
            Applies only to content types that are executed on demand.
          example: 60
        idle_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            The maximum number of seconds a worker process for an interactive
            application to remain alive after it goes idle (no active
            connections). When `null`, the default [`Scheduler.IdleTimeout`](../admin/appendix/configuration/index.md#Scheduler.IdleTimeout) is
            used. Applies only to content types that are executed on demand.
          example: 5
        max_processes:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the total number of concurrent processes allowed for a
            single interactive application per Posit Connect node. When `null`,
            the default [`Scheduler.MaxProcesses`](../admin/appendix/configuration/index.md#Scheduler.MaxProcesses) is used. Applies only to
            content types that are executed on demand.
          example: 3
        min_processes:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the minimum number of concurrent processes allowed for a
            single interactive application per Posit Connect node. When `null`,
            the default `Scheduler.MinProcesses` is used. Applies only to
            content types that are executed on demand.
          example: 0
        max_conns_per_process:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the maximum number of client connections allowed to an
            individual process. Incoming connections which will exceed this
            limit are routed to a new process or rejected. When `null`, the
            default [`Scheduler.MaxConnsPerProcess`](../admin/appendix/configuration/index.md#Scheduler.MaxConnsPerProcess) is used. Applies only to
            content types that are executed on demand.
          example: 20
        load_factor:
          type: number
          format: double
          nullable: true
          description: |
            Controls how aggressively new processes are spawned. When `null`,
            the default [`Scheduler.LoadFactor`](../admin/appendix/configuration/index.md#Scheduler.LoadFactor) is used. Applies only to content
            types that are executed on demand.
          example: 0.5
        memory_request:
          type: integer
          format: int64
          nullable: true
          description: |
            The minimum amount of RAM this content needs when executing or
            rendering, expressed in bytes. This is used when running in an
            off-host execution configuration to determine where the content
            should be run. When `null`, the default [`Scheduler.MemoryRequest`](../admin/appendix/configuration/index.md#Scheduler.MemoryRequest) is
            used.
          example: 1073741824
        memory_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The maximum amount of RAM this content will be allowed to consume
            when executing or rendering, expressed in bytes. If the process tries
            to use more memory than allowed, it will be terminated. When `null`,
            the default [`Scheduler.MemoryLimit`](../admin/appendix/configuration/index.md#Scheduler.MemoryLimit) is used.
          example: 2147483648
        cpu_request:
          type: number
          format: double
          nullable: true
          description: |
            The minimum amount of compute power this content needs when executing
            or rendering, expressed in ["CPU
            Units"](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu),
            where 1.0 unit is equivalent to 1 physical or virtual core.
            Fractional values are allowed. This is used when running in an
            off-host execution configuration to determine where the content
            should be run. When `null`, the default [`Scheduler.CPURequest`](../admin/appendix/configuration/index.md#Scheduler.CPURequest) is
            used.
          example: 1.0
        cpu_limit:
          type: number
          format: double
          nullable: true
          description: |
            The maximum amount of compute power this content will be allowed to
            consume when executing or rendering, expressed in ["CPU
            Units"](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu),
            where 1.0 unit is equivalent to 1 physical or virtual core.
            Fractional values are allowed. This is used when running in an
            off-host execution configuration. If the process tries to use more
            CPU than allowed, it will be throttled. When `null`, the default
            [`Scheduler.CPULimit`](../admin/appendix/configuration/index.md#Scheduler.CPULimit) is used.
          example: 1.5
        amd_gpu_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The number of AMD GPUs that will be
            [allocated by
            Kubernetes](https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/)
            to run this content. This is used when running in an
            off-host execution configuration. When `null`, the default
            [`Scheduler.AMDGPULimit`](../admin/appendix/configuration/index.md#Scheduler.AMDGPULimit) is used. This setting can not exceed
            [`Scheduler.MaxAMDGPULimit`](../admin/appendix/configuration/index.md#Scheduler.MaxAMDGPULimit).
          example: 1
        nvidia_gpu_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The number of NVIDIA GPUs that will be
            [allocated by
            Kubernetes](https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/)
            to run this content. This is used when running in an
            off-host execution configuration. When `null`, the default
            [`Scheduler.NvidiaGPULimit`](../admin/appendix/configuration/index.md#Scheduler.NvidiaGPULimit) is used. This setting can not exceed
            [`Scheduler.MaxNvidiaGPULimit`](../admin/appendix/configuration/index.md#Scheduler.MaxNvidiaGPULimit).
          example: 1
        service_account_name:
          type: string
          nullable: true
          description: |
            The name of the Kubernetes service account that is used to run a particular
            piece of content.
            It must adhere to valid Kubernetes service account naming rules.

            Connect must be configured to run with [`Launcher.Enabled = true`](../admin/appendix/configuration/index.md#Launcher.Enabled),
            [`Launcher.Kubernetes = true`](../admin/appendix/configuration/index.md#Launcher.Kubernetes) and
            [`Launcher.KubernetesContentServiceAccountSelection = true`](../admin/appendix/configuration/index.md#Launcher.KubernetesContentServiceAccountSelection)
            for this value to be applied. It will have precedence over the
            [`Launcher.KubernetesDefaultServiceAccount`](../admin/appendix/configuration/index.md#Launcher.KubernetesDefaultServiceAccount) that may be set in the
            configuration for Connect.

            If this value is defined and Connect is configured with
            [`Launcher.KubernetesContentServiceAccountSelection = false`](../admin/appendix/configuration/index.md#Launcher.KubernetesContentServiceAccountSelection) an error will be
            returned.

            Only administrators and publishers can view this value.
            Only administrators can set or change this value.
          example: "rstudio-connect-content"
        default_image_name:
          type: string
          nullable: true
          description: |
            The default image that will be used when none is defined by the
            bundle's manifest. A specific image may be selected by setting the
            `environment.image` field in the manifest. If no image is selected
            by the manifest file, then the `default_image_name` is used.
            If a target image is not defined by the manifest, and no
            `default_image_name` is configured, then Connect will select an
            image from the list of configured execution environments.

            If either `environment.identifier` or `environment.image` is specified in
            the bundle's
            manifest.json then the settings in the manifest are used and the
            content-level default
            settings will be ignored. This allows historical bundle activation to behave
            consistently
            even when the content-level default values may have changed.

            A `null` value is returned when the client does not have sufficient
            rights to see this information.

            Use the `/v1/environments` API endpoints to determine which environments
            are available for content execution.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
        default_environment_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The default execution environment that will be used when none is defined by
            the
            bundle's manifest. A specific execution environment may be selected by
            setting the
            `environment.identifier` field in the manifest. If no execution environment
            is selected
            by the manifest file, then `default_environment_guid` is used to select the
            execution environment. If a target execution environment is not defined by
            the manifest,
            and no `default_environment_guid` is configured, then Connect will select an
            execution environment from the list of configured execution environments.

            If either `environment.identifier` or `environment.image` is specified in
            the bundle's
            manifest.json then the settings in the manifest are used and the
            content-level default
            settings will be ignored. This allows historical bundle activation to behave
            consistently
            even when the content-level default values may have changed.

            A `null` value is returned when the client does not have sufficient
            rights to see this information.

            Use the `/v1/environments` API endpoints to determine which environments
            are available for content execution.
          example: "36538b83-ea6d-4839-ae8e-53c52ac5f0bf"
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this content was created.
          example: "2006-01-02T15:04:05-07:00"
        last_deployed_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this content last had a
            successful bundle deployment performed.
          example: "2006-01-02T15:04:05-07:00"
        bundle_id:
          type: string
          nullable: true
          description: |
            The identifier for the active deployment bundle. Automatically
            assigned upon the successful deployment of that bundle.
          example: "101"
        app_mode:
          type: string
          description: |
            The runtime model for this content. Has a value of `unknown` before
            data is deployed to this item. Automatically assigned upon the first
            successful bundle deployment.

            Valid values are:

            * `api` - R code defining a [Plumber API](https://www.rplumber.io/).
            * `jupyter-static` - A [Jupyter
            Notebook](https://jupyter-notebook.readthedocs.io/en/stable/).
            * `jupyter-voila` A [Voila](https://voila.readthedocs.io/en/stable/)
            interactive dashboard.
            * `python-api` - Python code defining a WSGI API (such as
            [Flask](https://palletsprojects.com/p/flask/))
            * `python-bokeh` - Python code defining a [Bokeh
            application](https://bokeh.org/).
            * `python-panel` - Python code defining a [Panel
            application](https://panel.holoviz.org/).
            * `python-dash` - Python code defining a [Dash
            application](https://dash.plotly.com/).
            * `python-fastapi` - Python code defining an ASGI API (such as
            [FastAPI](https://fastapi.tiangolo.com/))
            * `python-gradio` - Python code defining a [Gradio](https://www.gradio.app/)
            application.
            * `python-shiny` - Python code defining a [Shiny
            application](https://shiny.posit.co/py/).
            * `python-streamlit` - Python code defining a [Streamlit
            application](https://streamlit.io/).
            * `quarto-shiny` - A [Quarto](https://quarto.org/) document with a Shiny
            runtime.
            * `quarto-static` - A [Quarto](https://quarto.org/) document or site.
            * `rmd-shiny` - An [R Markdown](https://rmarkdown.rstudio.com/) document
            with a Shiny runtime.
            * `rmd-static` - An [R Markdown](https://rmarkdown.rstudio.com/) document or
            site.
            * `shiny` - R code defining a [Shiny application](https://shiny.posit.co/).
            * `static` - Content deployed without source; often HTML and plots.
            * `tensorflow-saved-model` - A TensorFlow Model API.
            * `unknown` - No known runtime model.
          example: "shiny"
        content_category:
          type: string
          description: |
            Describes the specialization of the content runtime model.
            Automatically assigned upon the first successful bundle deployment.

            The `content_category` field refines the type of content specified by
            `app_mode`. It is empty by default. The rsconnect R package may assign
            a value when analyzing your content and building its manifest and
            bundle. Plots (images created in the RStudio IDE and presented in the
            "Plots" pane) have an `app_mode` of `static` and receive a
            `content_category` of `plot` to distinguish them from other HTML
            documents. Pinned static data sets have an `app_mode` of `static` and a
            `content_category` of `pin`. Multi-document R Markdown sites have an
            `app_mode` of `rmd-static` and a `content_category` of `site`.
            API content types (such as FastAPI, Flask, or Plumber) that serve as
            MCP servers have a `content_category` of `mcp`. The `mcp` category is
            auto-detected on first deploy but can also be set or cleared via
            [PATCH /v1/content/{guid}](#updateContent).
          example: "site"
        parameterized:
          type: boolean
          description: |
            True when R Markdown rendered content allows parameter
            configuration. Automatically assigned upon the first successful
            bundle deployment. Applies only to content with an `app_mode` of
            `rmd-static`.
          example: false
        environment_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The guid of the execution environment used to run this content. Content
            running locally
            on the same server as Connect will have either a `null` value.

            A `null` value is returned when the client does not have sufficient rights
            to see this
            information.
          example: "36538b83-ea6d-4839-ae8e-53c52ac5f0bf"
        cluster_name:
          type: string
          nullable: true
          description: |
            The location where this content runs. Content running on the same
            server as Connect will have either a `null` value or the string
            "Local". Gives the name of the cluster when run external to the
            Connect host.

            A `null` value is returned when the client does not have sufficient
            rights to see this information.
          example: "Local"
        image_name:
          type: string
          nullable: true
          description: |
            The name of the container image used to run this content in containerized
            environments such as Kubernetes. Content running locally
            on the same server as Connect will have either a `null` value or the string
            "Local".

            A `null` value is returned when the client does not have sufficient
            rights to see this information.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
        r_version:
          type: string
          nullable: true
          description: |
            The of R interpreter associated with this content. A `null` value
            represents that R is not used by this content, that the content has
            not been prepared for execution, or that the client does not have
            sufficient rights to see this information. Automatically assigned
            upon the successful deployment of a bundle.
          example: "3.5.1"
        py_version:
          type: string
          nullable: true
          description: |
            The version of Python associated with this content. A `null` value
            represents that Python is not used by this content, that the content
            has not been prepared for execution, or that the client does not
            have sufficient rights to see this information. Automatically
            assigned upon the successful deployment of a bundle.
          example: "3.8.2"
        quarto_version:
          type: string
          nullable: true
          description: |
            The version of Quarto associated with this content. A `null`
            represents that Quarto is not used by this content, that the content
            has not been prepared for execution, or that the client does not
            have sufficient rights to see this information. Automatically
            assigned upon the successful deployment of a bundle.
          example: "0.2.22"
        node_version:
          type: string
          nullable: true
          description: |
            The version of Node.js associated with this content. A `null`
            represents that Node.js is not used by this content, that the content
            has not been prepared for execution, or that the client does not
            have sufficient rights to see this information. Automatically
            assigned upon the successful deployment of a bundle.
          example: "22.11.0"
        r_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect is managing an R environment and
            has installed the required packages for this content. A `null` value
            represents that R is not used by this content, that the content has
            not been prepared for execution, or that the client does not have
            sufficient rights to see this information. Automatically assigned
            upon the successful deployment of a bundle.
          example: true
        default_r_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect should create and manage an R
            environment (installing required packages) for this content. When
            `null`, Connect makes this determination based on the server
            configuration.

            A `null` value is also returned when the client does not have
            sufficient rights to see this information.

            This value is ignored if the server setting
            [`Applications.DefaultEnvironmentManagementSelection`](../admin/appendix/configuration/index.md#Applications.DefaultEnvironmentManagementSelection) is disabled.
          example: true
        py_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect is managing a Python environment
            and has installed the required packages for this content. A `null`
            value represents that Python is not used by this content, that the
            content has not been prepared for execution, or that the client does
            not have sufficient rights to see this information. Automatically
            assigned upon the successful deployment of a bundle.
          example: true
        default_py_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect should create and manage a Python
            environment (installing required packages) for this content. When
            `null`, Connect makes this determination based on the server
            configuration.

            A `null` value is also returned when the client does not have
            sufficient rights to see this information.

            This value is ignored if the server setting
            [`Applications.DefaultEnvironmentManagementSelection`](../admin/appendix/configuration/index.md#Applications.DefaultEnvironmentManagementSelection) is disabled.
          example: true
        run_as:
          type: string
          nullable: true
          description: |
            The UNIX user that executes this content. When `null`, the default
            [`Applications.RunAs`](../admin/appendix/configuration/index.md#Applications.RunAs) is used. Applies only to executable content
            types - not `static`.

            Only administrators can change this value.

            If [`Applications.RunAsEnabled = false`](../admin/appendix/configuration/index.md#Applications.RunAsEnabled), this value will be ignored when
            executing content.
          example: "rstudio-connect"
        run_as_current_user:
          type: boolean
          description: |
            Indicates that Connect should run processes for this content item
            under the Unix account of the user who visits it. Content accessed
            anonymously will continue to run as the specified `run_as` user.

            Connect must be configured to use PAM authentication with the server
            settings [`Applications.RunAsCurrentUser = true`](../admin/appendix/configuration/index.md#Applications.RunAsCurrentUser) and
            [`PAM.ForwardPassword = true`](../admin/appendix/configuration/index.md#PAM.ForwardPassword). This setting has no effect for other
            authentication types.

            This setting only applies to application content types (Shiny, Dash,
            Streamlit, Bokeh, and Panel).

            Only administrators can change this value.
          example: false
        metrics_collection_enabled:
          type: boolean
          nullable: true
          description: |
            Controls whether per-job resource metrics (CPU, memory, connections)
            are collected for this content item.

            When `null`, the content item inherits the server-wide default from
            [`Applications.MetricsCollectionEnabled`](../admin/appendix/configuration/index.md#Applications.MetricsCollectionEnabled). Explicit `true` or `false`
            values override the server default.

            Metrics can be retrieved via the
            [GET /v1/content/{guid}/jobs/{key}/metrics](#getJobMetrics) endpoint.
          example: true
        notify_on_share:
          type: boolean
          nullable: true
          description: |
            Controls whether email notifications are sent by default
            when users or groups are added as collaborators or viewers.

            When `null`, the content item inherits the server-wide default
            from [`Applications.NotifyOnShare`](../admin/appendix/configuration/index.md#Applications.NotifyOnShare). Explicit `true` or `false`
            values override the server default.
          example: true
        trace_collection_enabled:
          type: boolean
          description: |
            Whether per-job OpenTelemetry traces are collected for this content item.
            Traces are collected only when both this field and the server setting
            `Applications.AllowTraceCollection` are true.
          example: false
        owner_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of the user who created this content item.
            Automatically assigned when the content is created.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        content_url:
          type: string
          description: |
            The URL associated with this content. Computed from the associated
            GUID for this content.
          example: "https://posit-connect.company.com/content/9d8e7f3e-92e8-4a08-b0ff-196319cc56ae"
        dashboard_url:
          type: string
          description: |
            The URL within the Connect dashboard where this content can be configured.
            Computed from the GUID for this content.
          example: "https://posit-connect.company.com/connect/#/apps/9d8e7f3e-92e8-4a08-b0ff-196319cc56ae"
        vanity_url:
          type: string
          description: |
            The vanity URL associated with this content item. Included in responses
            when the vanity URL is set and `include=vanity_url` is provided.
          example: "https://posit-connect.company.com/my-content/"
        app_role:
          type: string
          description: |
            The relationship of the accessing user to this content. A value of
            `owner` is returned for the content owner. `editor` indicates a
            collaborator. The `viewer` value is given to users who are permitted
            to view the content. A `none` role is returned for administrators
            who cannot view the content but are permitted to view its
            configuration. Computed at the time of the request.
          example: "owner"
        bookmarked:
          type: boolean
          nullable: true
          description: |
            Indicates whether the requesting user has bookmarked this content
            item. Included in responses when `include=bookmarked` is provided.
          example: true
        schedules:
          type: array
          nullable: true
          description: |
            Schedules associated with this content item. Included in responses when
            `include=schedule` is provided.
          items:
            $ref: '#/components/schemas/ContentSchedule'
        id:
          type: string
          description: |
            The internal numeric identifier of this content item.
          example: "314"
        tags:
          type: array
          nullable: true
          description: |
            Tags associated with this content item. Included in responses when
            `include=tags` is provided. Returns an empty array when content has
            no tags.
          items:
            $ref: '#/components/schemas/Tag'
        owner:
          nullable: true
          description: |
            Basic details about the owner of this content item. Included in
            responses when `include=owner` is provided.
          allOf:
            - $ref: '#/components/schemas/ContentOwner'
        public_content_status:
          type: string
          nullable: true
          description: |
            Validation status of public interactive content. When validation is
            required by licensing, this will be one of "ok", "warning", or
            "restricted". If licensing does not require validation, it will be
            "unrestricted"; if licensing does not allow public interactive
            content, it will be "unlicensed". If the app has not been made public,
            but public content is permitted, it will be "none".
          example: "unrestricted"
    ContentBuildInstructions:
      description: |
        Optionally identifies the target build bundle.
      type: object
      properties:
        bundle_id:
          type: string
          nullable: true
          description: |
            The identifier of the bundle to build. If not provided, the most recently uploaded bundle is built.
        activate:
          type: boolean
          nullable: true
          description: |
            Whether the built bundle should be activated after building. Defaults to true.
    ContentBuildTask:
      description: |
        Identifies the task that can be used to track the progress of a build operation.
      type: object
      properties:
        task_id:
          type: string
          description: |
            Identifier for the created build task.
          example: "M49MsuXt6XVzlRdL"
    ContentDeploymentInstructions:
      description: |
        Optionally identifies the target deployment bundle.
      type: object
      properties:
        bundle_id:
          type: string
          nullable: true
          description: |
            The identifier of the bundle to deploy. If not provided, the most recently uploaded bundle is deployed.
        activate:
          type: boolean
          nullable: true
          description: |
            Whether the deployed bundle should be activated after deployment. Defaults to true.
    ContentDeploymentTask:
      description: |
        Identifies the task that can be used to track the progress of a deployment operation.
      type: object
      properties:
        task_id:
          type: string
          description: |
            Identifier for the created deployment task.
          example: "M49MsuXt6XVzlRdL"
    ContentHitData:
      description: |
        Additional data about a content hit.
      type: object
      properties:
        path:
          type: string
          nullable: true
          description: |
            The path consumed for this hit event.
          example: "/summary"
        query:
          type: string
          nullable: true
          description: |
            The query string for this hit event.
          example: "view_hit_source=email"
        user_agent:
          type: string
          nullable: true
          description: |
            The user agent registered for this hit event.
          example: "Mozilla/5.0"
        sec_fetch_dest:
          type: string
          nullable: true
          description: |
            The value of the Sec-Fetch-Dest HTTP header. Common values: document, iframe, empty.
        sec_fetch_site:
          type: string
          nullable: true
          description: |
            The value of the Sec-Fetch-Site HTTP header. Common values: same-origin, same-site, cross-site, none.
    ContentHitEntry:
      description: |
        A content hit activity record.
      type: object
      properties:
        id:
          type: string
          description: |
            The ID of the activity record.
          example: "33"
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The GUID of the user that visited the content. May be null when the content does not require a user session.
          example: "08e3a41d-1f8e-47f2-8855-f05ea3b0d4b2"
        content_guid:
          type: string
          format: uuid
          description: |
            The GUID of the content this activity pertains to.
          example: "bd1d2285-6c80-49af-8a83-a200effe3cb3"
        timestamp:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) when the user visited the content.
          example: "2018-09-15T18:00:00-05:00"
        data:
          description: |
            Additional data about the content hit.
          allOf:
            - $ref: '#/components/schemas/ContentHitData'
    ContentOwner:
      description: |
        Basic details about the owner of a content item.
      type: object
      properties:
        guid:
          type: string
          format: uuid
          description: |
            The owner's unique identifier.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        username:
          type: string
          nullable: true
          description: |
            The owner's username.
          example: "jondoe"
        first_name:
          type: string
          nullable: true
          description: |
            The owner's first name.
          example: "Jon"
        last_name:
          type: string
          nullable: true
          description: |
            The owner's last name.
          example: "Doe"
    ContentPackage:
      description: |
        A single package installed for a content item.
      type: object
      properties:
        language:
          type: string
          description: |
            The language ecosystem the package belongs to.
          example: "r"
        name:
          type: string
          description: |
            The package name.
          example: "shiny"
        version:
          type: string
          description: |
            The package version.
          example: "1.0.3"
        hash:
          type: string
          nullable: true
          description: |
            The package description hash for R packages. `null` for Python packages.
          example: "e4ac73dd20b2f6420742aac66e5d3e78"
    ContentPackages:
      description: |
        Lists the packages installed for a content item.
      type: array
      items:
        $ref: '#/components/schemas/Package'
    ContentRenderInstructions:
      description: |
        Instructions for rendering a content item.
      type: object
      properties:
        variant_key:
          type: string
          nullable: true
          description: |
            The key of the variant to render. If not specified, the default
            variant is rendered.
          example: "HidI2Kwq"
    ContentRenderTask:
      description: |
        The result of requesting a content render, containing a task identifier.
      type: object
      properties:
        task_id:
          type: string
          description: |
            Identifier for the created render task.
          example: "M49MsuXt6XVzlRdL"
    ContentResults:
      description: |
        Search results containing content items and pagination metadata.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The list of content items, paginated
              items:
                $ref: '#/components/schemas/Content'
            warnings:
              type: array
              description: |
                An optional list of warning messages generated during query
                processing. Warnings indicate issues with the search query that
                did not prevent the search from completing, such as invalid
                filter values. When a filter value is invalid, the filter is
                ignored and results are returned unfiltered for that field.
                This field is omitted when there are no warnings.
              example: ["Invalid value for 'published' filter: 'bogus'. Expected true or false"]
              items:
                type: string
    ContentSchedule:
      description: |
        Schedule information with variant details for a content item.
      allOf:
        - $ref: '#/components/schemas/Schedule'
        - type: object
          properties:
            variant:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/ScheduleVariant'
    ContentTag:
      description: |
        A tag associated with a content item.
      type: object
      properties:
        id:
          type: string
          description: |
            The identifier for this tag.
          example: "42"
        name:
          type: string
          description: |
            The name of this tag.
          example: "Finance"
        parent_id:
          type: string
          nullable: true
          description: |
            The identifier for the parent tag. If there is no parent tag, the
            value will be `null`.
          example: "12"
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this tag was created.
          example: "2006-01-02T15:04:05-07:00"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this tag was last updated.
          example: "2006-01-02T15:04:05-07:00"
    ContentTagInput:
      description: |
        The fields that must be specified when adding a tag to a content item.
      type: object
      properties:
        tag_id:
          type: string
          description: |
            The unique identifier for the tag.
          example: "101"
    ContentVisitEntry:
      description: |
        A content visit record.
      type: object
      properties:
        content_guid:
          type: string
          format: uuid
          description: |
            The GUID of the content this visit pertains to.
          example: "bd1d2285-6c80-49af-8a83-a200effe3cb3"
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The GUID of the user that visited the content. May be null when the content does not require a user session.
          example: "08e3a41d-1f8e-47f2-8855-f05ea3b0d4b2"
        variant_key:
          type: string
          nullable: true
          description: |
            The key of the variant the user visited. Null for static content.
          example: "HidI2Kwq"
        time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) when the user visited the content.
          example: "2018-09-15T18:00:00-05:00"
        rendering_id:
          type: string
          nullable: true
          description: |
            The ID of the rendering the user visited. Null for static content.
          example: "7"
        bundle_id:
          type: string
          nullable: true
          description: |
            The ID of the particular bundle used.
          example: "33"
        path:
          type: string
          nullable: true
          description: |
            The path requested by the user.
          example: "/logs"
        data_version:
          type: integer
          format: int32
          description: |
            The data version the record was recorded with.
          example: 1
        user_agent:
          type: string
          nullable: true
          description: |
            The user agent that made the request.
          example: "Mozilla/5.0"
    ContentVisitLogs:
      description: |
        Content visit results with keyset pagination.
      type: object
      properties:
        results:
          type: array
          description: |
            The content visit logs.
          items:
            $ref: '#/components/schemas/ContentVisitEntry'
        paging:
          description: |
            Paging information for navigating result sets.
          allOf:
            - $ref: '#/components/schemas/KeysetPaging'
    CreateContentInput:
      description: |
        The content fields that can be specified when creating a content item.
      type: object
      properties:
        name:
          type: string
          description: |
            A simple identifier. Allows alpha-numeric
            characters, periods (`"."`), hyphens (`"-"`), and underscores (`"_"`).
          example: "quarterly-analysis"
        title:
          type: string
          nullable: true
          description: |
            The title of this content.
          example: "Quarterly Analysis of Team Velocity"
        description:
          type: string
          description: |
            A rich description of this content.
          example: "This report calculates per-team statistics ..."
        access_type:
          type: string
          description: |
            Access type describes how this content manages its viewers. The
            value `all` is the most permissive; any visitor to Posit Connect
            will be able to view this content. The value `logged_in` indicates
            that all Posit Connect accounts may view the content. The `acl`
            value lets specifically enumerated users and groups view the
            content. Users configured as collaborators may always view content.

            Access types may be restricted by the Connect configuration or the
            product license.
          example: "acl"
          enum:
            - all
            - logged_in
            - acl
        connection_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            Maximum number of seconds allowed without data sent or received
            across a client connection. A value of `0` means connections will
            never time-out (not recommended). When `null`, the default
            [`Scheduler.ConnectionTimeout`](../admin/appendix/configuration/index.md#Scheduler.ConnectionTimeout) is used. Applies only to content types
            that are executed on demand.
          example: 3600
        read_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            Maximum number of seconds allowed without data received from a
            client connection. A value of `0` means a lack of client (browser)
            interaction never causes the connection to close. When `null`, the
            default [`Scheduler.ReadTimeout`](../admin/appendix/configuration/index.md#Scheduler.ReadTimeout) is used. Applies only to content
            types that are executed on demand.
          example: 3600
        init_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            The maximum number of seconds allowed for an interactive application
            to start. Posit Connect must be able to connect to a newly
            launched application before this threshold has
            elapsed. When `null`, the default [`Scheduler.InitTimeout`](../admin/appendix/configuration/index.md#Scheduler.InitTimeout) is used.
            Applies only to content types that are executed on demand.
          example: 60
        idle_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            The maximum number of seconds a worker process for an interactive
            application to remain alive after it goes idle (no active
            connections). When `null`, the default [`Scheduler.IdleTimeout`](../admin/appendix/configuration/index.md#Scheduler.IdleTimeout) is
            used. Applies only to content types that are executed on demand.
          example: 5
        max_processes:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the total number of concurrent processes allowed for a
            single interactive application per Posit Connect node. When `null`,
            the default [`Scheduler.MaxProcesses`](../admin/appendix/configuration/index.md#Scheduler.MaxProcesses) is used. Applies only to
            content types that are executed on demand.
          example: 3
        min_processes:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the minimum number of concurrent processes allowed for a
            single interactive application per Posit Connect node. When `null`,
            the default `Scheduler.MinProcesses` is used. Applies only to
            content types that are executed on demand.
          example: 0
        max_conns_per_process:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the maximum number of client connections allowed to an
            individual process. Incoming connections which will exceed this
            limit are routed to a new process or rejected. When `null`, the
            default [`Scheduler.MaxConnsPerProcess`](../admin/appendix/configuration/index.md#Scheduler.MaxConnsPerProcess) is used. Applies only to
            content types that are executed on demand.
          example: 20
        load_factor:
          type: number
          format: double
          nullable: true
          description: |
            Controls how aggressively new processes are spawned. When `null`,
            the default [`Scheduler.LoadFactor`](../admin/appendix/configuration/index.md#Scheduler.LoadFactor) is used. Applies only to content
            types that are executed on demand.
          example: 0.5
        default_r_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect should create and manage an R
            environment (installing required packages) for this content. When
            `null`, Connect makes this determination based on the server
            configuration.
          example: true
        default_py_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect should create and manage a Python
            environment (installing required packages) for this content. When
            `null`, Connect makes this determination based on the server
            configuration.
          example: true
        run_as:
          type: string
          nullable: true
          description: |
            The UNIX user that executes this content. When `null`, the default
            [`Applications.RunAs`](../admin/appendix/configuration/index.md#Applications.RunAs) is used. Applies only to executable content
            types - not `static`.
          example: "rstudio-connect"
        run_as_current_user:
          type: boolean
          nullable: true
          description: |
            Indicates that Connect should run processes for this content item
            under the Unix account of the user who visits it. Content accessed
            anonymously will continue to run as the specified `run_as` user.
          example: false
        memory_request:
          type: integer
          format: int64
          nullable: true
          description: |
            The minimum amount of RAM this content needs when executing or
            rendering, expressed in bytes. When `null`, the default
            [`Scheduler.MemoryRequest`](../admin/appendix/configuration/index.md#Scheduler.MemoryRequest) is used.
          example: 1073741824
        memory_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The maximum amount of RAM this content will be allowed to consume
            when executing or rendering, expressed in bytes. When `null`, the
            default [`Scheduler.MemoryLimit`](../admin/appendix/configuration/index.md#Scheduler.MemoryLimit) is used.
          example: 2147483648
        cpu_request:
          type: number
          format: double
          nullable: true
          description: |
            The minimum amount of compute power this content needs when executing
            or rendering, expressed in CPU Units, where 1.0 unit is equivalent to
            1 physical or virtual core. Fractional values are allowed. When `null`,
            the default [`Scheduler.CPURequest`](../admin/appendix/configuration/index.md#Scheduler.CPURequest) is used.
          example: 1.0
        cpu_limit:
          type: number
          format: double
          nullable: true
          description: |
            The maximum amount of compute power this content will be allowed to
            consume when executing or rendering, expressed in CPU Units. When
            `null`, the default [`Scheduler.CPULimit`](../admin/appendix/configuration/index.md#Scheduler.CPULimit) is used.
          example: 1.5
        amd_gpu_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The number of AMD GPUs allocated to run this content. When `null`,
            the default [`Scheduler.AMDGPULimit`](../admin/appendix/configuration/index.md#Scheduler.AMDGPULimit) is used.
          example: 1
        nvidia_gpu_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The number of NVIDIA GPUs allocated to run this content. When `null`,
            the default [`Scheduler.NvidiaGPULimit`](../admin/appendix/configuration/index.md#Scheduler.NvidiaGPULimit) is used.
          example: 1
        service_account_name:
          type: string
          nullable: true
          description: |
            The name of the Kubernetes service account used to run this content.
          example: "rstudio-connect-content"
        default_image_name:
          type: string
          nullable: true
          description: |
            The default container image used when none is defined by the bundle's
            manifest.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
        default_environment_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The default execution environment used when none is defined by the
            bundle's manifest.
          example: "36538b83-ea6d-4839-ae8e-53c52ac5f0bf"
        metrics_collection_enabled:
          type: boolean
          nullable: true
          description: |
            Controls whether per-job resource metrics are collected for this
            content item. When `null`, inherits the server-wide default.
          example: true
        notify_on_share:
          type: boolean
          nullable: true
          description: |
            Controls whether email notifications are sent by default when
            users or groups are added as collaborators or viewers.
            When `null`, inherits the server-wide default from
            [`Applications.NotifyOnShare`](../admin/appendix/configuration/index.md#Applications.NotifyOnShare).
          example: true
        trace_collection_enabled:
          type: boolean
          nullable: true
          description: |
            Controls whether per-job OpenTelemetry traces are collected for
            this content item. When `null`, inherits the server-wide default.
          example: false
    CreateEnvironmentInput:
      description: |
        The fields that can be specified when creating an environment.
      type: object
      properties:
        title:
          type: string
          nullable: true
          description: |
            A human readable title for this environment.
          example: "Project Alpha (R 4.1.1, Python 3.10)"
        description:
          type: string
          nullable: true
          description: |
            A human readable description of this environment.
          example: "This is my description of the environment"
        cluster_name:
          type: string
          description: |
            The cluster identifier for this environment.

            The value must be "Kubernetes" when Off Host Execution is enabled.
          example: "Kubernetes"
        name:
          type: string
          description: |
            The container image that will be used when executing content with this
            environment.
          example: "ghcr.io/rstudio/content-base:r4.1.3-py3.10.4-ubuntu1804"
        matching:
          type: string
          nullable: true
          description: |
            This field indicates how environments can be considered for selection
            when Posit Connect is choosing a compatible environment to use when
            executing content.

            `any` (the default) indicates that the image can be selected by Connect
            automatically,
            _or_ targeted in the bundle's manifest.

            `exact` indicates the image must be explicitly asked for in the bundle's
            manifest.

            `none` indicates that the image should never be selected by Posit Connect.
          example: "any"
        supervisor:
          type: string
          nullable: true
          description: |
            The path to the script or command that should be used as the
            [program
            supervisor](https://docs.posit.co/helm/rstudio-connect/kubernetes-howto/appendices/content_images.html#per-image-supervisors)
            when executing content with this environment.
          example: "/usr/local/bin/supervisor.sh"
        python:
          description: |
            The available Python installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        quarto:
          description: |
            The available Quarto installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        r:
          description: |
            The available R installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        tensorflow:
          description: |
            The available TensorFlow installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        volume_mounts:
          type: array
          description: |
            The volume mounts for this environment.
          items:
            $ref: '#/components/schemas/VolumeMount'
    CreateRunInput:
      description: |
        The fields to provide when running system checks.
      type: object
      properties:
        hostname:
          type: string
          nullable: true
          description: |
            The hostname where this test was run. Optional. Defaults to the host
          example: "connect.example.com"
    CurrentSchedule:
      type: object
      properties:
        schedule:
          description: |
            The schedule definition in RFC 5545 (iCalendar) format.
          allOf:
            - $ref: '#/components/schemas/RRuleSet'
        next_run:
          type: string
          format: date-time
          nullable: true
          description: |
            The next scheduled run time (RFC3339), or null if no future
            run is scheduled.
          example: "2024-01-17T14:00:00Z"
    CustomDocumentationInput:
      description: |
        The custom documentation for the Posit Connect server.
      type: object
      properties:
        content:
          type: string
          description: |
            The custom documentation content, formatted using Markdown.
        created_time:
          type: string
          format: date-time
          description: |
            The time when the custom documentation was created.
    CustomDocumentationResult:
      description: |
        The custom documentation for the Posit Connect server.
      type: object
      properties:
        content:
          type: string
          description: |
            The custom documentation content, formatted using Markdown.
        created_time:
          type: string
          format: date-time
          description: |
            The time when the custom documentation was created.
    DeleteRuntimeCacheInput:
      description: |
        Fields that describe the runtime cache to delete.
      type: object
      properties:
        language:
          type: string
          description: |
            The language of the target cache; either "R" or "Python".
          example: "R"
        version:
          type: string
          description: |
            The version of the target cache.
          example: "4.1.2"
        image_name:
          type: string
          description: |
            The execution environment of the target cache; either "Local" or an
            image name or identifier.
          example: "Local"
        dry_run:
          type: boolean
          description: |
            When true, check input but do not delete cache.
          example: true
    DeleteRuntimeCacheResponse:
      description: |
        The response from a cache deletion request.
      type: object
      properties:
        language:
          type: string
          description: |
            The runtime language of the target cache.
          example: "Python"
        version:
          type: string
          description: |
            The language version of the target cache.
          example: "3.8.12"
        image_name:
          type: string
          description: |
            The name of the target cache's execution environment.
          example: "Local"
        task_id:
          type: string
          nullable: true
          description: |
            The identifier for the created deployment task.
            Always `null` for dry-run requests.
          example: "M49MsuXt6XVzlRdL"
    EditableUser:
      description: |
        The editable user properties.
      type: object
      properties:
        email:
          type: string
          description: |
            The user's email
          example: "jon.doe@example.com"
        username:
          type: string
          description: |
            The user's username
          example: "jondoe"
        first_name:
          type: string
          description: |
            The user's first name
          example: "Jon"
        last_name:
          type: string
          description: |
            The user's last name
          example: "Doe"
        user_role:
          type: string
          description: |
            The user's role
          example: "administrator"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format)
            when the
            user was last updated in the Posit Connect server
          example: "2006-01-02T15:04:05-07:00"
    EmailSend:
      type: object
      properties:
        guid:
          type: string
          description: |
            Unique identifier for this email send.
          example: 3a8e8d6f-5b2a-4c9e-8f1d-2a3b4c5d6e7f
        rendering_id:
          description: |
            The rendering ID associated with this email send.
          allOf:
            - $ref: '#/components/schemas/storetypes.RenderingId'
        sent_at:
          type: string
          format: date-time
          description: |
            When the email was sent (RFC 3339 timestamp).
          example: 2026-03-13T10:30:00Z
        send_source:
          description: |
            How the email was triggered.
          allOf:
            - $ref: '#/components/schemas/store.EmailSendSource'
        success:
          type: boolean
          description: |
            Whether the email was sent successfully.
          example: true
    EmailSendListResponse:
      type: object
      properties:
        results:
          type: array
          description: |
            Array of email send records. Limited to the most recent 100 sends.
          items:
            $ref: '#/components/schemas/EmailSend'
        total_count:
          type: integer
          description: |
            Total number of email sends for this variant. May exceed the length of the results array if more than 100 sends exist.
          example: 150
    Environment:
      description: |
        An execution environment available to Posit Connect when Off Host Execution is enabled.
      type: object
      properties:
        id:
          type: string
          description: |
            The internal numeric identifier of this environment.
          example: "314"
        guid:
          type: string
          format: uuid
          description: |
            The unique identifier of this environment to be used with REST API requests.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this environment was created.
          example: "2006-01-02T15:04:05-07:00"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this environment was last updated.
          example: "2006-01-02T15:04:05-07:00"
        title:
          type: string
          nullable: true
          description: |
            A human readable title for this environment.
          example: "Project Alpha (R 4.1.1, Python 3.10)"
        description:
          type: string
          nullable: true
          description: |
            A human readable description of this environment.
          example: "This is my description of the environment"
        cluster_name:
          type: string
          description: |
            The cluster identifier for this environment.

            The value is always "Kubernetes" when Off Host Execution is enabled.
          example: "Kubernetes"
        name:
          type: string
          description: |
            The container image that will be used when executing content with this
            environment.
          example: "ghcr.io/rstudio/content-base:r4.1.3-py3.10.4-ubuntu1804"
        environment_type:
          type: string
          description: |
            The type of environment.

            The value is always "Kubernetes" when Off Host Execution is enabled.
          example: "Kubernetes"
        matching:
          type: string
          description: |
            This field indicates how environments can be considered for selection
            when Posit Connect is choosing a compatible environment to use when
            executing content.

            `any` (the default) indicates that the image can be selected by Connect
            automatically,
            _or_ targeted in the bundle's manifest.

            `exact` indicates the image must be explicitly asked for in the bundle's
            manifest.

            `none` indicates that the image should never be selected by Posit Connect.
          example: "any"
        supervisor:
          type: string
          nullable: true
          description: |
            The path to the script or command that should be used as the
            [program
            supervisor](https://docs.posit.co/helm/rstudio-connect/kubernetes-howto/appendices/content_images.html#per-image-supervisors)
            when executing content with this environment.
          example: "/usr/local/bin/supervisor.sh"
        managed_by:
          type: string
          nullable: true
          description: |
            Indicates which system manages this environment. A `null` value indicates
            the environment is not externally managed.
        python:
          description: |
            The available Python installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        quarto:
          description: |
            The available Quarto installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        r:
          description: |
            The available R installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        tensorflow:
          description: |
            The available TensorFlow installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        volume_mounts:
          type: array
          description: |
            The volume mounts for this environment.
          items:
            $ref: '#/components/schemas/VolumeMount'
    EnvironmentPermission:
      description: |
        Provides details about the relationship between the execution
        environment and the user or group that has access to it.
      type: object
      properties:
        id:
          type: string
          description: |
            The internal identifier for this permission entry.
          example: "101"
        guid:
          type: string
          format: uuid
          description: |
            The identifier for this permission entry.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        environment_guid:
          type: string
          format: uuid
          description: |
            The identifier of the execution environment.
          example: "62543474-5716-4423-92d1-b3a22163eb49"
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The identifier of the user listed in the permission entry.
            This field will be null if a group is listed.
          example: "d73f7343-02e8-4c52-9208-598e28f8002e"
        group_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The identifier of the group listed in the permission entry.
            This field will be null if a user is listed.
          example: "a46be0c8-ef75-4dce-b902-d8e56a6b8509"
    EnvironmentPermissionInput:
      description: |
        The fields that can be specified when adding permissions to an execution environment.
        Note that only one of user_guid or group_guid can be specified in a single request.
      type: object
      properties:
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The identifier of the user. Do not specify this field if you are adding a group.
          example: "89a3c946-d73c-4781-8463-dd3cccff3fef"
        group_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The identifier of the group. Do not specify this field if you are adding a user.
          example: "998f3356-96f0-48a2-9655-94334615fa5b"
    EnvironmentVariable:
      description: |
        Defines an environment variable and its value.
      type: object
      properties:
        name:
          type: string
          description: |
            Name of the environment variable.
          example: "DEBUG"
        value:
          type: string
          nullable: true
          description: |
            New value of the environment variable.
            A value of `null` will delete the environment variable.
          example: "1"
    EnvironmentVariableNames:
      description: |
        List of environment variable names, without values.
      type: array
      items:
        type: string
    EnvironmentVariables:
      description: |
        List of environment variables with their values.
      type: array
      items:
        $ref: '#/components/schemas/EnvironmentVariable'
    Feature:
      description: |
        Details about a tracked feature.
      type: object
      properties:
        name:
          type: string
          description: |
            Name of the feature flag.
        used:
          type: boolean
          description: |
            Whether or not this feature has been used.
    GitLocationInput:
      description: |
        Git location associated with a content item.
      type: object
      properties:
        repository:
          type: string
          description: |
            URL for the repository.
          example: "https://github.com/rstudio/connect-examples"
        branch:
          type: string
          description: |
            The tracked Git branch.
          example: "main"
        directory:
          type: string
          description: |
            Directory containing the content.
          example: "stock-report"
        polling:
          type: boolean
          description: |
            Indicates that the Git repository should be regularly polled.
          example: false
    GitLocationOutput:
      description: |
        Git location associated with a content item.
      type: object
      properties:
        repository:
          type: string
          description: |
            URL for the repository.
          example: "https://github.com/rstudio/connect-examples"
        branch:
          type: string
          description: |
            The tracked Git branch.
          example: "main"
        directory:
          type: string
          description: |
            Directory containing the content.
          example: "stock-report"
        polling:
          type: boolean
          description: |
            Indicates that the Git repository is regularly polled.
          example: false
        last_error:
          type: string
          description: |
            The last error encountered when polling the Git repository, if one occurred.
          example: "The requested operation requires authentication."
        last_known_commit:
          type: string
          description: |
            The last known commit in the Git repository.
          example: "a8906feae5c7675b934b7d22eb5fbd12ce51f1ba"
        last_fetched_time:
          type: string
          format: date-time
          description: |
            The last time the Git repository was fetched.
          example: "2026-04-14T12:00:00Z"
    Group:
      description: |
        A group object.
      allOf:
        - $ref: '#/components/schemas/ServiceToken'
        - type: object
          properties:
            guid:
              type: string
              format: uuid
              description: |
                The unique identifier
              example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
    GroupCreateInput:
      description: |
        The fields that can be specified when creating a group.
      type: object
      properties:
        name:
          type: string
          description: |
            The group's desired name
          example: "marketing"
        unique_id:
          type: string
          description: |
            Applies to SAML, OAuth2 and Proxied authentication when
            the setting `GroupsByUniqueId` is enabled. This field
            must not be present otherwise.
        gid:
          type: integer
          format: int64
          nullable: true
          description: |
            The POSIX Group ID (GID) for
            [current user execution](../admin/process-management/index.md#runas-current).
            Only administrators can set this field, and only when using
            SAML or OAuth2 authentication. Must be a positive integer
            and unique across all groups.
          example: 1001
    GroupCreateRemoteInput:
      description: |
        The fields that must be specified when creating a remote group.
      type: object
      properties:
        temp_ticket:
          type: string
          description: |
            The temporary ticket used for creating a group on the
            Posit Connect server. It is obtained from the
            [GET /v1/groups/remote](#searchRemoteGroups) endpoint.
    GroupMember:
      description: |
        A group member (user).
      allOf:
        - $ref: '#/components/schemas/User'
        - type: object
          properties:
    GroupMemberAddInput:
      description: |
        The fields that must be specified when adding a member to a group.
      type: object
      properties:
        user_guid:
          type: string
          format: uuid
          description: |
            The user's unique identifier
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
    GroupMembers:
      description: |
        The group members list with paging information.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The group members list
              items:
                $ref: '#/components/schemas/GroupMember'
    GroupOutput:
      description: |
        Common group fields shared across group representations.
      type: object
      properties:
        name:
          type: string
          description: |
            The group name
          example: "accounting"
        owner_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The group owner's unique identifier. When using LDAP, or
            SAML/OAuth2 with group provisioning enabled, this will be null.
        gid:
          type: integer
          format: int64
          nullable: true
          description: |
            The POSIX Group ID (GID) used for
            [current user execution](../admin/process-management/index.md#runas-current).
          example: 1001
    GroupOwnershipContent:
      description: |
        Content item with access control details for a group.
      type: object
      properties:
        content_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of the content item.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        content_name:
          type: string
          description: |
            The name of the content item.
        content_title:
          type: string
          description: |
            The title of the content item.
        access_type:
          type: string
          description: |
            The access type of the content item.
          example: "acl"
        permissions:
          type: array
          description: |
            List of principals (users and groups) with access to the content.
            The owner is listed as `author` and is always present.
          items:
            $ref: '#/components/schemas/GroupOwnershipPermission'
    GroupOwnershipPermission:
      description: |
        A principal with access to a content item.
      type: object
      properties:
        principal_guid:
          type: string
          format: uuid
          description: |
            The identifier of the principal (user or group) with access to the content.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        principal_name:
          type: string
          description: |
            The name of the principal (user or group) with access to the content.
        principal_role:
          type: string
          description: |
            The role of the principal (user or group) with access to the content.
          example: "author"
        principal_type:
          type: string
          description: |
            The type of the principal (user or group) with access to the content.
          example: "user"
    GroupPatchInput:
      description: |
        The fields that can be specified when partially updating a group.
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: |
            The group's new name. Cannot be empty or `null`, and must be
            at most 4096 characters. Names must be unique, except for
            SAML, OAuth2, and Proxied authentication when `GroupsByUniqueId`
            is enabled.
          example: "engineering"
        owner_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The new owner's unique identifier. Must reference an existing
            user who is not a viewer. Can be set to `null` to remove the
            owner for SAML, OAuth2, and Proxied authentication when
            `GroupsAutoProvision` is enabled.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        gid:
          type: integer
          format: int32
          nullable: true
          description: |
            The POSIX Group ID (GID) for
            [current user execution](../admin/process-management/index.md#runas-current).
            Must be a positive integer and unique across all groups. Set
            to `null` to remove the GID.
          example: 1001
    GroupRemoteSearch:
      description: |
        The remote group search results with paging information.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The groups list
              items:
                $ref: '#/components/schemas/GroupWithTicket'
    GroupUpdateInput:
      description: |
        The fields that can be specified when updating a group.
      type: object
    GroupWithTicket:
      description: |
        A group object with a temporary ticket for remote group creation.
      type: object
      properties:
        name:
          type: string
          description: |
            The group name
          example: "accounting"
        guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The group's unique identifier in
            [RFC4122](https://tools.ietf.org/html/rfc4122) format. When
            a group does not exist in the Posit Connect server, this
            property will be `null`.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        temp_ticket:
          type: string
          description: |
            This value is for actions that require a `temp_ticket`, such
            as adding an LDAP group to the Connect server.
    Groups:
      description: |
        The groups list with paging information.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The groups list
              items:
                $ref: '#/components/schemas/Group'
    HistorySchedule:
      type: object
      properties:
        schedule:
          description: |
            The schedule definition in RFC 5545 (iCalendar) format.
          allOf:
            - $ref: '#/components/schemas/RRuleSet'
    Host:
      description: |
        The fields returned when listing Connect hosts.
      type: object
      properties:
        hostname:
          type: string
          description: |
            The hostname or node name configured for the host.
          example: "connect.example.com"
        version:
          type: string
          description: |
            The version of Connect running on the host.
          example: "2021.10.0"
        last_seen:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) of when this host last checked in.
          example: "2006-01-02T15:04:05-07:00"
    Installation:
      description: |
        An instance of an interpreter within an execution environment.
      type: object
      properties:
        version:
          type: string
          description: |
            The semantic version of the interpreter.
          example: "3.6.3"
        path:
          type: string
          description: |
            The absolute path to the interpreter's executable.
          example: "/opt/R/3.6.3/bin/R"
    Installations:
      description: |
        A list of language installations available to an environment.
      type: object
      properties:
        installations:
          type: array
          description: |
            The list of language installations.
          items:
            $ref: '#/components/schemas/Installation'
    Job:
      description: |
        A job record representing a content execution.
      type: object
      properties:
        id:
          type: string
          description: |
            The job identifier.
          example: "54"
        ppid:
          type: string
          nullable: true
          description: |
            The job's parent process identifier.
          example: "20253"
        pid:
          type: string
          description: |
            The job's process identifier.
          example: "20253"
        key:
          type: string
          description: |
            The job's unique key identifier.
          example: "tHawGvHZTosJA2Dx"
        remote_id:
          type: string
          nullable: true
          description: |
            The job's identifier for off-host execution configurations.
          example: "S3ViZXJuZXRlczpyZW5kZXItci1tYXJrZG93bi1zaXRlLWtnODJo"
        app_id:
          type: string
          description: |
            This field is deprecated and has been renamed to `content_id`.
          example: "54"
        content_id:
          type: string
          description: |
            The identifier for this job's parent content.
          example: "54"
        content_guid:
          type: string
          description: |
            The unique identifier for this job's content.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        variant_id:
          type: string
          description: |
            The identifier of the variant owning this job.
          example: "54"
        variant_key:
          type: string
          description: |
            The key of the variant owning this job. May be empty
            if the variant is no longer available.
          example: "HidI2Kwq"
        bundle_id:
          type: string
          description: |
            The identifier of a content bundle linked to this job.
          example: "54"
        start_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this job started.
          example: "2006-01-02T15:04:05-07:00"
        end_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The timestamp (RFC3339) indicating when this job finished.
          example: "2006-01-02T15:04:05-07:00"
        last_heartbeat_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The timestamp (RFC3339) indicating the last time
            this job was observed to be running.
          example: "2006-01-02T15:04:05-07:00"
        queued_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The timestamp (RFC3339) indicating when this job was added to the queue
            to be processed. Only scheduled reports will present a value for this field.
          example: "2006-01-02T15:04:05-07:00"
        queue_name:
          type: string
          nullable: true
          description: |
            The name of the queue which processes the job. Only scheduled reports
            will present a value for this field.
          example: "default"
        tag:
          type: string
          description: |
            A tag to identify the nature of the job. It can be one of `unknown`,
            `build_report`, `build_site`, `build_jupyter`, `packrat_restore`,
            `python_restore`, `configure_report`, `run_app`, `run_api`,
            `run_tensorflow`, `run_python_api`, `run_dash_app`,
            `run_streamlit`, `run_bokeh_app`, `run_panel_app`, `run_fastapi_app`,
            `run_gradio_app`,
            `run_pyshiny_app`, `render_shiny`, `run_voila_app`, `testing`,
            `git`, `val_py_ext_pkg`, `val_r_ext_pkg`, `val_r_install`.
          example: "build_report"
        exit_code:
          type: integer
          format: int64
          nullable: true
          description: |
            The job's exit code. Present only when job is finished.
          example: 0
        error:
          type: string
          nullable: true
          description: |
            The error message if the job failed due to an unexpected server error.
        status:
          type: integer
          description: |
            The current status of the job. It can be one of Active: `0`, Finished: `1`,
            Finalized: `2`, Skipped: `3`.
          example: 0
        hostname:
          type: string
          nullable: true
          description: |
            The name of the node which processes the job.
          example: "connect"
        cluster:
          type: string
          nullable: true
          description: |
            The location where this content runs. Content running on the same
            server as Connect will have either a `null` value or the string
            `Local`. Gives the name of the cluster when run external to the
            Connect host.
          example: "Kubernetes"
        image:
          type: string
          nullable: true
          description: |
            The location where this content runs. Content running on the
            same server as Connect will have either a `null` value or the string
            `Local`. References the name of the target image when content runs
            in a clustered environment such as Kubernetes.
          example: "someorg/image:jammy"
        run_as:
          type: string
          nullable: true
          description: |
            The UNIX user that executed this job.
          example: "rstudio-connect"
        skip_reason:
          type: string
          nullable: true
          description: |
            The reason why this job was skipped. Only present for jobs with a
            skipped status (e.g., when a duplicate job was already queued).
          example: "duplicate job already queued"
    JobMetrics:
      description: |
        Resource usage metrics collected for a job.
      type: object
      properties:
        content_guid:
          type: string
          description: |
            The unique identifier for the content item.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        job_key:
          type: string
          description: |
            The job's unique key identifier.
          example: "tHawGvHZTosJA2Dx"
        samples:
          type: array
          description: |
            Array of metric samples collected during job execution.
            May be empty if no metrics were collected.
          items:
            $ref: '#/components/schemas/MetricSample'
    JobSummary:
      description: |
        Aggregated job statistics with totals and time-bucketed histogram for scheduled jobs only.
      type: object
      properties:
        totals:
          description: |
            Aggregated total counts of scheduled jobs by status.
          allOf:
            - $ref: '#/components/schemas/JobSummaryTotals'
        buckets:
          type: array
          description: |
            Time-series histogram of scheduled job outcomes. Each bucket represents a
            time interval
            with counts of succeeded and failed scheduled jobs. The bucket interval is
            automatically
            determined based on the query time range (5 minutes to 30 days).
          items:
            $ref: '#/components/schemas/JobSummaryBucket'
    JobSummaryBucket:
      description: |
        A single time bucket in the scheduled job history histogram.
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: |
            The start time of this bucket (RFC3339). Scheduled jobs with start_time in
            the interval
            [timestamp, timestamp+interval) are counted in this bucket.
          example: "2026-01-26T00:00:00Z"
        failed:
          type: integer
          description: |
            Number of scheduled jobs in this bucket that failed.
          example: 4
        succeeded:
          type: integer
          description: |
            Number of scheduled jobs in this bucket that succeeded.
          example: 100
        skipped:
          type: integer
          description: |
            Number of scheduled jobs in this bucket that were skipped. Note: skipped
            jobs are tracked from Connect version 2026.03.0 onward.
          example: 1
    JobSummaryTotals:
      description: |
        Total counts of scheduled jobs by status.
      type: object
      properties:
        waiting:
          type: integer
          description: |
            Number of scheduled jobs queued but not yet started. For time ranges in the
            past, this will be 0.
          example: 3
        running:
          type: integer
          description: |
            Number of currently executing scheduled jobs. For time ranges in the past,
            this will be 0.
          example: 1
        succeeded:
          type: integer
          description: |
            Number of scheduled jobs that completed successfully (exit code 0).
          example: 287
        failed:
          type: integer
          description: |
            Number of scheduled jobs that failed (non-zero exit code).
          example: 5
        skipped:
          type: integer
          description: |
            Number of scheduled jobs that were skipped. Note: skipped jobs are tracked
            from Connect version 2026.03.0 onward.
          example: 2
    KeysetPaging:
      description: |
        Keyset-based pagination metadata with cursors and navigation links.
      allOf:
        - $ref: '#/components/schemas/PagingLinks'
        - type: object
          properties:
            cursors:
              description: |
                Cursor values for navigating between pages.
              allOf:
                - $ref: '#/components/schemas/PagingCursors'
    KillJobOrder:
      description: |
        The result of registering an order to kill a job.
      type: object
      properties:
        guid:
          type: string
          description: |
            The unique identifier for the registered kill order.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        app_id:
          type: integer
          format: int64
          description: |
            This field is deprecated and has been renamed to `content_id`.
          example: 54
        app_guid:
          type: string
          description: |
            This field is deprecated and has been renamed to `content_guid`.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        content_id:
          type: string
          description: |
            The identifier for this job's parent content.
          example: "54"
        content_guid:
          type: string
          description: |
            The unique identifier for this job's content.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        job_id:
          type: integer
          format: int64
          description: |
            The job's id
          example: 54
        job_key:
          type: string
          description: |
            The job's unique key identifier.
          example: "tHawGvHZTosJA2Dx"
        result:
          type: string
          description: |
            A short message describing the end result.
          example: "Order to kill job registered"
    LockUserInput:
      description: |
        The fields that must be specified when locking or unlocking a user.
      type: object
      properties:
        locked:
          type: boolean
          nullable: true
          description: |
            Whether or not the user should be locked.
          example: true
    LogEntries:
      description: |
        Log entries for a job.
      type: object
      properties:
        entries:
          type: array
          description: |
            The list of log entries.
          items:
            $ref: '#/components/schemas/LogEntry'
    LogEntry:
      description: |
        A single log entry.
      type: object
      properties:
        source:
          type: string
          description: |
            The source of the log entry. `stdout` or `stderr`.
          example: "stdout"
        timestamp:
          type: string
          format: date-time
          nullable: true
          description: |
            The timestamp (RFC3339) indicating when this log entry was recorded.
          example: "2006-01-02T15:04:05-07:00"
        data:
          type: string
          description: |
            The log entry content.
          example: "Running on host: connect"
    LoggedError:
      description: |
        The primary error of a job.
      type: object
      properties:
        code:
          type: string
          description: |
            The error code.
        summary:
          type: string
          description: |
            Summary of the error.
        help_url:
          type: string
          description: |
            A help URL with further information about the error.
    MetricSample:
      description: |
        A single resource usage sample for a job process.
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) when this sample was recorded.
          example: "2006-01-02T15:04:05-07:00"
        cpu_fraction:
          type: number
          format: double
          description: |
            CPU usage as a fraction (0.0 to 1.0 per core).
          example: 0.25
        memory_bytes:
          type: integer
          format: int64
          description: |
            Memory usage in bytes.
          example: 104857600
        connections:
          type: integer
          format: int64
          nullable: true
          description: |
            Number of active connections to the process.
            May be null if connection counting is not available.
          example: 5
        process_id:
          type: integer
          description: |
            The process ID being monitored.
          example: 12345
    NodeJsInfo:
      description: |
        This defines the top-level object that describes the data returned by the server.
        It contains information about each installation of Node.js that is known.
      type: object
      properties:
        installations:
          type: array
          description: |
            The array of information about Posit Connect's Node.js installations.
          items:
            $ref: '#/components/schemas/NodeJsInstallation'
        enabled:
          type: boolean
          description: |
            A `true` value is returned only when Node.js support is enabled in
            Connect and Node.js content is permitted by the product license
            (Advanced tier or Evaluation). It will be `false` in all other cases.
    NodeJsInstallation:
      description: |
        This defines the information provided by the server about a single installation of Node.js.
      type: object
      properties:
        version:
          type: string
          description: |
            The version number of this Node.js installation.
          example: "22.11.0"
        cluster_name:
          type: string
          description: |
            The cluster that contains this Node.js installation.
            A value of `Local` indicates that the Node.js installation is local to the
            Posit Connect server.
          example: "Kubernetes"
        image_name:
          type: string
          description: |
            The image that contains this Node.js installation.
            A value of `Local` indicates that the Node.js installation is local to the
            Posit Connect server.
          example: "Local"
    OAuthCredentials:
      type: object
      properties:
        access_token:
          type: string
          nullable: true
          description: |
            The user's token which is accepted by the external resource. If
            `issued_token_type` is `urn:ietf:params:aws:token-type:credentials`, then
            this field will contain base64-encoded JSON containing temporary AWS
            credentials.

            https://datatracker.ietf.org/doc/html/rfc8693#section-2.2.1-2.2
        issued_token_type:
          type: string
          nullable: true
          description: |
            The type of token stored in the access_token field.

            https://datatracker.ietf.org/doc/html/rfc8693#section-2.2.1-2.4
          example: "urn:ietf:params:oauth:token-type:access_token"
        token_type:
          type: string
          nullable: true
          description: |
            The method by which the access_token should be provided to the external
            resource.

            https://datatracker.ietf.org/doc/html/rfc8693#section-2.2.1-2.6
          example: "Bearer"
        expires_in:
          type: integer
          format: int64
          nullable: true
          description: |
            The remaining time before the returned token expires, expressed in seconds.

            This value is only returned if expiry information is available for the
            token. For example, if an external OAuth service does not provide expiry
            information to Connect, this value can't be returned in the response.

            Token expiration is calulated relative to the current UTC time, *not* local
            time.

            https://datatracker.ietf.org/doc/html/rfc8693#section-2.2.1-2.8
          example: 3600
    OAuthIntegration:
      description: |
        OAuthIntegration represents a custom OAuth integration available in Posit Connect.
      type: object
      properties:
        id:
          type: string
          description: |
            The internal numeric identifier of this OAuth integration.
          example: "123"
        guid:
          type: string
          format: uuid
          description: |
            The unique identifier of this OAuth integration which is used in REST API
            requests.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this OAuth integration was created.
          example: "2006-01-02T15:04:05-07:00"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this OAuth integration was last
            updated.
          example: "2006-01-02T15:04:05-07:00"
        name:
          type: string
          nullable: true
          description: |
            A descriptive name to identify each OAuth integration.
        description:
          type: string
          nullable: true
          description: |
            A brief text to describe each OAuth integration.
          example: "Integration with external system"
        template:
          type: string
          nullable: true
          description: |
            The template to use to configure this OAuth integration. See List OAuth
            templates for more information.
          example: "custom"
        auth_type:
          type: string
          nullable: true
          description: |
            The authentication type indicates which OAuth flow is used by this
            integration. The "Viewer" authentication type corresponds to the
            Authorization Code flow. The "Service Account" authentication type
            corresponds to the Client Credentials flow.
          example: "Viewer"
        config:
          type: object
          description: |
            The OAuth integration configuration based on the template. See List OAuth
            templates for more
            information on available fields for each template. The configuration
            combines elements from both
            options and fields from a given template.

            For example, given the following template section:

            ```
            ...
            "options": [{
            ...
            "name": "auth_mode",
            "type": "select",
            "values": ["Confidential", "Public"]
            },
            ...
            }],
            "fields": [{
            ...
            "name": "client_id",
            "label": "Client ID"
            },
            ...
            }]
            ...
            ```

            A valid OAuthIntegration `config` would be:

            ```
            {
            ...
            "config": {
            "auth_mode": "Public",
            "client_id": "1b9b9733-43f5-4848-a894-f753f2fbaf41",
            ...
            }
            }
            ```
        permissions:
          type: array
          description: |
            A list of permission records that define which users or groups have access
            to this OAuth integration.
          items:
            $ref: '#/components/schemas/OAuthIntegrationPermission'
        environment_variables:
          type: array
          description: |
            The names of the environment variables provisioned by this OAuth integration.
          items:
            type: string
    OAuthIntegrationAssociationInput:
      description: |
        An OAuth integration GUID to associate with a content item.
      type: object
      properties:
        oauth_integration_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of an existing OAuth integration.
          example: "f4b3d7f6-7e1d-4f3b-8b9e-3f0f3f3f3f3f"
    OAuthIntegrationAssociationOutput:
      description: |
        Represents an association between a content item and an OAuth integration.
      type: object
      properties:
        app_guid:
          type: string
          format: uuid
          description: |
            This field is deprecated and has been renamed to `content_guid`.
          example: "f4b3d7f6-7e1d-4f3b-8b9e-3f0f3f3f3f3f"
        content_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of the content item.
          example: "f4b3d7f6-7e1d-4f3b-8b9e-3f0f3f3f3f3f"
        oauth_integration_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of an existing OAuth integration.
          example: "f4b3d7f6-7e1d-4f3b-8b9e-3f0f3f3f3f3f"
        oauth_integration_name:
          type: string
          nullable: true
          description: |
            A descriptive name that identifies the OAuth integration.
          example: "Databricks Integration"
        oauth_integration_description:
          type: string
          nullable: true
          description: |
            A brief text that describes the OAuth integration.
          example: "Integration with external system"
        oauth_integration_template:
          type: string
          nullable: true
          description: |
            The template used to configure this OAuth integration.
          example: "custom"
        oauth_integration_auth_type:
          type: string
          nullable: true
          description: |
            Indicates which OAuth flow is used by this integration. The
            "Viewer" authentication type corresponds to the Authorization Code
            flow. The "Service Account" authentication type corresponds to the
            Client Credentials flow.
          example: "Viewer"
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this association was created.
          example: "2006-01-02T15:04:05-07:00"
    OAuthIntegrationInput:
      description: |
        The fields that can be specified when creating an OAuth integration.
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: |
            A descriptive name to identify each OAuth integration.
          example: "Databricks Integration"
        description:
          type: string
          nullable: true
          description: |
            A brief text to describe each OAuth integration.
          example: "Integration with external system"
        template:
          type: string
          description: |
            The template to use to configure this OAuth integration. See List OAuth
            templates for more information.
          example: "custom"
        config:
          type: object
          description: |
            The OAuth integration configuration based on the template.
            See List OAuth templates for more information on available fields for each
            template.
            The configuration combines elements from both options and fields from a
            given template.

            For example, given the following OAuthTemplateOptions:

            ```
            ...
            "options": [{
            ...
            "name": "auth_mode",
            "type": "select",
            "values": ["Confidential", "Public"]
            },
            ...
            }],
            "fields": [{
            ...
            "name": "client_id",
            "label": "Client ID"
            },
            ...
            }]
            ...
            ```

            A valid OAuthIntegration `config` would be:

            ```
            {
            ...
            "config": {
            "auth_mode": "Public",
            "client_id": "1b9b9733-43f5-4848-a894-f753f2fbaf41",
            ...
            }
            }
            ```
        permissions:
          type: array
          nullable: true
          description: |
            An optional list of permissions to grant access to this OAuth integration.
            Each permission record specifies a user or group that can access the
            integration.
          items:
            $ref: '#/components/schemas/OAuthIntegrationPermissionInput'
    OAuthIntegrationPermission:
      description: |
        Represents a permission record associated with an OAuth integration that
        defines which users or groups can access the integration.
      type: object
      properties:
        id:
          type: string
          description: |
            The internal identifier for this permission entry.
          example: "101"
        guid:
          type: string
          format: uuid
          description: |
            The identifier for this permission entry.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        integration_guid:
          type: string
          format: uuid
          description: |
            The identifier of the OAuth integration.
          example: "62543474-5716-4423-92d1-b3a22163eb49"
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The identifier of the user listed in the permission entry.
            This field will be null if a group is listed.
          example: "d73f7343-02e8-4c52-9208-598e28f8002e"
        group_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The identifier of the group listed in the permission entry.
            This field will be null if a user is listed.
          example: "a46be0c8-ef75-4dce-b902-d8e56a6b8509"
    OAuthIntegrationPermissionInput:
      description: |
        The fields that can be specified when adding permissions to an OAuth integration.
        Note that only one of user_guid or group_guid can be specified in a single request.
      type: object
      properties:
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The identifier of the user. Do not specify this field if you
            are adding a group.
          example: "89a3c946-d73c-4781-8463-dd3cccff3fef"
        group_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The identifier of the group. Do not specify this field if you
            are adding a user.
          example: "998f3356-96f0-48a2-9655-94334615fa5b"
    OAuthIntegrationUpdate:
      description: |
        The fields that can be specified when updating an OAuth integration.
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: |
            A descriptive name to identify each OAuth integration.
          example: "databricks"
        description:
          type: string
          nullable: true
          description: |
            A brief text to describe each OAuth integration.
          example: "Integration with external system"
        config:
          type: object
          description: |
            The OAuth integration configuration based on the template.
            See List OAuth templates for more information on available fields for each
            template.
            The configuration combines elements from both options and fields from a
            given template.

            For example, given the following OAuthTemplateOptions:

            ```
            ...
            "options": [{
            ...
            "name": "auth_mode",
            "type": "select",
            "values": ["Confidential", "Public"]
            },
            ...
            }],
            "fields": [{
            ...
            "name": "client_id",
            "label": "Client ID"
            },
            ...
            }]
            ...
            ```

            A valid OAuthIntegration `config` would be:

            ```
            {
            ...
            "config": {
            "auth_mode": "Public",
            "client_id": "1b9b9733-43f5-4848-a894-f753f2fbaf41",
            ...
            }
            }
            ```
        permissions:
          type: array
          nullable: true
          description: |
            An optional list of permissions to grant access to this OAuth integration.
            Each permission record specifies a user or group that can access the
            integration.
            When provided, this replaces the existing permissions for the integration.
          items:
            $ref: '#/components/schemas/OAuthIntegrationPermissionInput'
    OAuthSession:
      description: |
        OAuthSession represents an OAuth session for a given user associated to an OAuth integration.
      type: object
      properties:
        id:
          type: string
          description: |
            The internal numeric identifier of this OAuth session.
          example: "123"
        guid:
          type: string
          format: uuid
          description: |
            The unique identifier of this OAuth session which is used in REST API
            requests.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The unique identifier of the user that is associated with this OAuth
            session.
          example: "21caced7-979e-4e83-ad11-01837528d9d9"
        oauth_integration_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of the OAuth integration that is associated with this
            OAuth session.
          example: "dd4a5e2-4714-401a-9404-4ca8eddcef2d"
        has_refresh_token:
          type: boolean
          description: |
            Indicates whether this OAuth session has a refresh token.
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this OAuth session was created.
          example: "2020-01-02T15:04:05-07:00"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this OAuth session was last updated.
          example: "2020-01-02T15:04:05-07:00"
    OAuthTemplate:
      description: |
        OAuthTemplate holds the set of available fields that can be configured when creating
        or updating an OAuth integration in Posit Connect.
      type: object
      properties:
        id:
          type: string
          description: |
            The primary identifier for this OAuth template.
          example: "custom"
        name:
          type: string
          description: |
            A human readable name for this OAuth template.
          example: "Custom Integration"
        description:
          type: string
          description: |
            A human readable description for this OAuth template.
          example: "A Custom integration is used to create OAuth integrations of any type"
        sections:
          type: array
          description: |
            The sections of the template are used to group fields and options when
            building the UI.
          items:
            $ref: '#/components/schemas/OAuthTemplateSection'
        options:
          type: array
          description: |
            The options of the template are used to define the set of boolean and
            drop-down inputs that the user configures when creating an OAuth
            integration.
          items:
            $ref: '#/components/schemas/OAuthTemplateOption'
        fields:
          type: array
          description: |
            The fields of the template are used to define the set of text inputs that
            the user configures when creating an OAuth integration.
          items:
            $ref: '#/components/schemas/OAuthTemplateField'
        environment_variables:
          type: array
          description: |
            The names of environment variables associated with this OAuth template.
          items:
            type: string
    OAuthTemplateField:
      description: |
        OAuthTemplateField defines a configuration field for the template.
      type: object
      properties:
        name:
          type: string
          description: |
            The primary identifier of the field. The name is used as the map kay in the
            `config` property of the OAuth integration payload.
            The type in the `config` payload must be a string.

            For example, given the following OAuthTemplateField:

            ```
            {
            ...
            "name": "client_id"
            }
            ```

            A valid OAuthIntegration `config` would be:

            ```
            {
            ...
            "config": {
            "client_id": "my-oauth-app-client-id"
            }
            }
            ```
        description:
          type: string
          description: |
            A description of the template field.
        section:
          type: integer
          format: int32
          description: |
            A reference to the template section that should contain this field.
        order:
          type: integer
          format: int32
          description: |
            The order of this field within the template section relative to other
            options and fields within the section.
        label:
          type: string
          description: |
            The label to use for this field.
        visibility_expression:
          nullable: true
          description: |
            A Boolean expression tree that indicates if this field is visible.
          allOf:
            - $ref: '#/components/schemas/OAuthTemplateVisibilityExpression'
        default:
          type: string
          description: |
            The default value of this template field.
        validation:
          type: string
          description: |
            A regular expression used to determine whether the input is valid.
        validation_description:
          type: string
          description: |
            A description of the value constraints for a given field.
        secret:
          type: boolean
          description: |
            Indicates whether the field value is considered secret and should be hidden.
        multiline:
          type: boolean
          description: |
            Indicates whether the field accepts multiline text input.
    OAuthTemplateOption:
      description: |
        OAuthTemplateOption defines a configuration option for the template.
      type: object
      properties:
        name:
          type: string
          description: |
            The primary identifier of the template option. The name is used as the map
            key in the `config` property of the OAuth integration payload.
            The type in the `config` payload must correspond to the `type` property of
            the template option, either string or boolean.

            For example, given the following OAuthTemplateOptions:

            ```
            [{
            ...
            "name": "auth_mode",
            "type": "select",
            "values": ["Confidential", "Public"]
            },
            {
            ...
            "name": "bool_option",
            "type": "bool",
            }]
            ```

            A valid OAuthIntegration `config` would be:

            ```
            {
            ...
            "config": {
            "auth_mode": "Public",
            "bool_option": true
            }
            }
            ```
        description:
          type: string
          description: |
            A description of the template option.
        section:
          type: integer
          format: int32
          description: |
            A reference to the template section that should contain this option.
        order:
          type: integer
          format: int32
          description: |
            The order of this option within the template section relative to other
            options and fields within the section.
        label:
          type: string
          description: |
            The label to use for this option.
        visibility_expression:
          nullable: true
          description: |
            A Boolean expression tree that indicates if this option is visible.
          allOf:
            - $ref: '#/components/schemas/OAuthTemplateVisibilityExpression'
        type:
          type: string
          description: |
            The type of this option. A bool indicates that this option is a true/false
            input. A select indicates that this option is a dropdown input.
        values:
          type: array
          description: |
            A list of possible values when type = select.
          items:
            type: string
        default:
          type: object
          description: |
            The default value of this option. The default value is either a boolean when
            type = bool, or a string when type = select.
            When type = select, the default value must also be contained in the values
            list.
          example: "Public"
    OAuthTemplateSection:
      description: |
        OAuthTemplateSection defines a section within an OAuth template used to group options and fields when building the UI.
      type: object
      properties:
        id:
          type: integer
          format: int32
          description: |
            The primary identifier of the template section.
        order:
          type: integer
          format: int32
          description: |
            The order of this section relative to other sections within the OAuth
            template.
        name:
          type: string
          description: |
            The name of this section.
        description:
          type: string
          description: |
            The description of this section.
    OAuthTemplateVisibilityExpression:
      description: |
        A Boolean expression tree that indicates if a specific option or field is allowed by the integration.
      type: object
      properties:
        name:
          type: string
          description: |
            The name of a config field being compared. Name is only set on leaf nodes in
            the expression tree.
          example: "auth_mode"
        value:
          type: object
          description: |
            The value which a config field is compared against. Value is only set on
            leaf nodes in the expression tree.
          example: "Public"
        operator:
          type: string
          description: |
            A boolean operator which executes against the provided list of operands.
            Operator is only set on non-leaf nodes in the expression tree.
          example: "and"
        operands:
          type: array
          description: |
            A list of recursively-defined expression tree nodes which are executed on by
            a boolean operator. Operands is only set on non-leaf nodes in the expression
            tree.
          items:
            $ref: '#/components/schemas/OAuthTemplateVisibilityExpression'
    OffsetPaging:
      description: |
        Offset-based pagination metadata.
      type: object
      properties:
        current_page:
          type: integer
          format: int32
          description: |
            The current page of results
          example: 1
        total:
          type: integer
          format: int32
          description: |
            The number of items that match the given filters
          example: 1
    Package:
      description: |
        A package dependency record.
      type: object
      properties:
        language:
          type: string
          description: |
            Language ecosystem the package belongs to
        language_version:
          type: string
          description: |
            Version of R or Python used by the content
          example: "3.12.4"
        name:
          type: string
          description: |
            Package name
          example: "shiny"
        version:
          type: string
          description: |
            Package version
          example: "1.0.3"
        hash:
          type: string
          nullable: true
          description: |
            Package description hash for R packages
          example: "e4ac73dd20b2f6420742aac66e5d3e78"
        bundle_id:
          type: string
          description: |
            Identifier for the bundle that depends on this package
          example: "449"
        app_id:
          type: string
          description: |
            This field is deprecated and has been renamed to `content_id`.
          example: "145"
        app_guid:
          type: string
          format: uuid
          description: |
            This field is deprecated and has been renamed to `content_guid`.
          example: "f4b3d7f6-7e1d-4f3b-8b9e-3f0f3f3f3f3f"
        content_id:
          type: string
          description: |
            Numeric identifier for the content that depends on this package
          example: "145"
        content_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of the content item that depends on this package
          example: "f4b3d7f6-7e1d-4f3b-8b9e-3f0f3f3f3f3f"
    PackagesResponse:
      description: |
        An object containing a paginated list of packages.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The list of packages
              items:
                $ref: '#/components/schemas/Package'
    PagingCursors:
      description: |
        Cursor values for keyset pagination.
      type: object
      properties:
        previous:
          type: string
          nullable: true
          description: |
            A cursor ID that can be used with the previous query parameter to get the previous page of results.
          example: "23948901087"
        next:
          type: string
          nullable: true
          description: |
            A cursor ID that can be used with the next query parameter to get the next page of results.
          example: "23948901087"
    PagingLinks:
      description: |
        Navigation links for keyset pagination.
      type: object
      properties:
        first:
          type: string
          nullable: true
          description: |
            A full URL of the first page of results. Null if the current response is the first page.
        previous:
          type: string
          nullable: true
          description: |
            A full URL of the previous page of results. Null if the current response is the first page.
        next:
          type: string
          nullable: true
          description: |
            A full URL of the next page of results. Null if the current response is the last page.
        last:
          type: string
          nullable: true
          description: |
            A full URL of the last page of results. Null if the current response is the last page.
    Permission:
      description: |
        Defines the permission level that a user or group has been granted to a content item.
      type: object
      properties:
        id:
          type: string
          description: |
            The identifier for this permission entry.
          example: "101"
        content_guid:
          type: string
          format: uuid
          description: |
            The identifier of the content item.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        principal_guid:
          type: string
          format: uuid
          description: |
            The identifier of the principal (user or group) listed in the ACL.
          example: "62543474-5716-4423-92d1-b3a22163eb49"
        principal_type:
          type: string
          description: |
            The type of principal.
          example: "user"
        role:
          type: string
          description: |
            The level of access that the principal has been
            given to this content item.
          example: "viewer"
    PermissionInput:
      description: |
        The fields that can be specified when creating or updating a content permission item.
      type: object
      properties:
        principal_guid:
          type: string
          format: uuid
          description: |
            The identifier of the principal (user or group).
          example: "62543474-5716-4423-92d1-b3a22163eb49"
        principal_type:
          type: string
          description: |
            The type of principal.
          example: "user"
        role:
          type: string
          description: |
            The level of access that the principal has been
            given to this content item.
          example: "viewer"
        send_email:
          type: boolean
          description: |
            Whether to send an email notification to the
            principal being added. Only applies when creating
            a new permission (`POST`); ignored on update
            (`PUT`). Defaults to `false` when not provided.
          example: false
    PublicSettings:
      description: |
        Minimal server settings required for rendering the login page and
        related unauthenticated pages (e.g., password reset, registration).
        This is a public endpoint that provides only the information needed
        for unauthenticated users to authenticate.
      type: object
      properties:
        authentication:
          type: object
          description: |
            Authentication provider configuration.
        self_registration:
          type: boolean
          description: |
            Whether users can self-register for an account. This is only true
            when password authentication is enabled and self-registration is
            configured, or when no users exist yet (allowing the first user
            to register).
          example: false
        system_display_name:
          type: string
          description: |
            The display name for the server, used for branding in the UI.
          example: "Posit Connect"
        public_warning:
          type: string
          description: |
            Optional warning message to display on public pages like the
            welcome and login pages. Can contain HTML.
          example: ""
        customized_landing:
          type: boolean
          description: |
            Whether a custom landing page is configured to replace the
            default welcome page.
          example: false
        mail_configured:
          type: boolean
          description: |
            Whether email is configured on the server. This determines whether
            features like password reset via email are available.
          example: true
        prohibited_usernames:
          type: array
          description: |
            List of usernames that are not allowed for new user registration.
            These are reserved system names.
          example: ["connect", "apps", "users", "groups"]
          items:
            type: string
        username_validator:
          type: string
          description: |
            The username validation mode. Either "default" (strict validation
            with length and character requirements) or "permissive" (minimal
            validation, typically used with external authentication providers).
          example: "default"
    PyInstallation:
      description: |
        This defines the information provided by the server about a single installation of Python.
      type: object
      properties:
        version:
          type: string
          description: |
            The version number of this Python installation.
          example: "3.10.6"
        cluster_name:
          type: string
          description: |
            The cluster that contains this Python installation.
            A value of `Local` indicates that the Python installation is local to the
            Posit Connect server.
          example: "Kubernetes"
        image_name:
          type: string
          description: |
            The image that contains this Python installation.
            A value of `Local` indicates that the Python installation is local to the
            Posit Connect server.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
    PythonInfo:
      description: |
        This defines the top-level object that describes the data returned by the server.
        It contains information about each installation of Python that is known.
      type: object
      properties:
        installations:
          type: array
          description: |
            The array of information about Posit Connect's Python
            installations.
          items:
            $ref: '#/components/schemas/PyInstallation'
        api_enabled:
          type: boolean
          description: |
            A `true` value is returned only when Python support is enabled in
            Connect and API hosting is permitted by the product license. It will
            be `false` in all other cases.
    QuartoInstallation:
      description: |
        This defines the information provided by the server about a single installation of Quarto.
      type: object
      properties:
        version:
          type: string
          description: |
            The version number of this Quarto installation.
          example: "1.0.27"
        cluster_name:
          type: string
          description: |
            The cluster that contains this Quarto installation.
            A value of `Local` indicates that the Quarto installation is local to the
            Posit Connect server.
          example: "Kubernetes"
        image_name:
          type: string
          description: |
            The image that contains this Quarto installation.
            A value of `Local` indicates that the Quarto installation is local to the
            Posit Connect server.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
    QuartoInstallations:
      description: |
        This defines the top-level object that describes the data returned by the server.
        It contains information about each installation of Quarto that is known.
      type: object
      properties:
        installations:
          type: array
          description: |
            The array of information about Posit Connect's Quarto
            installations.
          items:
            $ref: '#/components/schemas/QuartoInstallation'
    QueueItem:
      description: |
        An item in the job queue.
      type: object
      properties:
        id:
          type: string
          description: |
            The ID of the queue object
          example: 135
        name:
          type: string
          description: |
            Name of queue
          example: "job-finalizer"
        job_type:
          type: string
          description: |
            The type of job in the queue
          example: "ScheduledRender"
        created_time:
          type: string
          format: date-time
          description: |
            The time that the item was placed in the queue
          example: "2006-01-02T15:04:05-07:00"
        updated_time:
          type: string
          format: date-time
          description: |
            The time that the enqueued item was updated
          example: "2006-01-02T15:04:05-07:00"
        started_time:
          type: string
          format: date-time
          description: |
            The time that work started on the queued item
          example: "2006-01-02T15:04:05-07:00"
    QueueResponse:
      description: |
        An object containing a paginated list of queue items.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The list of items in the current page
              items:
                $ref: '#/components/schemas/QueueItem'
    RInstallation:
      description: |
        This defines the information provided by the server about a single installation of R.
      type: object
      properties:
        version:
          type: string
          description: |
            The version number of this R installation.
          example: "3.4.4"
        cluster_name:
          type: string
          description: |
            The cluster that contains this R installation.
            A value of `Local` indicates that the R installation is local to the Posit
            Connect server.
          example: "Kubernetes"
        image_name:
          type: string
          description: |
            The image that contains this R installation.
            A value of `Local` indicates that the R installation is local to the Posit
            Connect server.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
    RInstallations:
      description: |
        This defines the top-level object that describes the data returned by the server.
        It contains information about each installation of R that is known.
      type: object
      properties:
        installations:
          type: array
          description: |
            The array of information about Posit Connect's R
            installations.
          items:
            $ref: '#/components/schemas/RInstallation'
    RRuleSet:
      description: |
        RFC 5545 recurrence rule components for a schedule.
      type: object
      properties:
        dtstart:
          type: string
          description: |
            The DTSTART component specifying when the schedule begins,
            including timezone information.
          example: "DTSTART;TZID=America/New_York:20240115T090000"
        rrules:
          type: array
          description: |
            An array of RRULE components defining the recurrence pattern.
          example: ["RRULE:FREQ=DAILY;INTERVAL=2"]
          items:
            type: string
        until:
          type: string
          description: |
            The UNTIL component specifying when the schedule ends, if applicable.
          example: "UNTIL=20240215T090000Z"
    RemoteSearchResults:
      description: |
        The remote user search results with paging information.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The users list
              items:
                $ref: '#/components/schemas/UserWithTicket'
    RuntimeCache:
      description: |
        A cache of installed packages for a given language, version, and execution environment.
      type: object
      properties:
        language:
          type: string
          description: |
            The runtime language of the cache.
          example: "Python"
        version:
          type: string
          description: |
            The language version of the cache.
          example: "3.8.12"
        image_name:
          type: string
          description: |
            The name of the cache's execution environment.
          example: "Local"
    RuntimeCaches:
      description: |
        An object containing an array of runtime caches.
      type: object
      properties:
        caches:
          type: array
          description: |
            The list of runtime caches.
          items:
            $ref: '#/components/schemas/RuntimeCache'
    Schedule:
      description: |
        Base schedule information for a content item.
      type: object
      properties:
        type:
          type: string
          description: |
            The schedule type.
          example: "rrule"
        schedule:
          description: |
            The recurrence rule in RFC5545 format.
          allOf:
            - $ref: '#/components/schemas/RRuleSet'
        next_run:
          type: string
          format: date-time
          nullable: true
          description: |
            The next scheduled run time. Null if no future runs are scheduled.
        email:
          type: boolean
          description: |
            Whether email notifications are enabled for this schedule.
          example: false
        timezone:
          type: string
          description: |
            The timezone for this schedule.
          example: "America/New_York"
        start_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The start time of the schedule window.
        end_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The end time of the schedule window. Null if the schedule runs indefinitely.
        last_run:
          nullable: true
          description: |
            Information about the last scheduled run.
          allOf:
            - $ref: '#/components/schemas/ScheduleLastRun'
    ScheduleHistoryEntry:
      type: object
      properties:
        change_type:
          type: string
          description: |
            The type of change that was made to the schedule.
          example: "updated"
        change_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) when this change was made.
          example: "2025-01-15T14:30:00Z"
        user:
          nullable: true
          description: |
            The user who made this change, or null if the user has been deleted.
          allOf:
            - $ref: '#/components/schemas/User'
        new_schedule:
          nullable: true
          description: |
            The schedule state after this change, or null if the schedule
            was deleted.
          allOf:
            - $ref: '#/components/schemas/HistorySchedule'
    ScheduleHistoryResponse:
      type: object
      properties:
        results:
          type: array
          description: |
            An array of schedule history results, one per variant.
          items:
            $ref: '#/components/schemas/VariantScheduleHistory'
    ScheduleHistoryUser:
      type: object
      properties:
        guid:
          type: string
          format: uuid
          description: |
            The unique identifier of the user.
          example: "abc12345-6789-0abc-def0-123456789abc"
        username:
          type: string
          description: |
            The user's username.
          example: "jondoe"
        first_name:
          type: string
          description: |
            The user's first name.
          example: "Jon"
        last_name:
          type: string
          description: |
            The user's last name.
          example: "Doe"
        email:
          type: string
          description: |
            The user's email address.
          example: "jondoe@example.com"
    ScheduleLastRun:
      description: |
        Information about the last scheduled run.
      type: object
      properties:
        job_key:
          type: string
          description: |
            The unique key of the job.
          example: "abc123xyz"
        status:
          type: string
          description: |
            The status of the last run.
          example: "success"
        scheduled_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The scheduled time of the run.
        queued_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The time the run was queued.
        start_time:
          type: string
          format: date-time
          description: |
            The time the run started.
        end_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The time the run ended. Null if still running.
        run_duration_ms:
          type: integer
          format: int64
          nullable: true
          description: |
            The duration of the run in milliseconds. Null if still running.
          example: 5000
        exit_code:
          type: integer
          format: int64
          nullable: true
          description: |
            The exit code of the job. Null if still running.
          example: 0
    ScheduleVariant:
      description: |
        Variant information embedded in a schedule.
      type: object
      properties:
        key:
          type: string
          description: |
            The variant key.
          example: "default"
        name:
          type: string
          description: |
            The variant name.
          example: "Default Variant"
        is_default:
          type: boolean
          description: |
            Whether this is the default variant.
          example: true
    ServiceAccounts:
      description: |
        Kubernetes service accounts discovered when Connect started.
      type: object
      properties:
        enabled:
          type: boolean
          description: |
            Whether or not Kubernetes service accounts can be specified individually by
            content item.
            Reflects the configuration set for
            [`Launcher.KubernetesContentServiceAccountSelection`](../admin/appendix/configuration/index.md#Launcher.KubernetesContentServiceAccountSelection).
        default:
          type: string
          nullable: true
          description: |
            The default configured service account to execute content.
            Unless otherwise configured via [`Launcher.KubernetesDefaultServiceAccount`](../admin/appendix/configuration/index.md#Launcher.KubernetesDefaultServiceAccount)
            in your Connect configuration,
            this is the Kubernetes namespace default service account, "default."
        accounts:
          type: array
          description: |
            Array of strings with the service account names.
          items:
            type: string
    ServiceToken:
      description: |
        Object containing service token details.
      type: object
      properties:
        guid:
          type: string
          format: uuid
          description: |
            The unique identifier for this service token.
          example: "f2aba5e9-1c6a-4f63-91c7-ec6ea5a2f8e7"
        name:
          type: string
          description: |
            The name for this service token. The name often describes the purpose
            of the token.
          example: "NSS Integration"
        key:
          type: string
          description: |
            The secret key for this service token. The full key appears only
            when you create the token. Subsequent reads do not include the key.
          example: "abcdefghijklmnopqrstuvwxyz123456"
        scopes:
          type: array
          description: |
            The scopes granted to this service token.
          items:
            type: string
        created_time:
          type: string
          format: date-time
          description: |
            Timestamp (in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
            format) indicating when you created the token.
          example: "2006-01-02T15:04:05-07:00"
        active_time:
          type: string
          format: date-time
          description: |
            Timestamp (in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
            format) indicating approximately when the token last authenticated.
            This value is updated when the token is used, but no more than once
            every 15 minutes.
          example: "2006-01-02T15:04:05-07:00"
    ServiceTokenCreateInput:
      description: |
        The input object for creating a service token.
      type: object
      properties:
        name:
          type: string
          description: |
            The name for this service token. Use the name to describe the purpose
            of the token. Names do not need to be unique.
          example: "NSS Integration"
        scopes:
          type: array
          description: |
            The scopes to grant to this service token. At least one scope is
            required. Use the `/v1/system/service-tokens/scopes` endpoint to get
            available scopes.
          example: ["nameservice:read"]
          items:
            type: string
    ServiceTokenScope:
      description: |
        A scope you can assign to a service token.
      type: object
      properties:
        name:
          type: string
          description: |
            The scope identifier.
          example: "nameservice:read"
        description:
          type: string
          description: |
            A human-readable description of what this scope grants.
          example: "Access NSS user and group data"
    ServiceTokenScopes:
      description: |
        An object containing the available scopes for service tokens.
      type: object
      properties:
        scopes:
          type: array
          description: |
            The available scopes.
          items:
            $ref: '#/components/schemas/ServiceTokenScope'
    ShinyAppUsageEntry:
      description: |
        A Shiny application usage record.
      type: object
      properties:
        content_guid:
          type: string
          format: uuid
          description: |
            The GUID of the Shiny application this usage record pertains to.
          example: "bd1d2285-6c80-49af-8a83-a200effe3cb3"
        user_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The GUID of the user that visited the application. May be null if the user cannot be determined.
          example: "08e3a41d-1f8e-47f2-8855-f05ea3b0d4b2"
        started:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) when the user opened the application.
          example: "2018-09-15T18:00:00-05:00"
        ended:
          type: string
          format: date-time
          nullable: true
          description: |
            The timestamp (RFC3339) when the user left the application.
          example: "2018-09-15T18:01:00-05:00"
        data_version:
          type: integer
          format: int32
          description: |
            The data version the record was recorded with.
          example: 1
    ShinyAppUsageLogs:
      description: |
        Shiny application usage results with keyset pagination.
      type: object
      properties:
        results:
          type: array
          description: |
            The Shiny application usage logs.
          items:
            $ref: '#/components/schemas/ShinyAppUsageEntry'
        paging:
          description: |
            Paging information for navigating result sets.
          allOf:
            - $ref: '#/components/schemas/KeysetPaging'
    SystemCheckRun:
      description: |
        The fields returned when listing system check runs or getting the status of a run.
      type: object
      properties:
        id:
          type: string
          description: |
            The unique identifier for this test run.
          example: "2"
        start_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) of when this run was started.
          example: "2006-01-02T15:04:05-07:00"
        hostname:
          type: string
          description: |
            The hostname where this test was run.
          example: "connect.example.com"
        status:
          type: string
          description: |
            The status of this test run, one of: requested, running, done, canceled.
          example: "done"
          enum:
            - requested
            - running
            - done
            - canceled
        passed:
          type: integer
          format: int32
          description: |
            The number of tests in this run that have passed.
          example: 29
        failed:
          type: integer
          format: int32
          description: |
            The number of tests in this run that have failed.
          example: 1
    SystemCheckRunResult:
      description: |
        The fields describing a single system check result.
      type: object
      properties:
        group:
          description: |
            Information about the test group that was run.
          allOf:
            - $ref: '#/components/schemas/TestInfo'
        test:
          description: |
            Information about the test that was run.
          allOf:
            - $ref: '#/components/schemas/TestInfo'
        passed:
          type: boolean
          description: |
            Boolean indicating whether the test passed.
          example: true
        output:
          type: string
          description: |
            The textual output produced while running the test.
        error:
          type: string
          description: |
            The error that occurred while running this test, or empty string if no error occurred.
    SystemCheckRunResults:
      description: |
        Fields containing results of a specific system check run.
      type: object
      properties:
        run:
          description: |
            The run that was requested.
          allOf:
            - $ref: '#/components/schemas/SystemCheckRun'
        results:
          type: array
          description: |
            The results of the system check run.
          items:
            $ref: '#/components/schemas/SystemCheckRunResult'
    Tag:
      description: |
        A tag used to organize content within Connect.
      type: object
      properties:
        id:
          type: string
          description: |
            The identifier for the tag.
          example: "101"
        name:
          type: string
          description: |
            The name of the tag.
          example: "financial-statements"
        parent_id:
          type: string
          nullable: true
          description: |
            The identifier for the parent tag. If there is no parent_id,
            the tag is a top-level tag.
          example: "102"
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when the tag was created.
          example: "2006-01-02T15:04:05Z"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when the tag was updated.
          example: "2006-01-02T15:04:05Z"
    TagInput:
      description: |
        The fields that can be specified when creating or updating a tag.
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: |
            The name of the tag. Tags under the same parent must have a unique
            name and cannot be longer than 255 characters.
          example: "financial-statements"
        parent_id:
          type: string
          nullable: true
          description: |
            The identifier for the parent tag. If there is no parent_id,
            the tag will be a top-level tag.
          example: "101"
    Task:
      description: |
        The task tracks the output and status of some operation being performed
        by Posit Connect. It is most commonly used to contain details about
        the progress of a deployment operation.
      type: object
      properties:
        id:
          type: string
          description: |
            The identifier for this task.
          example: "jXhOhdm5OOSkGhJw"
        output:
          type: array
          description: |
            An array containing lines of output produced by the task. The
            initial line of output is dictated by the `first` input parameter.
            The offset of the last output line is indicated by the `last`
            response field.
          items:
            type: string
        result:
          type: object
          nullable: true
          description: |
            A value representing the result of the operation, if any.
            For deployment tasks, this value is `null`.
          example: null
        finished:
          type: boolean
          description: |
            Indicates that a task has completed.
          example: true
        code:
          type: integer
          format: int32
          description: |
            Numeric indication as to the cause of an error. Non-zero when an
            error has occurred.
          example: 1
        error:
          type: string
          description: |
            Description of the error. An empty string when no error has
            occurred.
          example: "Unable to render: Rendering exited abnormally: exit status 1"
        last:
          type: integer
          format: int32
          description: |
            The total number of output lines produced so far. Use as the value
            to `first` in the next request to only fetch output lines beyond
            what you have already received.
          example: 2
    TensorFlowInstallation:
      description: |
        This defines the information provided by the server about a single installation of TensorFlow.
      type: object
      properties:
        version:
          type: string
          description: |
            The version number of this TensorFlow installation.
          example: "1.0.27"
        cluster_name:
          type: string
          description: |
            The cluster that contains this TensorFlow installation.
            A value of `Local` indicates that the TensorFlow installation is local to
            the Posit Connect server.
          example: "Kubernetes"
        image_name:
          type: string
          description: |
            The image that contains this TensorFlow installation.
            A value of `Local` indicates that the TensorFlow installation is local to
            the Posit Connect server.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
    TensorFlowInstallations:
      description: |
        This defines the top-level object that describes the data returned by the server.
        It contains information about each installation of TensorFlow that is known.
      type: object
      properties:
        installations:
          type: array
          description: |
            The array of information about Posit Connect's TensorFlow
            installations.
          items:
            $ref: '#/components/schemas/TensorFlowInstallation'
    TestInfo:
      description: |
        Fields describing a specific test or test group.
      type: object
      properties:
        name:
          type: string
          description: |
            The name of this test.
          example: "environment"
        args:
          type: string
          description: |
            The arguments that will be passed to this test.
    TimeZoneEntry:
      description: |
        One time zone entry with name and offset.
      type: object
      properties:
        timezone:
          type: string
          description: |
            The time zone name.
          example: "America/New_York"
        offset:
          type: string
          description: |
            Time zone offset.
          example: "-04:00"
    UpdateContentInput:
      description: |
        The content fields that can be specified when updating a content item.
      type: object
      properties:
        name:
          type: string
          description: |
            A simple identifier. Allows alpha-numeric
            characters, periods (`"."`), hyphens (`"-"`), and underscores (`"_"`).
          example: "quarterly-analysis"
        title:
          type: string
          nullable: true
          description: |
            The title of this content.
          example: "Quarterly Analysis of Team Velocity"
        description:
          type: string
          description: |
            A rich description of this content.
          example: "This report calculates per-team statistics ..."
        owner_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The unique identifier of the user who owns this content item.
            Can only be changed by an administrator.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        access_type:
          type: string
          description: |
            Access type describes how this content manages its viewers. The
            value `all` is the most permissive; any visitor to Posit Connect
            will be able to view this content. The value `logged_in` indicates
            that all Posit Connect accounts may view the content. The `acl`
            value lets specifically enumerated users and groups view the
            content. Users configured as collaborators may always view content.

            Access types may be restricted by the Connect configuration or the
            product license.
          example: "acl"
          enum:
            - all
            - logged_in
            - acl
        locked:
          type: boolean
          nullable: true
          description: |
            Whether or not the content is locked.
          example: false
        locked_message:
          type: string
          nullable: true
          description: |
            A custom message that is displayed by the content item when locked.
            It is possible to format this message using Markdown.
          example: "# This piece of content is locked"
        connection_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            Maximum number of seconds allowed without data sent or received
            across a client connection. A value of `0` means connections will
            never time-out (not recommended). When `null`, the default
            [`Scheduler.ConnectionTimeout`](../admin/appendix/configuration/index.md#Scheduler.ConnectionTimeout) is used. Applies only to content types
            that are executed on demand.
          example: 3600
        read_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            Maximum number of seconds allowed without data received from a
            client connection. A value of `0` means a lack of client (browser)
            interaction never causes the connection to close. When `null`, the
            default [`Scheduler.ReadTimeout`](../admin/appendix/configuration/index.md#Scheduler.ReadTimeout) is used. Applies only to content
            types that are executed on demand.
          example: 3600
        init_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            The maximum number of seconds allowed for an interactive application
            to start. Posit Connect must be able to connect to a newly
            launched application before this threshold has
            elapsed. When `null`, the default [`Scheduler.InitTimeout`](../admin/appendix/configuration/index.md#Scheduler.InitTimeout) is used.
            Applies only to content types that are executed on demand.
          example: 60
        idle_timeout:
          type: integer
          format: int32
          nullable: true
          description: |
            The maximum number of seconds a worker process for an interactive
            application to remain alive after it goes idle (no active
            connections). When `null`, the default [`Scheduler.IdleTimeout`](../admin/appendix/configuration/index.md#Scheduler.IdleTimeout) is
            used. Applies only to content types that are executed on demand.
          example: 5
        max_processes:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the total number of concurrent processes allowed for a
            single interactive application per Posit Connect node. When `null`,
            the default [`Scheduler.MaxProcesses`](../admin/appendix/configuration/index.md#Scheduler.MaxProcesses) is used. Applies only to
            content types that are executed on demand.
          example: 3
        min_processes:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the minimum number of concurrent processes allowed for a
            single interactive application per Posit Connect node. When `null`,
            the default `Scheduler.MinProcesses` is used. Applies only to
            content types that are executed on demand.
          example: 0
        max_conns_per_process:
          type: integer
          format: int32
          nullable: true
          description: |
            Specifies the maximum number of client connections allowed to an
            individual process. Incoming connections which will exceed this
            limit are routed to a new process or rejected. When `null`, the
            default [`Scheduler.MaxConnsPerProcess`](../admin/appendix/configuration/index.md#Scheduler.MaxConnsPerProcess) is used. Applies only to
            content types that are executed on demand.
          example: 20
        load_factor:
          type: number
          format: double
          nullable: true
          description: |
            Controls how aggressively new processes are spawned. When `null`,
            the default [`Scheduler.LoadFactor`](../admin/appendix/configuration/index.md#Scheduler.LoadFactor) is used. Applies only to content
            types that are executed on demand.
          example: 0.5
        default_r_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect should create and manage an R
            environment (installing required packages) for this content. When
            `null`, Connect makes this determination based on the server
            configuration.
          example: true
        default_py_environment_management:
          type: boolean
          nullable: true
          description: |
            Indicates whether or not Connect should create and manage a Python
            environment (installing required packages) for this content. When
            `null`, Connect makes this determination based on the server
            configuration.
          example: true
        run_as:
          type: string
          nullable: true
          description: |
            The UNIX user that executes this content. When `null`, the default
            [`Applications.RunAs`](../admin/appendix/configuration/index.md#Applications.RunAs) is used. Applies only to executable content
            types - not `static`.
          example: "rstudio-connect"
        run_as_current_user:
          type: boolean
          nullable: true
          description: |
            Indicates that Connect should run processes for this content item
            under the Unix account of the user who visits it. Content accessed
            anonymously will continue to run as the specified `run_as` user.
          example: false
        memory_request:
          type: integer
          format: int64
          nullable: true
          description: |
            The minimum amount of RAM this content needs when executing or
            rendering, expressed in bytes. When `null`, the default
            [`Scheduler.MemoryRequest`](../admin/appendix/configuration/index.md#Scheduler.MemoryRequest) is used.
          example: 1073741824
        memory_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The maximum amount of RAM this content will be allowed to consume
            when executing or rendering, expressed in bytes. When `null`, the
            default [`Scheduler.MemoryLimit`](../admin/appendix/configuration/index.md#Scheduler.MemoryLimit) is used.
          example: 2147483648
        cpu_request:
          type: number
          format: double
          nullable: true
          description: |
            The minimum amount of compute power this content needs when executing
            or rendering, expressed in CPU Units, where 1.0 unit is equivalent to
            1 physical or virtual core. Fractional values are allowed. When `null`,
            the default [`Scheduler.CPURequest`](../admin/appendix/configuration/index.md#Scheduler.CPURequest) is used.
          example: 1.0
        cpu_limit:
          type: number
          format: double
          nullable: true
          description: |
            The maximum amount of compute power this content will be allowed to
            consume when executing or rendering, expressed in CPU Units. When
            `null`, the default [`Scheduler.CPULimit`](../admin/appendix/configuration/index.md#Scheduler.CPULimit) is used.
          example: 1.5
        amd_gpu_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The number of AMD GPUs allocated to run this content. When `null`,
            the default [`Scheduler.AMDGPULimit`](../admin/appendix/configuration/index.md#Scheduler.AMDGPULimit) is used.
          example: 1
        nvidia_gpu_limit:
          type: integer
          format: int64
          nullable: true
          description: |
            The number of NVIDIA GPUs allocated to run this content. When `null`,
            the default [`Scheduler.NvidiaGPULimit`](../admin/appendix/configuration/index.md#Scheduler.NvidiaGPULimit) is used.
          example: 1
        service_account_name:
          type: string
          nullable: true
          description: |
            The name of the Kubernetes service account used to run this content.
          example: "rstudio-connect-content"
        default_image_name:
          type: string
          nullable: true
          description: |
            The default container image used when none is defined by the bundle's
            manifest.
          example: "rstudio/content-base:r4.1.3-py3.10.11-jammy"
        default_environment_guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The default execution environment used when none is defined by the
            bundle's manifest.
          example: "36538b83-ea6d-4839-ae8e-53c52ac5f0bf"
        metrics_collection_enabled:
          type: boolean
          nullable: true
          description: |
            Controls whether per-job resource metrics are collected for this
            content item. When `null`, inherits the server-wide default.
          example: true
        notify_on_share:
          type: boolean
          nullable: true
          description: |
            Controls whether email notifications are sent by default when
            users or groups are added as collaborators or viewers.
            When `null`, inherits the server-wide default from
            [`Applications.NotifyOnShare`](../admin/appendix/configuration/index.md#Applications.NotifyOnShare).
          example: true
        trace_collection_enabled:
          type: boolean
          nullable: true
          description: |
            Controls whether per-job OpenTelemetry traces are collected for
            this content item. When `null`, inherits the server-wide default.
          example: false
        content_category:
          type: string
          nullable: true
          description: |
            The `content_category` field refines the type of content specified by
            `app_mode`. For example, the MCP content category indicates content that
            serves as an MCP server. Allowed values are `""` (empty string to clear)
            or `"mcp"`.
          example: "mcp"
    UpdateEnvironmentInput:
      description: |
        The fields that can be specified when updating an environment.
      type: object
      properties:
        title:
          type: string
          nullable: true
          description: |
            A human readable title for this environment.
          example: "Project Alpha (R 4.1.1, Python 3.10)"
        description:
          type: string
          nullable: true
          description: |
            A human readable description of this environment.
          example: "This is my description of the environment"
        matching:
          type: string
          nullable: true
          description: |
            This field indicates how environments can be considered for selection
            when Posit Connect is choosing a compatible environment to use when
            executing content.

            `any` (the default) indicates that the image can be selected by Connect
            automatically,
            _or_ targeted in the bundle's manifest.

            `exact` indicates the image must be explicitly asked for in the bundle's
            manifest.

            `none` indicates that the image should never be selected by Posit Connect.
          example: "any"
        supervisor:
          type: string
          nullable: true
          description: |
            The path to the script or command that should be used as the
            [program
            supervisor](https://docs.posit.co/helm/rstudio-connect/kubernetes-howto/appendices/content_images.html#per-image-supervisors)
            when executing content with this environment.
          example: "/usr/local/bin/supervisor.sh"
        python:
          description: |
            The available Python installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        quarto:
          description: |
            The available Quarto installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        r:
          description: |
            The available R installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        tensorflow:
          description: |
            The available TensorFlow installations in this environment.
          allOf:
            - $ref: '#/components/schemas/Installations'
        volume_mounts:
          type: array
          description: |
            The volume mounts for this environment.
          items:
            $ref: '#/components/schemas/VolumeMount'
    User:
      description: |
        A user object.
      type: object
      properties:
        email:
          type: string
          description: |
            The user's email.
          example: "jon.doe@example.com"
        username:
          type: string
          description: |
            The user's username.
          example: "jondoe"
        first_name:
          type: string
          description: |
            The user's first name.
          example: "Jon"
        last_name:
          type: string
          description: |
            The user's last name.
          example: "Doe"
        user_role:
          type: string
          description: |
            The user's role.
          example: "administrator"
          enum:
            - administrator
            - publisher
            - viewer
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when the user was created in
            the Posit Connect server.
          example: "2006-01-02T15:04:05-07:00"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when information about this
            user was last updated in the Posit Connect server.
          example: "2006-01-02T15:04:05-07:00"
        active_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The timestamp (RFC3339) indicating approximately when the user
            was last active. Highly active users only receive periodic updates.
          example: "2006-01-02T15:04:05-07:00"
        confirmed:
          type: boolean
          description: |
            When `false`, the created user must confirm their account through
            an email. This feature is unique to password authentication.
          example: true
        locked:
          type: boolean
          description: |
            Whether or not the user is locked.
          example: false
        external_id:
          type: string
          description: |
            The unique identifier for this user from the authentication
            provider, when available.
          example: "okta-12345-abcde"
        guid:
          type: string
          format: uuid
          description: |
            The user's GUID, or unique identifier, in UUID
            [RFC4122](https://www.rfc-editor.org/rfc/rfc4122)
            format
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
    UserCreatePullInput:
      description: |
        The fields that must be specified when creating a user from a remote authentication provider.
      type: object
      properties:
        temp_ticket:
          type: string
          description: |
            This value is for actions that require a `temp_ticket`, such
            as adding an LDAP or OAuth2 with Google user to the Connect server.
    UserCreatePushInput:
      description: |
        The fields that can be specified when creating a user from caller-supplied details.
      type: object
      properties:
        username:
          type: string
          description: |
            The user's desired username.
          example: "jondoe"
        first_name:
          type: string
          description: |
            The user's first name.
          example: "Jon"
        last_name:
          type: string
          description: |
            The user's last name.
          example: "Doe"
        email:
          type: string
          description: |
            The user's email address.
          example: "jon.doe@example.com"
        user_role:
          type: string
          nullable: true
          description: |
            The user's role. When `null`, the role is determined by the server
            default.
          example: "publisher"
          enum:
            - administrator
            - publisher
            - viewer
        user_must_set_password:
          type: boolean
          description: |
            When `true`, the created user will be asked to set the password
            on first login.
          example: false
        password:
          type: string
          description: |
            The user's initial password. Must meet minimum password
            requirements.
        external_id:
          type: string
          description: |
            The unique identifier for this user from the authentication
            provider.
          example: "okta-12345-abcde"
        unique_id:
          type: string
          description: |
            Deprecated: use `external_id` instead.
          example: "okta-12345-abcde"
    UserUpdateInput:
      description: |
        The fields that can be specified when updating a user.
      type: object
      properties:
        email:
          type: string
          description: |
            The user's email.
          example: "jon.doe@example.com"
        username:
          type: string
          description: |
            The user's username.
          example: "jondoe"
        first_name:
          type: string
          description: |
            The user's first name.
          example: "Jon"
        last_name:
          type: string
          description: |
            The user's last name.
          example: "Doe"
        user_role:
          type: string
          description: |
            The user's role.
          example: "administrator"
          enum:
            - administrator
            - publisher
            - viewer
    UserWithTicket:
      description: |
        A user object with a temporary ticket for remote user creation.
      type: object
      properties:
        email:
          type: string
          description: |
            The user's email.
          example: "jon.doe@example.com"
        username:
          type: string
          description: |
            The user's username.
          example: "jondoe"
        first_name:
          type: string
          description: |
            The user's first name.
          example: "Jon"
        last_name:
          type: string
          description: |
            The user's last name.
          example: "Doe"
        user_role:
          type: string
          description: |
            The user's role.
          example: "administrator"
          enum:
            - administrator
            - publisher
            - viewer
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when the user was created in
            the Posit Connect server.
          example: "2006-01-02T15:04:05-07:00"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when information about this
            user was last updated in the Posit Connect server.
          example: "2006-01-02T15:04:05-07:00"
        active_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The timestamp (RFC3339) indicating approximately when the user
            was last active. Highly active users only receive periodic updates.
          example: "2006-01-02T15:04:05-07:00"
        confirmed:
          type: boolean
          description: |
            When `false`, the created user must confirm their account through
            an email. This feature is unique to password authentication.
          example: true
        locked:
          type: boolean
          description: |
            Whether or not the user is locked.
          example: false
        external_id:
          type: string
          description: |
            The unique identifier for this user from the authentication
            provider, when available.
          example: "okta-12345-abcde"
        guid:
          type: string
          format: uuid
          nullable: true
          description: |
            The user's GUID, or unique identifier in
            [RFC4122](https://www.rfc-editor.org/rfc/rfc4122)
            format. When a user does not exist in the Posit Connect server, this
            property
            will be `null`.
          example: "6f300623-1e0c-48e6-a473-ddf630c0c0c3"
        temp_ticket:
          type: string
          description: |
            This value is for actions that require a `temp_ticket`, such
            as adding an LDAP or OAuth2 with Google user to the Connect server.
    Users:
      description: |
        The users list with paging information.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The users list
              items:
                $ref: '#/components/schemas/User'
    Vanity:
      description: |
        The fields that are returned when getting or listing vanity URLs.
      type: object
      properties:
        content_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of the associated content item.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        path:
          type: string
          description: |
            The URL path that will be used by this application. HTTP requests to
            this path on the Connect server will be routed to the associated
            content item.
          example: "/stock-report/"
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when this vanity URL was created.
          example: "2006-01-02T15:04:05-07:00"
    VanityInput:
      description: |
        The fields that can be specified when creating a vanity URL.
      type: object
      properties:
        path:
          type: string
          description: |
            The URL path that will be assigned to this content item. HTTP requests to
            this path on the Connect server will be routed to the associated
            content item.
          example: "/stock-report/"
        force:
          type: boolean
          description: |
            If true, and a vanity URL exists with the specified path,
            reassign it to the specified content item. To reassign
            a vanity URL, you must be an administrator, or a
            collaborator/owner of both content items.
    VariantResults:
      description: |
        Search results containing variants and pagination metadata.
      allOf:
        - $ref: '#/components/schemas/OffsetPaging'
        - type: object
          properties:
            results:
              type: array
              description: |
                The list of variants, paginated
              items:
                $ref: '#/components/schemas/VariantSearchResult'
    VariantScheduleHistory:
      type: object
      properties:
        variant_key:
          type: string
          description: |
            The unique key identifying this variant.
          example: "HidI2Kwq"
        current_schedule:
          nullable: true
          description: |
            The current active schedule for this variant, or null if no
            schedule exists.
          allOf:
            - $ref: '#/components/schemas/CurrentSchedule'
        history:
          type: array
          description: |
            A list of schedule change history entries, ordered by change time
            (most recent first). Limited to the 100 most recent entries.
          items:
            $ref: '#/components/schemas/ScheduleHistoryEntry'
        total_count:
          type: integer
          description: |
            The total number of history entries for this variant. This may be
            larger than the number of entries in the `history` array, which is
            limited to 100 entries.
          example: 3
    VariantSearchResult:
      description: |
        A single variant in search results.
      type: object
      properties:
        content_guid:
          type: string
          format: uuid
          description: |
            The GUID of the parent content item
          example: "abc123de-f456-7890-abcd-ef1234567890"
        content_name:
          type: string
          description: |
            The URL-friendly name of the parent content item
          example: "monthly-sales-report"
        content_title:
          type: string
          nullable: true
          description: |
            The human-readable title of the parent content item
          example: "Monthly Sales Report"
        variant_key:
          type: string
          description: |
            The unique key identifying this variant
          example: "xyz789"
        variant_name:
          type: string
          description: |
            The human-readable name of the variant
          example: "West Region"
        is_default:
          type: boolean
          description: |
            Whether this is the default variant for the content
          example: false
        created_time:
          type: string
          format: date-time
          description: |
            The time this variant was created
          example: "2025-06-15T09:00:00Z"
        render_time:
          type: string
          format: date-time
          nullable: true
          description: |
            The time this variant was last rendered
          example: "2026-01-26T08:00:00Z"
        failures:
          type: integer
          description: |
            The number of failed jobs (non-zero exit code) for this variant.
            When a `failed:>=` filter is used, this count is scoped to failures
            on or after the given timestamp.
          example: 0
        last_failed:
          type: string
          format: date-time
          nullable: true
          description: |
            The time the most recent failed job completed for this variant.
            Null if no failures have occurred. When a `failed:>=` filter is
            used, this reflects only failures within the given time window.
          example: "2026-02-01T12:00:00Z"
        skips:
          type: integer
          description: |
            The number of skipped scheduled jobs for this variant. When a
            `skipped:>=` filter is used, this count is scoped to skips on or
            after the given timestamp.
          example: 0
        last_skipped:
          type: string
          format: date-time
          nullable: true
          description: |
            The scheduled time of the most recent skipped job for this
            variant. Null if no skips have occurred. When a `skipped:>=`
            filter is used, this reflects only skips within the given time
            window.
          example: "2026-02-01T12:00:00Z"
        schedule:
          nullable: true
          description: |
            Schedule information for this variant. Omitted if no schedule exists.
          allOf:
            - $ref: '#/components/schemas/Schedule'
    VolumeMount:
      description: |
        A volume mount configuration for an environment.
      type: object
      properties:
        source:
          description: |
            The source specification for this mount.
          allOf:
            - $ref: '#/components/schemas/VolumeSource'
        target:
          description: |
            The target specification for this mount.
          allOf:
            - $ref: '#/components/schemas/VolumeTarget'
    VolumeSource:
      description: |
        The source specification for a volume mount.
      type: object
      properties:
        volume_type:
          type: string
          description: |
            The type of volume.
          example: "nfs"
        nfs_host:
          type: string
          nullable: true
          description: |
            The NFS host. Required when `volume_type` is `nfs`.
        nfs_export_path:
          type: string
          nullable: true
          description: |
            The NFS export path. Required when `volume_type` is `nfs`.
        pvc_name:
          type: string
          nullable: true
          description: |
            The PersistentVolumeClaim name. Required when `volume_type` is `pvc`.
    VolumeTarget:
      description: |
        The target specification for a volume mount.
      type: object
      properties:
        path:
          type: string
          description: |
            The mount path inside the container.
          example: "/mnt/data"
        read_only:
          type: boolean
          nullable: true
          description: |
            Whether the volume is mounted read-only.
          example: false
    Webhook:
      description: |
        A webhook destination for content event notifications.
      type: object
      properties:
        guid:
          type: string
          format: uuid
          description: |
            The unique identifier for this webhook.
          example: "25438b83-ea6d-4839-ae8e-53c52ac5f9ce"
        creator_guid:
          type: string
          format: uuid
          description: |
            The unique identifier of the user who created this webhook.
          example: "f7b3e3c0-1a2b-4c5d-8e9f-0a1b2c3d4e5f"
        type:
          type: string
          description: |
            The type of the webhook destination.
          example: "slack"
        name:
          type: string
          description: |
            The name of the webhook.
          example: "My Slack Webhook"
        url:
          type: string
          description: |
            The destination URL for the webhook.
          example: "https://hooks.slack.com/services/T00/B00/XXXX"
        enabled:
          type: boolean
          description: |
            Whether the webhook is enabled.
          example: true
        created_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when the webhook was created.
          example: "2006-01-02T15:04:05Z"
        updated_time:
          type: string
          format: date-time
          description: |
            The timestamp (RFC3339) indicating when the webhook was last updated.
          example: "2006-01-02T15:04:05Z"
    WebhookCreateInput:
      description: |
        The fields that must be specified when creating a webhook.
      type: object
      properties:
        name:
          type: string
          description: |
            The name of the webhook. Maximum 256 characters.
          example: "My Slack Webhook"
        type:
          description: |
            The type of the webhook destination. Must be one of "slack", "teams", or "generic".
          allOf:
            - $ref: '#/components/schemas/store.WebhookType'
        url:
          type: string
          description: |
            The destination URL for the webhook. Maximum 2048 characters.
          example: "https://hooks.slack.com/services/T00/B00/XXXX"
        secret:
          type: string
          nullable: true
          description: |
            An optional secret used to sign webhook payloads. Write-only; never returned in responses.
          example: "my-signing-secret"
        enabled:
          type: boolean
          nullable: true
          description: |
            Whether the webhook is enabled. Defaults to true if omitted.
          example: true
    WebhookUpdateInput:
      description: |
        The fields that can be specified when updating a webhook. All fields are optional.
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: |
            The name of the webhook. Maximum 256 characters.
          example: "My Slack Webhook"
        type:
          type: string
          nullable: true
          description: |
            The type of the webhook destination. Must be one of "slack", "teams", or "generic".
          example: "slack"
        url:
          type: string
          nullable: true
          description: |
            The destination URL for the webhook. Maximum 2048 characters.
          example: "https://hooks.slack.com/services/T00/B00/XXXX"
        secret:
          type: string
          nullable: true
          description: |
            An optional secret used to sign webhook payloads. Write-only; never returned in responses.
          example: "my-signing-secret"
        enabled:
          type: boolean
          nullable: true
          description: |
            Whether the webhook is enabled.
          example: true
tags:
  - name: API Keys
  - name: Audit Logs
  - name: Bookmarks
  - name: Bootstrap
  - name: Bundles
  - name: Content
  - name: Content Permissions
  - name: Custom Documentation
  - name: Environment Permissions
  - name: Environments
  - name: Examples
  - name: Feature Usage
  - name: Groups
  - name: Instrumentation
  - name: Jobs
  - name: OAuth Integration Templates
  - name: OAuth Integrations
  - name: OAuth Sessions
  - name: Packages
  - name: Queue
  - name: Schedules
  - name: Server Information
  - name: Service Tokens
  - name: System Checks
  - name: System Information
  - name: Tags
  - name: Tasks
  - name: Users
  - name: Vanity URLs

paths:
  /v1/users/{guid}/keys:
    post:
      operationId: createKey
      summary: Create an API key
      tags:
        - API Keys
      description: |
        Create an API key.

        Users can only create API keys for themselves. If `guid` does not match
        the current user's GUID, a 403 status is returned.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreateInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKey'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listKeys
      summary: List API keys
      tags:
        - API Keys
      description: |
        List your provisioned API keys.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/APIKey'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/users/{guid}/keys/{id}:
    delete:
      operationId: deleteKey
      summary: Delete an API key
      tags:
        - API Keys
      description: |
        Delete a single API key.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getKey
      summary: Get an API key
      tags:
        - API Keys
      description: |
        Get details for a single API key.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKey'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/audit/actions:
    get:
      operationId: getAuditActions
      summary: Get audit actions
      tags:
        - Audit Logs
      description: |
        Retrieve the list of audit actions available on your Posit Connect server.
        You can also see a list of these actions in the [Admin Guide](../admin/auditing/events/).
        Action names can be used to filter audit logs in the [Audit Log Search API](#searchAuditLogs).
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AuditActionResult'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/audit_logs:
    get:
      operationId: getAuditLogs
      summary: Get audit logs
      tags:
        - Audit Logs
      description: |
        This endpoint returns a portion of the audit logs, as well as
        paging information that can be used to navigate the audit log
        results.

        This endpoint requires administrator access.

        This endpoint uses keyset pagination. The URLs in the `paging` field's
        subfields can be used to fetch the `next`, `previous`, `first`, and
        `last` pages of results.
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            format: int64
            default: 20
          description: |
            Number of logs to return. The minimum supported value is 1 and
            maximum supported value is 500. Note that `limit` is a "best
            effort" request since there may not be enough logs to satisfy the limit.
        - name: previous
          in: query
          schema:
            type: string
          description: |
            Gets the previous page of audit logs relative to the given id.
        - name: next
          in: query
          schema:
            type: string
          description: |
            Gets the next page of audit logs relative to the given id.
        - name: ascOrder
          in: query
          schema:
            type: boolean
            default: true
          description: |
            Whether the audit logs should be listed in ascending order.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogs'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/search/auditlogs:
    get:
      operationId: searchAuditLogs
      summary: Search audit logs
      tags:
        - Audit Logs
      description: |
        This endpoint searches for audit logs, using a search query format
        that allows for both search terms and filters. The search terms are used
        to find audit logs that have matching terms in the audit action, audit
        description, etc, while the filters are used to filter the search
        results by specific fields (such as `user_guid` or the audit `time`).

        Authenticated access with an Administrator role is required.

        #### Search query

        The search query is a string that includes both search terms and
        filters. Any text in the search query that is not a supported filter
        is treated as a search term, and those search terms are matched
        against any of: `user_description`, `action`, or `event_description`. Note that the search
        terms are case-insensitive, and all terms must be present in an audit log entry
        for it to be included in the search results.

        #### Filters

        Filters are specified as colon-delimited key-value pairs, containing one
        or more values separated by commas. If any of the values within a filter
        contain a space or comma, you should use quotes around the value. Example:

        ```
        myterm tag:tagwithoutspace,"tag with space"
        ```

        You can negate a filter or search term by prefixing it
        with a `-`. For example, `-user_id:0` will exclude audit logs produced by system actors which
        have a default user_id of `0`.

        The following filters are supported:

        `action:<action>[,<additional-actions>,...]` - Only return audit logs
        that have the specified action. If more than one action is provided,
        audit logs with ANY of the specified actions will be included. Note that
        actions are not case sensitive. Audit actions are enumerated in the
        [Admin Guide](../admin/auditing/events/), and are also exposed in the
        [GET /v1/audit/actions](#getAuditActions).

        `user_guid:<user_guid>[,<additional-user_guids>,...]` - Only return
        audit logs that have the specified user GUID. If more than one user
        GUID is provided, audit logs with ANY of the specified user GUIDs will
        be included.

        `user_id:<user_id>[,<additional-user_ids>,...]` - Only return audit logs
        that have the specified user ID. If more than one user ID is provided,
        audit logs with ANY of the specified user IDs will be included. The user ID `0`
        is reserved for system actors.

        `from:<timestamp>` - Only return audit logs that have a timestamp
        greater than or equal to the specified timestamp. The timestamp must
        be provided in RFC3339 format, such as `2023-01-01T12:34:56Z`. Up to nanosecond
        precision is supported (e.g. `2023-01-01T12:34:56.123456789Z`). The timestamp
        is inclusive, so audit logs with the specified timestamp will be
        included in the results.

        `to:<timestamp>` - Only return audit logs that have a timestamp
        less than or equal to the specified timestamp. The timestamp must
        be provided in RFC3339 format, such as `2023-01-01T12:34:56Z`. Up to nanosecond
        precision is supported (e.g. `2023-01-01T12:34:56.123456789Z`). The timestamp
        is inclusive, so audit logs with the specified timestamp will be
        included in the results.

        #### Pagination

        This endpoint uses offset pagination. Requests can include
        query-string parameters for `page_number` and `page_size` to
        fetch different pages of results.
      parameters:
        - name: q
          in: query
          schema:
            type: string
          description: |
            Search audit log entries.
        - name: page_number
          in: query
          schema:
            type: integer
            format: int64
            default: 1
          description: |
            The page number to return.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int64
            default: 20
          description: |
            The number of items per page.
        - name: order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
          description: |
            The sort order: asc or desc.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogSearchResults'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/bookmark:
    post:
      operationId: createBookmark
      summary: Create bookmark
      tags:
        - Bookmarks
      description: |
        Create a bookmark for this content item for the requesting user.
        A bookmark allows the user to save content for quick access later.
        Each user can only have one bookmark per content item.
        Authenticated access is required. The user must have permission to view the content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '201':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    delete:
      operationId: deleteBookmark
      summary: Delete bookmark
      tags:
        - Bookmarks
      description: |
        Delete the bookmark for this content item for the requesting user.
        Authenticated access is required. The user must have permission to view the content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getBookmark
      summary: Get bookmark
      tags:
        - Bookmarks
      description: |
        Get the bookmark for this content item for the requesting user.
        Returns a bookmark record if the user has bookmarked this content, and a 404 status otherwise.
        Authenticated access is required. The user must have permission to view the content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Bookmark'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/bootstrap:
    post:
      operationId: bootstrap
      summary: Create first administrator and API key
      tags:
        - Bootstrap
      description: |
        This endpoint creates an initial administrator user, provisions an API key for the initial administrator,
        and returns the API key. This endpoint only functions for installations with no pre-existing users.

        #### Code samples

        ::: {.panel-tabset}

        ##### curl

        ```bash
        #!/bin/bash

        BOOTSTRAP_JWT="your.jwt.here"

        curl --silent --show-error -L --max-redirs 0 --fail \
            -X POST \
            -H "Authorization: Connect-Bootstrap ${BOOTSTRAP_JWT}" \
            "https://connect.example.com/__api__/v1/bootstrap"
        ```

        ##### Python

        ```python
        import requests

        bootstrap_jwt = "your.jwt.here"
        headers = { 'Authorization': 'Connect-Bootstrap ' + bootstrap_jwt }

        response = requests.post("https://connect.example.com/__api__/v1/bootstrap",
            headers=headers)
        ```

        ##### R

        ```r
        library(httr)

        bootstrapJwt <- "your.jwt.here"

        result <- POST("https://connect.example.com/__api__/v1/bootstrap",
            add_headers(Authorization = paste("Connect-Bootstrap", bootstrapJwt)))
        ```

        :::
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BootstrapSuccess'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/experimental/bootstrap:
    post:
      operationId: bootstrapExperimental
      summary: Create first administrator and API key
      tags:
        - Bootstrap
      deprecated: true
      description: |
        This endpoint creates an initial administrator user, provisions an
        API key for the initial administrator, and returns the API key. This
        endpoint only functions for installations with no pre-existing users.

        This endpoint is deprecated. Use [POST /v1/bootstrap](#bootstrap) instead.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BootstrapSuccess'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/bundles:
    get:
      operationId: getBundles
      summary: List bundles
      tags:
        - Bundles
      description: |
        List bundles associated with a specific content item.

        Bundle enumeration is permitted by all users with viewership rights to
        the content item and administrators. Information about the target
        environment is populated for users with "publisher" and "administrator" role.

        Results are sorted by ID.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Bundle'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    post:
      operationId: uploadContentBundle
      summary: Create a bundle by uploading an archive
      tags:
        - Bundles
      description: |
        Create a new deployment bundle by uploading an archive.

        Upload a compressed `tar` archive containing code/data that represent
        one deployment of this content. Bundles must be `gzip` compressed
        `tar` archives.

        * All deployment bundles include a `manifest.json` describing the
        contained files and their runtime dependencies.
        * A bundle for a Shiny application includes an `app.R` or `ui.R`
        and `server.R`, and any images or data files required by the
        application.
        * Python API and application bundles include the application source code,
        typically named `app.py`, and a list of required package dependencies
        in `requirements.txt`.
        * An R Markdown document bundle includes the `index.Rmd` file along with
        any R scripts and data files needed to render the report.
        * A Quarto bundle includes at least one `.qmd` file, along with any
        auxiliary files required. Quarto projects include a `_quarto.yml` file.
        * Bundles containing HTML content should include any CSS, Javascript, and
        images required by that document.

        The `manifest.json` file and primary source files like `app.R`, `app.py`, or `index.Rmd`
        must be in the top level of the archived directory. Subdirectories may be used
        for secondary data and scripts.

        Here is how you might use `tar` to create an archive for a Shiny
        application. It includes the manifest, the application, and an image.

        ```bash
        tar zcf bundle.tar.gz ./manifest.json ./app.R ./www/logo.png
        ```

        You could create a bundle for a Python application similarly:

        ```bash
        tar zcf bundle.tar.gz ./manifest.json ./app.py ./requirements.txt ./www/logo.png
        ```

        Here is another example of creating a bundle for an application
        but from its parent directory. The application is in a
        `sales-analyzer` sub-directory. This command will include all files
        in the subdirectory; check to ensure that this does not include
        extraneous files such as output files or local Python environments
        that you do not want in the bundle.

        ```bash
        tar zcf bundle.tar.gz ./sales-analyzer
        ```

        Publishers with collaborator rights to this content (including the
        owner) are permitted to upload deployment bundles. Users without these
        rights are rejected.

        Administrators must be a collaborator for a content item before they
        receive upload rights.

        #### Upload formats

        This endpoint supports two upload methods.

        You can send the bundle archive directly as the request body with
        `Content-Type: application/gzip` or `application/x-gzip`:

        ```bash
        curl -X POST \
          -H "Authorization: Key ${API_KEY}" \
          -H "Content-Type: application/gzip" \
          --data-binary @bundle.tar.gz \
          "https://connect.example.com/__api__/v1/content/${GUID}/bundles"
        ```

        Or, you can send the bundle as a multipart form and include a JSON object of metadata.
        This allows you to include source control information and other arbitrary fields.

        ```bash
        curl -X POST \
          -H "Authorization: Key ${API_KEY}" \
          -F "archive=@bundle.tar.gz" \
          -F 'metadata={"source":"git","source_repo":"https://github.com/org/repo","source_branch":"main","source_commit":"abc123"};type=application/json' \
          "https://connect.example.com/__api__/v1/content/${GUID}/bundles"
        ```

        You can also use multipart form to provide a URL to fetch the bundle from, along with metadata:

        ```bash
        curl -X POST \
          -H "Authorization: Key ${API_KEY}" \
          -F "url=https://content-library.com/bundles/bundle.tar.gz" \
          -F 'metadata={"source":"git","source_repo":"https://github.com/org/repo","source_branch":"main","source_commit":"abc123"};type=application/json' \
          "https://connect.example.com/__api__/v1/content/${GUID}/bundles"
        ```

        The `metadata` form field is optional and accepts a JSON object string.
        Some fields are known to Connect and used in the application:

        * `source` - Source system identifier (e.g., "git", "github-actions", "gitlab-ci")
        * `source_repo` - Repository URL
        * `source_branch` - Branch or reference name
        * `source_commit` - Commit hash or identifier

        Additional custom fields are accepted.
        Field values are stored as strings; non-string values will be serialized
        to JSON.

        #### Code samples

        ::: {.panel-tabset}

        ##### curl

        ###### Binary upload

        ```bash
        API_KEY="your api key"
        FILENAME="archive.tar.gz"

        curl --silent --show-error -L --max-redirs 0 --fail \
            -X POST \
            -H "Authorization: Key ${API_KEY}" \
            -H "Content-Type: application/gzip" \
            --data-binary @"${FILENAME}" \
            "https://connect.example.com/__api__/v1/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/bundles"
        ```

        ###### Multipart upload with metadata

        ```bash
        API_KEY="your api key"
        FILENAME="archive.tar.gz"

        curl --silent --show-error -L --max-redirs 0 --fail \
            -X POST \
            -H "Authorization: Key ${API_KEY}" \
            -F 'metadata={"source":"git","source_repo":"https://github.com/org/repo","source_branch":"main","source_commit":"abc123def456"};type=application/json' \
            -F "archive=@${FILENAME}" \
            "https://connect.example.com/__api__/v1/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/bundles"
        ```

        ###### Multipart upload with URL and metadata

        ```bash
        API_KEY="your api key"

        curl --silent --show-error -L --max-redirs 0 --fail \
            -X POST \
            -H "Authorization: Key ${API_KEY}" \
            -F "url=https://content-library.com/bundles/bundle.tar.gz" \
            -F 'metadata={"source":"git","source_repo":"https://github.com/org/repo","source_branch":"main","source_commit":"abc123def456"};type=application/json' \
            "https://connect.example.com/__api__/v1/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/bundles"
        ```

        ##### Python

        ###### Binary upload

        ```python
        from posit import connect

        # Assumes CONNECT_SERVER and CONNECT_API_KEY are set in the environment

        client = connect.Client()
        filename = "archive.tar.gz"

        with open(filename, "rb") as f:
            response = client.post("/v1/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/bundles",
                data=f)
        ```

        ###### Multipart upload with metadata

        ```python
        import requests
        import json

        # Assumes CONNECT_SERVER and CONNECT_API_KEY are set in the environment

        api_key = "your api key"
        filename = "archive.tar.gz"

        metadata = {
            "source": "git",
            "source_repo": "https://github.com/org/repo",
            "source_branch": "main",
            "source_commit": "abc123def456"
        }

        with open(filename, "rb") as f:
            # Fields can be provided in any order
            files = [
                ("metadata", (None, json.dumps(metadata), "application/json")),
                ("archive", f)
            ]
            response = requests.post(
                "https://connect.example.com/__api__/v1/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/bundles",
                headers={"Authorization": f"Key {api_key}"},
                files=files
            )
        ```

        ###### Multipart upload with URL and metadata

        ```python
        import requests
        import json

        # Assumes CONNECT_SERVER and CONNECT_API_KEY are set in the environment

        api_key = "your api key"

        metadata = {
            "source": "git",
            "source_repo": "https://github.com/org/repo",
            "source_branch": "main",
            "source_commit": "abc123def456"
        }

        # Fields can be provided in any order
        files = [
            ("metadata", (None, json.dumps(metadata), "application/json")),
            ("url", (None, "https://content-library.com/bundles/bundle.tar.gz", "text/plain"))
        ]
        response = requests.post(
            "https://connect.example.com/__api__/v1/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/bundles",
            headers={"Authorization": f"Key {api_key}"},
            files=files
        )
        ```

        ##### R

        ###### Binary upload

        ```r
        library(connectapi)

        # Assumes CONNECT_SERVER and CONNECT_API_KEY are set in the environment

        client <- connect()
        filename <- "archive.tar.gz"
        result <- client$POST("/v1/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/bundles",
            body = upload_file(filename))
        ```

        ###### Multipart upload with metadata

        ```r
        library(httr)
        library(jsonlite)

        # Assumes CONNECT_SERVER and CONNECT_API_KEY are set in the environment

        api_key <- Sys.getenv("CONNECT_API_KEY")
        server <- Sys.getenv("CONNECT_SERVER")
        filename <- "archive.tar.gz"

        metadata <- list(
            source = "git",
            source_repo = "https://github.com/org/repo",
            source_branch = "main",
            source_commit = "abc123def456"
        )

        # Fields can be provided in any order
        result <- POST(
            paste0(server, "/__api__/v1/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/bundles"),
            add_headers(Authorization = paste("Key", api_key)),
            body = list(
                metadata = toJSON(metadata, auto_unbox = TRUE),
                archive = upload_file(filename)
            )
        )
        ```

        :::
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: url
          in: query
          schema:
            type: string
          description: |
            URL of a gzip compressed tar archive.
        - name: X-Content-Checksum
          in: header
          schema:
            type: string
          description: |
            The Base64-encoded MD5 sum of the archive file.
      requestBody:
        content:
          application/gzip:
            schema:
              type: string
              format: binary
          application/x-gzip:
            schema:
              type: string
              format: binary
          multipart/form-data:
            schema:
              type: object
              properties:
                archive:
                  type: string
                  format: binary
                  description: |
                    A gzip compressed tar archive file.
                url:
                  type: string
                  description: |
                    URL of a gzip compressed tar archive. Either archive or url must be provided.
                metadata:
                  type: string
                  description: |
                    Optional JSON object containing metadata about this bundle.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Bundle'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/bundles/{id}:
    delete:
      operationId: deleteBundle
      summary: Delete bundle
      tags:
        - Bundles
      description: |
        Delete a specific bundle.

        Bundle deletion is permitted by authorized clients with collaborator
        rights and administrators.

        On-disk data and database records are removed as a consequence of this
        call. Deletion is not allowed while the bundle is still active.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getBundle
      summary: Get bundle details
      tags:
        - Bundles
      description: |
        Get detailed information about a specific bundle.

        Bundle reads are permitted by all users with viewership rights to the
        content item and administrators. Information about the target environment
        is populated for users with "publisher" and "administrator" role.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Bundle'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/bundles/{id}/download:
    get:
      operationId: downloadBundle
      summary: Download the bundle archive
      tags:
        - Bundles
      description: |
        Download a deployment bundle.

        Bundle download is permitted by authorized clients with collaborator
        rights.

        Download a `gzip` compressed `tar` archive (`.tar.gz`) containing the
        code/data from one deployment of the associated content.

        See the [POST /v1/content/{guid}/bundles](#uploadContentBundle) endpoint for details about
        the construction of bundle archives.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content:
    post:
      operationId: createContent
      summary: Create content item
      tags:
        - Content
      description: |
        Create a new content item.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContentInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getContents
      summary: List content items
      tags:
        - Content
      description: |
        List all content items visible to the requesting user.

        Authenticated access from a user is required. If an "administrator"
        role is used, then all content items will be returned regardless of
        the visibility to the requesting user.

        Information about the target environment is populated for users with
        "publisher" and "administrator" role; it is suppressed for viewers.
      parameters:
        - name: name
          in: query
          schema:
            type: string
          description: |
            The content name specified when the content was created.
            Content names are unique within the owning user's account, so a
            request that specifies a non-empty name and owner_guid will return
            at most one content item.
        - name: owner_guid
          in: query
          schema:
            type: string
            format: uuid
          description: |
            The unique identifier of the user who owns the content.
        - name: include
          in: query
          schema:
            type: string
            enum:
              - tags
              - owner
              - vanity_url
              - bookmarked
              - schedule
          description: |
            Comma-separated set of values indicating additional details to include in the response.

            * `tags`: Populates a `tags` field for each returned content item
            containing the tags associated with this content item.
            * `owner`: Populates an `owner` field for each returned content
            item with basic details about the content owner.
            * `vanity_url`: Populates the `vanity_url` field for each returned
            content item if the content has an associated custom vanity URL.
            * `bookmarked`: Populates a `bookmarked` field for each returned
            content item indicating whether the requesting user has bookmarked
            the content.
            * `schedule`: Populates a `schedules` field for each returned
            content item with the list of schedules associated with the
            content, including variant details and last run information.

      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Content'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}:
    delete:
      operationId: deleteContent
      summary: Delete content
      tags:
        - Content
      description: |
        Delete a specific content item. On-disk data and database records are removed.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getContent
      summary: Get content details
      tags:
        - Content
      description: |
        Get detailed information about a specific content item.

        Unauthenticated clients are rejected regardless of the content access
        type.

        Authorized, non-administrator clients without viewership rights to
        this content are rejected.

        Authorized, administrator clients without viewership rights are
        permitted to obtain information about this content. The computed
        `app_role` for these users will be `none`, representing that these
        users cannot view the content itself.

        Authorized clients with viewership (or collaborator) rights are
        permitted to obtain information about this content. The computed
        `app_role` for these users will reflect the level of access.

        Information about the target environment is populated for users with
        "publisher" and "administrator" role; it is suppressed for viewers.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: include
          in: query
          schema:
            type: string
            enum:
              - tags
              - owner
              - vanity_url
              - bookmarked
              - schedule
          description: |
            Comma-separated set of values indicating additional details to include in the response.

            * `tags`: Populates a `tags` field for each returned content item
            containing the tags associated with this content item.
            * `owner`: Populates an `owner` field for each returned content
            item with basic details about the content owner.
            * `vanity_url`: Populates the `vanity_url` field for each returned
            content item if the content has an associated custom vanity URL.
            * `bookmarked`: Populates a `bookmarked` field for each returned
            content item indicating whether the requesting user has bookmarked
            the content.
            * `schedule`: Populates a `schedules` field for each returned
            content item with the list of schedules associated with the
            content, including variant details and last run information.

      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    patch:
      operationId: updateContent
      summary: Update content
      tags:
        - Content
      description: |
        Update fields for a specific content item.

        Authenticated access from a user having either "publisher" or
        "administrator" role is allowed. All other clients are rejected.

        Authorized clients with collaborator or administrator rights are
        permitted to modify content item fields.

        Administrators can reassign content ownership by updating
        the `owner_guid` field. The new owner must have publisher or
        administrator rights.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContentInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/access-test:
    post:
      operationId: testPublicAccess
      summary: Triggers a Public Access Content Verification test
      tags:
        - Content
      description: |
        Trigger a Public Access Content Verification test for this content item.

        Checks if a content item is available and reachable on the public
        internet. If not, the result includes a message to help with
        troubleshooting. The verification process is identical to the test
        Connect performs automatically for all Public Access Content, but the
        API can provide more details about verification failures or
        immediately retest an item instead of waiting for the automatic
        verification to run.

        See the [Admin Guide](../admin/public-access)
        and [User Guide](../user/content-settings/index.md#public-access-content-verification)
        for more information about Public Access Content Verification.

        To use this API, you must have a license with the Public Access
        entitlement, the content item must be interactive (e.g. Shiny
        applications, FastAPI APIs), and the content item must be configured
        with the "Anyone - no login required"/`all` access type.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTestResult'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/build:
    post:
      operationId: buildContentBundle
      summary: Build deployment bundle
      tags:
        - Content
      description: |
        Build (restore) a deployment bundle.

        Build requests spawn an asynchronous task to make your previously
        uploaded data ready for rendering or running. Content will have its
        environment reconstructed, e.g. by using the packrat R package to
        install R package dependencies, but documents will not be re-rendered.

        Building is intended to facilitate server changes or migrations that
        may require re-installing R packages or other dependencies.

        By default, the built bundle becomes the active bundle for the content.
        You can prevent this by setting `activate: false` in the request body.
        This allows you to build a bundle without making it the active version.

        The response from this endpoint includes a task identifier. Poll the
        [GET /v1/tasks/{id}](#getTask) endpoint to track the progress of this task.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentBuildInstructions'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentBuildTask'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/deploy:
    post:
      operationId: deployContentBundle
      summary: Deploy deployment bundle
      tags:
        - Content
      description: |
        Deploy (activate) a deployment bundle.

        Deployment requests spawn an asynchronous task to make your previously
        uploaded data available for serving. The workflow applied to the
        bundled files varies depending on the type of content.

        Executable content has its environment reconstructed. This includes
        using the packrat R package to install R package dependencies.

        Documents (R Markdown reports, Jupyter Notebooks, static Quarto content)
        are rendered and the result made available.

        Interactive content (applications and APIs) are available to be
        launched on the next client visit.

        The deployment workflow for static content (HTML, plots) is
        lighter-weight than for executable content. File time-stamps are
        updated to ensure that browsers do not cache previous results and
        instead see the newly promoted files.

        By default, the deployed bundle becomes the active bundle for the content.
        You can prevent this by setting `activate: false` in the request body.
        This allows you to deploy a bundle without making it the active version.

        The response from this endpoint includes a task identifier. Poll the
        [GET /v1/tasks/{id}](#getTask) endpoint to track the progress of this task.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentDeploymentInstructions'
      responses:
        '202':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentDeploymentTask'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/environment:
    get:
      operationId: getContentEnvironment
      summary: Get environment variables
      tags:
        - Content
      description: |
        Get the names of the environment variables defined for this content.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentVariableNames'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: setContentEnvironment
      summary: Set all environment variables
      tags:
        - Content
      description: |
        Set the environment for this content item. Any existing environment variables will be removed.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentVariables'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentVariableNames'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    patch:
      operationId: updateContentEnvironment
      summary: Update environment variables
      tags:
        - Content
      description: |
        Add, change, or delete environment variables for this content.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentVariables'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentVariableNames'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/lockfile:
    get:
      operationId: getContentLockfile
      summary: Get Python lockfile
      tags:
        - Content
      description: |
        Get the Python lockfile (`requirements.txt.lock`) for a content item's
        active bundle.

        This endpoint returns the lockfile that describes the exact Python
        packages installed in Connect's managed Python environment for this
        content. The file can be used to recreate the same Python environment
        elsewhere.

        The content must have a managed Python environment
        (`py_environment_management` enabled). Returns an error if the content
        does not use Python or does not have environment management enabled.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/oauth/integrations/associations:
    get:
      operationId: listContentOAuthIntegrationAssociations
      summary: List all OAuth integration associations for this content item
      tags:
        - Content
      description: |
        List all OAuth integration associations for this content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthIntegrationAssociationOutput'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: setOAuthIntegrationAssociations
      summary: Set all OAuth integration associations
      tags:
        - Content
      description: |
        Replaces any existing associations for a piece of content with the given list.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthIntegrationAssociationInput'
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/packages:
    get:
      operationId: getContentPackages
      summary: Get package dependencies
      tags:
        - Content
      description: |
        Get the names and versions of all R and Python packages
        installed for this content. Returned packages are sorted
        by language and then by package name.

        If the content is not yet deployed, an HTTP 204 No Content
        response is returned. If the content environment is being
        rebuilt, package information from before the rebuild
        will be returned.

        Note that a content item may include packages that are not explicitly requested
        in the `manifest.json` or `requirements.txt` file used during deployment. These include
        packages that are:
        - Installed as dependencies of the explicitly requested packages,
        - Installed by Connect in order to render or serve the content item,
        - Installed in the base Python installation and inherited by the content item, or
        - Listed under [`R.External`](../admin/appendix/configuration/index.md#R.External) in the Connect configuration file.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentPackages'
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/render:
    post:
      operationId: renderContent
      summary: Render content
      tags:
        - Content
      description: |
        Render a specific content item.

        Render requests spawn an asynchronous task to re-render static reports
        (R Markdown documents, Jupyter Notebooks, or Quarto documents). The
        rendered output becomes the active rendering for the variant.

        By default, the default variant is rendered. You can render a specific
        variant by providing its key in the request body.

        Users with "editor" or higher role on the content can render any public
        variant, and private variants they own. Users with "viewer" role can
        only render ad-hoc variants when the
        [`Applications.ViewerOnDemandReports`](../admin/appendix/configuration/index.md#Applications.ViewerOnDemandReports) server setting is enabled.

        The response from this endpoint includes a task identifier. Poll the
        [GET /v1/tasks/{id}](#getTask) endpoint to track the progress of this task.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentRenderInstructions'
      responses:
        '202':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentRenderTask'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/repository:
    delete:
      operationId: deleteContentRepository
      summary: Remove Git repository location
      tags:
        - Content
      description: |
        Remove the Git repository location associated with this content.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getContentRepository
      summary: Get Git repository
      tags:
        - Content
      description: |
        Get the Git repository location associated with this content.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitLocationOutput'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    patch:
      operationId: updateContentRepository
      summary: Update Git repository
      tags:
        - Content
      description: |
        Update the Git repository location associated with this content.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitLocationInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitLocationOutput'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: setContentRepository
      summary: Set Git repository
      tags:
        - Content
      description: |
        Associate a Git repository location with this content.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitLocationInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitLocationOutput'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/thumbnail:
    delete:
      operationId: deleteContentThumbnail
      summary: Delete a content thumbnail
      tags:
        - Content
      description: |
        Delete the thumbnail associated with a content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: setContentThumbnail
      summary: Set a content thumbnail
      tags:
        - Content
      description: |
        Set a content thumbnail.

        Associate a content item with an image that is used as its thumbnail
        in the Connect dashboard content listing and settings view.

        #### Requesting a thumbnail

        The thumbnail is requested by appending a `__thumbnail__` path segment
        to the default content URL or a content vanity URL.

        For example, the thumbnail for a content item having the GUID
        `25438b83-ea6d-4839-ae8e-53c52ac5f9ce` and the vanity URL
        `/daily-summary/` is served at the URLs:

        * `https://connect.company.com/content/25438b83-ea6d-4839-ae8e-53c52ac5f9ce/__thumbnail__`
        * `https://connect.company.com/daily-summary/__thumbnail__`

        Thumbnail requests are subject to content access restrictions. An HTTP
        204 No Content is served when there is no thumbnail. Thumbnails are
        not served for incomplete content.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/search/content:
    get:
      operationId: searchContent
      summary: Search for content items
      tags:
        - Content
      description: |
        This endpoint searches for content items, using a search query format
        that allows for both search terms and filters. The search terms are used
        to find content items that have matching terms in the title,
        description, etc, while the filters are used to filter the search
        results by specific fields (such as `owner` or content `type`).

        Authenticated access is required, and only content items visible to the
        requesting user are returned. If an Administrator role is used,
        then all content items are returned regardless of the visibility to
        the requesting user.

        #### Search query

        The search query is a string that includes both search terms and
        filters. Any text in the search query that is not a supported filter
        is treated as a search term, and those search terms are matched
        against any of: `name`, `title`, or `description`. Note that the search
        terms are case-insensitive, and all terms must be present in a content
        item for it to be included in the search results.

        ##### Filters

        Filters are specified as colon-delimited key-value pairs, containing one
        or more values separated by commas. If any of the values within a filter
        contain a space or comma, you should use quotes around the value. Example:

        ```
        myterm tag:tagwithoutspace,"tag with space"
        ```

        For filters that expect a boolean value (like `published:`, `locked:`,
        and `bookmarked:`), you can use the shorthand `is:<field>` as an
        equivalent to `<field>:true`. Similarly, you can use `not:<field>` as an
        equivalent to `<field>:false`. Examples:

        ```
        is:published
        ```

        ```
        not:locked
        ```

        ```
        is:bookmarked
        ```

        Additionally, you can negate a filter or search term by prefixing it
        with a `-`. For example, `-owner:@me` will exclude content items
        owned by the requesting user.

        The following filters are supported:

        `owner:<username>[,<additional-usernames>,...]`: Only return content
        items that have the specified owner by username. If more than one
        username is provided, content items owned by ANY of the specified owners
        will be included. Note that usernames are not case sensitive.

        `type:<content-type>[,<additional-content-types>,...]`: Only return
        content items that have the specified content type. If more than one
        type is provided, content items with ANY of the specified types will be
        included. See `app_mode` for a list of supported types and their
        description.

        `tag:<tag-name>[,<additional-tag-names>,...]`: Only return content
        items that have been tagged with the specified tag name. If more than
        one tag name is provided, content items with *any* of the specified tag
        names are included. Additionally, since tags are hierarchical, they
        do not necessarily have unique names. For example, you may have one
        `docs` tag that is nested under a `finance` tag, and a separate `docs`
        tag that is nested under an `engineering` tag. If you specify
        `tag:docs`, it will match content items with either of those `docs`
        tags. If you want a specific tag, you can specify the path to the tag,
        delimited by `/`. In this case, `tag:finance/docs` would only match the
        `docs` tag that is nested directly under the `finance` tag.

        `published:<true|false>` - Only return content items that have been
        published, which means that a bundle has been uploaded for the content
        item.

        `locked:<true|false>` - Only return content items that have been locked.

        `bookmarked:<true|false>` - Only return content items that have been
        bookmarked by the requesting user.

        `scheduled:<true|false>` - Only return content items that have been
        scheduled to run on a recurring basis.

        `python:<version>` - Only return content items that use a specific Python
        version in their runtime environment. The version can be specified as
        `3`, `3.11`, or `3.11.5`. You can find content items that use
        any version of Python by specifying `is:python`.

        `r:<version>` - Only return content items that use a specific R
        version in their runtime environment. The version can be specified as
        `4`, `4.3`, or `4.3.1`. You can find content items that use
        any version of R by specifying `is:r`.

        `package:<name>[version]` - Only return content items that have a
        specific package in their runtime environment. If a version specification
        is provided, only return content items that have a matching
        version for the package. Examples:

        - `flask`: Return items that include the `flask` package.
        - `flask==2.3.4`: Return items that include `flask` version `2.3.4`. Versions
          ending in `.0` are equivalent to versions without the `.0`.
        - `flask==2.3.*`: Return items that include any `flask` version starting with `2.3`.
        - `flask>=2.3`: Return items that include `flask` version `2.3` or newer.
        - Similarly, you can use `<=`, `<`, `>`, and `!=`. You can combine criteria
          with commas, such as `"flask>=2.3,<3"`; those must be enclosed in double-quotes.
          Alternatively, you can use the `package` filter multiple times:
          `package:flask>=2.3 package:flask<3`.
        - `flask~=2.3.4`: Return items that include a  `flask` version compatible with `2.3.4`;
          that is, a `2.3.x` version that is `>=2.3.4`.
        - `flask===2.3`: Return items that include a  `flask` version that exactly matches `2.3`.
          Version `2.3.0` would not match this filter.

        Note that a content item may include packages that are not explicitly requested
        in the `manifest.json` or `requirements.txt` file used during deployment. These include
        packages that are:

        - Installed as dependencies of the explicitly requested packages,
        - Installed by Connect in order to render or serve the content item,
        - Installed in the base Python installation and inherited by the content item, or
        - Listed under [`R.External`](../admin/appendix/configuration/index.md#R.External) in the Connect configuration file.

        `image:<image_name>` - Only return content items that use a specific image in
        their execution environment. This filter performs partial string matching on the
        image name in either the `image_name` or `default_image_name` content fields.

        #### Validation warnings

        When a filter value is invalid (for example, `published:bogus`
        instead of `published:true`), the invalid filter is ignored and
        the response includes a `warnings` array with messages explaining
        which filters were not applied and why. Results are returned as
        if the invalid filter was not specified.

        #### Pagination

        This endpoint uses offset pagination. Requests can include
        query-string parameters for `page_number` and `page_size` to
        fetch different pages of results.
      parameters:
        - name: q
          in: query
          schema:
            type: string
        - name: include
          in: query
          schema:
            type: string
            enum:
              - tags
              - owner
              - vanity_url
              - bookmarked
              - schedule
          description: |
            Comma-separated set of values indicating additional details to include in the response.

            * `tags`: Populates a `tags` field for each returned content item
            containing the tags associated with this content item.
            * `owner`: Populates an `owner` field for each returned content
            item with basic details about the content owner.
            * `vanity_url`: Populates the `vanity_url` field for each returned
            content item if the content has an associated custom vanity URL.
            * `bookmarked`: Populates a `bookmarked` field for each returned
            content item indicating whether the requesting user has bookmarked
            the content.
            * `schedule`: Populates a `schedules` field for each returned
            content item with the list of schedules associated with the
            content, including variant details and last run information.

        - name: page_number
          in: query
          schema:
            type: integer
            format: int64
            default: 1
          description: |
            The page number to return.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int64
            default: 20
          description: |
            The number of items per page.
        - name: sort
          in: query
          schema:
            type: string
          description: |
            The field to sort by.
        - name: order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
          description: |
            The sort order: asc or desc.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentResults'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/search/variants:
    get:
      operationId: searchVariants
      summary: Search for variants
      tags:
        - Content
      description: |
        This endpoint searches for variants (report outputs).
        Variants are created when reports are rendered. A parameterized report
        may have multiple variants when it is rendered with different parameter
        values.

        Authenticated access is required. Administrators can see public
        variants, and their own private variants, for all content, while other
        users can only see variants for content they own or have permissions to
        access.

        #### Variant visibility

        In addition to content-level permissions, variants have their own
        visibility settings:

        - **Public variants**: Visible to all users who can access the parent content
        - **Private variants**: Only visible to the variant owner, regardless of
          content permissions

        ADHOC variants (temporary renders) are never returned in search results.

        #### Pagination

        This endpoint uses offset pagination. Requests can include
        query-string parameters for `page_number` and `page_size` to
        fetch different pages of results.
      parameters:
        - name: q
          in: query
          schema:
            type: string
        - name: page_number
          in: query
          schema:
            type: integer
            format: int64
            default: 1
          description: |
            The page number to return.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int64
            default: 20
          description: |
            The number of items per page.
        - name: sort
          in: query
          schema:
            type: string
          description: |
            The field to sort by.
        - name: order
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
          description: |
            The sort order: asc or desc.
        - name: include
          in: query
          schema:
            type: string
            enum:
              - schedule
          description: |
            A comma-separated list of additional information to include in the response.

            * `schedule`: Include schedule information for each variant, including
            the schedule configuration and last run details.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariantResults'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/permissions:
    post:
      operationId: addContentPermission
      summary: Add or update permission
      tags:
        - Content Permissions
      description: |
        Upsert a user or group to the permissions for this content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PermissionInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
        '201':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listContentPermissions
      summary: List permissions
      tags:
        - Content Permissions
      description: |
        List the permissions for this content item.
        There will be one permission item for each user or group
        listed in the ACL for this content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Permission'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/permissions/{id}:
    delete:
      operationId: deleteContentPermission
      summary: Delete permission
      tags:
        - Content Permissions
      description: |
        Delete a single permission entry for the content item, given its ID.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getContentPermission
      summary: Get permission
      tags:
        - Content Permissions
      description: |
        Get a single permission entry for the content item, given its ID.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: updateContentPermission
      summary: Update permission
      tags:
        - Content Permissions
      description: |
        Update a permission entry for this content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PermissionInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/documentation:
    delete:
      operationId: deleteCustomDocumentation
      summary: Delete custom documentation
      tags:
        - Custom Documentation
      description: |
        Delete the custom documentation for your Posit Connect server.
        This action is only available to administrators.
        Returns a 204 No Content response if the documentation was successfully deleted.
        Returns a 404 Not Found error if no custom documentation is configured.
      responses:
        '204':
          description: Successful response.
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getCustomDocumentation
      summary: Get custom documentation
      tags:
        - Custom Documentation
      description: |
        Retrieve the custom documentation for your Posit Connect server, formatted using Markdown.
        Returns a 404 Not Found error if no custom documentation is configured.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDocumentationResult'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    post:
      operationId: setCustomDocumentation
      summary: Set custom documentation
      tags:
        - Custom Documentation
      description: |
        Set the custom documentation for your Posit Connect server, formatted using Markdown.
        The maximum length for the provided documentation is 500000 characters.
        This action is only available to administrators.
        Returns a 204 No Content response if the documentation was successfully set.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomDocumentationInput'
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/environments/{guid}/permissions:
    post:
      operationId: addEnvironmentPermission
      summary: Add permission
      tags:
        - Environment Permissions
      description: |
        Grants a user or group access to this execution environment.
        You must have administrator privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentPermissionInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentPermission'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listEnvironmentPermissions
      summary: List permissions
      tags:
        - Environment Permissions
      description: |
        List the users and groups that have access to this execution environment.
        You must have administrator privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EnvironmentPermission'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/environments/{guid}/permissions/{permission_guid}:
    delete:
      operationId: deleteEnvironmentPermission
      summary: Delete permission
      tags:
        - Environment Permissions
      description: |
        Removes access to this execution environment from a user or group.
        You must have administrator privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: permission_guid
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getEnvironmentPermission
      summary: Get permission
      tags:
        - Environment Permissions
      description: |
        Get a single permission entry for the execution environment, given its GUID.
        You must have administrator privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: permission_guid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentPermission'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/environments:
    post:
      operationId: createEnvironment
      summary: Create execution environment
      tags:
        - Environments
      description: |
        Create a new execution environment.

        You must have administrator privileges to perform this action.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnvironmentInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listEnvironments
      summary: List execution environments
      tags:
        - Environments
      description: |
        List all execution environments available to Posit Connect.

        You must have administrator or publisher privileges to perform this action.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Environment'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/environments/{guid}:
    delete:
      operationId: deleteEnvironment
      summary: Delete an execution environment
      tags:
        - Environments
      description: |
        Delete a specific execution environment.

        You must have administrator privileges to perform this action.

        Environments managed by a configuration file cannot be deleted via the API.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getEnvironment
      summary: Get execution environment details
      tags:
        - Environments
      description: |
        Get detailed information about a specific execution environment.

        You must have administrator or publisher privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: updateEnvironment
      summary: Update an execution environment
      tags:
        - Environments
      description: |
        Update a specific execution environment.

        You must have administrator privileges to perform this action.

        Environments managed by a configuration file cannot be updated via the API.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEnvironmentInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/examples:
    get:
      operationId: getExamples
      summary: List examples
      tags:
        - Examples
      deprecated: true
      description: |
        List all examples.

        **This endpoint is deprecated.**
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/examples/{name}/thumbnail:
    get:
      operationId: getExampleThumbnail
      summary: Get example thumbnail
      tags:
        - Examples
      deprecated: true
      description: |
        Download the thumbnail image for the named example.

        **This endpoint is deprecated.**
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/examples/{name}/zip:
    get:
      operationId: getExampleZip
      summary: Download example
      tags:
        - Examples
      deprecated: true
      description: |
        Download a ZIP archive containing the named example.

        **This endpoint is deprecated.**
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/feature-usage:
    get:
      operationId: listFeatureUsage
      summary: Provides details about all tracked features.
      tags:
        - Feature Usage
      description: |
        This endpoint returns details about all tracked features.
        This endpoint requires publisher access.
        The response is not paginated. All flags are returned.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/experimental/groups/{guid}/content:
    get:
      operationId: getGroupOwnershipExperimental
      summary: List content for which a group with given GUID has access to
      tags:
        - Groups
      description: |
        This endpoint takes a group GUID and returns a list of content items with access control lists
        that the given group is listed on. This includes content accessible only by specific users
        or groups that include the given group, as well as content accessible by anyone or only
        logged-in users that includes the given group as a collaborator.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GroupOwnershipContent'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/groups:
    put:
      operationId: createRemoteGroup
      summary: Create a group using details from a remote authentication provider (LDAP)
      tags:
        - Groups
      description: |
        This endpoint creates the given group on the Posit Connect server.

        - This endpoint is used only for LDAP authentication. Password,
          PAM, SAML, OAuth2 and Proxied authentication providers should
          use the [POST /v1/groups](#createGroup) endpoint.
        - Publisher or administrator access is required to access this
          endpoint.
        - Group members will be automatically populated from the LDAP server.

        ### Group Creation Workflow on LDAP

        The API lets you identify an existing group in the LDAP system
        and create a corresponding group on Posit Connect. This is a
        two-step process:

        - Use the [GET /v1/groups/remote](#searchRemoteGroups) endpoint. This endpoint will return a list of potential
          matching groups in LDAP. A group that does not exist in
          Posit Connect will lack a `guid`. Note the `temp_ticket`
          for the desired group.
        - Use this PUT endpoint with the `temp_ticket` to create a
          corresponding group on Posit Connect.

        The Cookbook contains a recipe on [Creating a Group Using a
        Remote Authentication Provider
        (LDAP)](../cookbook/groups/creating-a-group-using-a-remote-authentication-provider-ldap/)
        which demonstrates this workflow using the R and Python SDKs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupCreateRemoteInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    post:
      operationId: createGroup
      summary: Create a group from caller-supplied details (Password, PAM, OAuth2, SAML, Proxied)
      tags:
        - Groups
      description: |
        This endpoint creates the given group.

        - This endpoint is available only when groups are enabled
        in Posit Connect and only for Password, PAM, OAuth2,
        SAML and Proxied authentication.
        - Publisher or administrator access is required to create
        groups.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupCreateInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getGroups
      summary: List or search for group details
      tags:
        - Groups
      description: |
        This endpoint lists or searches for local groups.

        - For a `prefix` search, results are sorted based on
        similarity to the `prefix`. A `prefix` search ignores
        `asc_order`.
        - The `prefix` can also be an exact match for the
        group's DN (for LDAP) or the auth provider's unique ID
        for the group, if any.
        - For a non-`prefix` search, results are sorted by group name.

        This endpoint is available only when groups are enabled
        in Posit Connect and it will return an error otherwise.

        This endpoint uses offset pagination. Requests can include
        query-string parameters for `page_number` and `page_size` to
        fetch different pages of results.
      parameters:
        - name: prefix
          in: query
          schema:
            type: string
        - name: page_number
          in: query
          schema:
            type: integer
            format: int32
            default: 1
          description: |
            The page number to return.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
            default: 20
          description: |
            The number of items per page.
        - name: asc_order
          in: query
          schema:
            type: boolean
            default: true
          description: |
            Whether results are in ascending order.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
            default: 20
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Groups'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/groups/remote:
    get:
      operationId: searchRemoteGroups
      summary: Search for group details from a remote provider
      tags:
        - Groups
      description: |
        This endpoint is used to support operations against groups not
        managed by Connect, such as creating LDAP groups.
        See [GET /v1/groups](#getGroups) for listing groups on Posit Connect.

        This endpoint searches for groups on Posit Connect and on
        your LDAP system.

        Results are sorted based on similarity to the `prefix`.

        - This endpoint can be used only by LDAP authentication and
        will return an error otherwise.
        - Publisher or administrator access is required to access this
        endpoint.
      parameters:
        - name: prefix
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 20
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupRemoteSearch'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/groups/{group_guid}/members:
    post:
      operationId: addGroupMember
      summary: Add a group member
      tags:
        - Groups
      description: |
        This endpoint adds a user to a group.

        - This endpoint is available only when groups are enabled
        in Posit Connect and only for Password, PAM, OAuth2,
        SAML and Proxied authentication. If the auth provider
        is configured to provide group membership information,
        then it is not possible to add/remove members via this API.
        - Administrator access is required to modify a group you do
        not own.
      parameters:
        - name: group_guid
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupMemberAddInput'
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getGroupMembers
      summary: Get group member details
      tags:
        - Groups
      description: |
        This endpoint gets the group member details. Group member
        enumeration is currently not supported for LDAP.

        - This endpoint is available only when groups are enabled
        in Posit Connect and only for Password, PAM, OAuth2,
        SAML and Proxied authentication.
        - The `email` field is not populated for non-admins when
        [`Server.HideEmailAddresses`](../admin/appendix/configuration/index.md#Server.HideEmailAddresses) is enabled.
      parameters:
        - name: group_guid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupMembers'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/groups/{group_guid}/members/{user_guid}:
    delete:
      operationId: removeGroupMember
      summary: Remove a group member
      tags:
        - Groups
      description: |
        This endpoint removes a user from a group.

        - This endpoint is available only when groups are enabled
        in Posit Connect and only for Password, PAM, OAuth2,
        SAML and Proxied authentication. If the auth provider
        is configured to provide group membership information,
        then it is not possible to add/remove members via this API.
        - Administrator access is required to remove a user from a
        group you do not own, but no special access is needed to
        remove yourself from a group.
      parameters:
        - name: group_guid
          in: path
          required: true
          schema:
            type: string
        - name: user_guid
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/groups/{guid}:
    get:
      operationId: getGroup
      summary: Get group details
      tags:
        - Groups
      description: |
        Get detailed information on a specific group.

        This endpoint is available only when groups are enabled in Posit Connect.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    patch:
      operationId: patchGroup
      summary: Update a group (partial update)
      tags:
        - Groups
      description: |
        This endpoint updates the specified fields of a group. Only fields
        included in the request body will be modified; omitted fields remain
        unchanged.

        This endpoint requires groups to be enabled via the
        [`Authorization.UserGroups`](../admin/appendix/configuration/index.md#Authorization.UserGroups)
        setting. Returns a 400 error if groups are disabled.

        ### Field availability by authentication provider

        Not all fields can be modified with all authentication providers:

        | Field | Password | PAM | LDAP | SAML | OAuth2 | Proxied |
        |-------|----------|-----|------|------|--------|---------|
        | `name` | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
        | `owner_guid` | ✓¹ | ✓¹ | ✗ | Configurable² | Configurable² | Configurable² |
        | `gid` | ✗ | ✗ | ✓ | ✓ | ✓ | ✗ |

        ¹ Password and PAM groups are managed locally in Connect and require
        an owner to manage group membership. Ownership can be transferred to
        another user but cannot be cleared.

        ² Behavior depends on the `GroupsAutoProvision` setting. When enabled,
        owners cannot be assigned or transferred, but existing owners can be
        cleared. When disabled, owners can be assigned or transferred but not
        cleared (same as Password and PAM).

        ### Authorization requirements

        | Field | Required role |
        |-------|---------------|
        | `name` | Group owner or administrator |
        | `owner_guid` | Group owner or administrator |
        | `gid` | Administrator only |

        **Caution**: When using SAML or OAuth2 with `GroupsAutoProvision`
        enabled but `GroupsByUniqueId` disabled, renaming a group in the
        identity provider creates a new group in Connect. The original group
        becomes orphaned but retains its `gid`. To transfer the `gid` to the
        new group, either delete the old group or set its `gid` to `null`,
        then set the `gid` on the new group.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupPatchInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    delete:
      operationId: deleteGroup
      summary: Delete a group
      tags:
        - Groups
      description: |
        Delete the given group.

        - This endpoint can be used only when groups are enabled in
        Posit Connect and will return an error otherwise.
        - Administrator access is required to delete a group you do
        not own.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    post:
      operationId: updateGroup
      summary: Modify a group name or owner (Password, PAM, OAuth2, SAML, Proxied)
      tags:
        - Groups
      description: |
        This endpoint modifies the given group.

        - This endpoint is available only when groups are enabled
        in Posit Connect and only for Password, PAM, OAuth2,
        SAML and Proxied authentication.
        - Publisher or administrator access is required to modify
        groups.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupUpdateInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/instrumentation/content/hits:
    get:
      operationId: getContentHits
      summary: Get all content hits
      tags:
        - Instrumentation
      description: |
        This endpoint returns content usage information for all content types, also known as hits, where hits
        are individual activity events such as content visits or requests to APIs hosted on Posit Connect.

        This endpoint requires administrator or publisher access. Publishers can
        query visits data for content they own or are a collaborator on.

        #### Filtering of results:

        There are several ways the result set can be filtered by the server before
        being sent back within the API response. If multiple filters are in effect,
        they will be logically ANDed together.

        ##### Implicit filtering

        If the user calling the endpoint is a publisher, the data returned will be
        limited to the content owned by the user.

        ##### Time windows

        This API accepts optional `from` and `to` timestamps to define a window of
        interest.  If `from` is not specified, it is assumed to be before the earliest
        recorded information.  If `to` is not specified, it is assumed to be "now".

        Any content hit activity that falls inclusively within the time window will be
        part of the result set.

        #### Responses

        The response of a call will contain zero or more data records representing a hit
        by a user to a piece of content. As opposed to other instrumentation API endpoints,
        this API is better suited to consume large amounts of unfiltered content activity records,
        to later be analysed and processed by the consumer.
      parameters:
        - name: content_guid
          in: query
          schema:
            type: string
        - name: from
          in: query
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContentHitEntry'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/instrumentation/content/visits:
    get:
      operationId: getContentVisits
      summary: Get content visits
      tags:
        - Instrumentation
      description: |
        This endpoint returns a portion of the visit (or "hits") information for all
        content types _other than Shiny applications_. The results returned include
        paging details that can be used to navigate the information this endpoint
        returns.

        The information returned is based on data collected by Posit Connect as
        users visit content in the dashboard or make requests to applications or APIs
        hosted on Connect.

        #### Important notes

        In the past there were issues with how visits were recorded that caused extra
        entries to be stored under certain circumstances. These will affect analyses
        that interpret visit counts. Entries that were recorded before issues were
        addressed are not returned by default.  If you desire these records, specify
        the `min_data_version` filter with a value of `0` (the default value is `3`).

        This endpoint requires administrator or publisher access. Publishers can
        query visits data for content they own or are a collaborator on.

        #### Filtering of results:

        There are several ways the result set can be filtered by the server before
        being sent back within the API response. If multiple filters are in effect,
        they will be logically ANDed together.

        ##### Implicit filtering

        If the user calling the endpoint is a publisher, the data returned will be
        limited to the content owned by the user.

        ##### Time windows

        This API accepts optional `from` and `to` timestamps to define a window of
        interest.  If `from` is not specified, it is assumed to be before the earliest
        recorded information.  If `to` is not specified, it is assumed to be "now".

        Any visit to content that falls inclusively within the time window will be
        part of the result set.

        #### Responses

        The response of a call will contain zero or more data records representing a visit
        by a user to a piece of content.  No more than `limit` records will be returned.
        Multiple requests of this endpoint are typically required to retrieve the complete
        result set from the server.  To facilitate this, each response includes a paging
        object containing full URL links which can be requested to iteratively move forward
        or backward through multiple response pages.
      parameters:
        - name: content_guid
          in: query
          schema:
            type: string
        - name: min_data_version
          in: query
          schema:
            type: integer
            format: int32
            default: 3
        - name: user_agent
          in: query
          schema:
            type: string
        - name: from
          in: query
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 20
        - name: previous
          in: query
          schema:
            type: string
        - name: next
          in: query
          schema:
            type: string
        - name: asc_order
          in: query
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentVisitLogs'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/instrumentation/shiny/usage:
    get:
      operationId: getShinyAppUsage
      summary: Get Shiny app usage
      tags:
        - Instrumentation
      description: |
        This endpoint returns a portion of the Shiny application usage information,
        as well as paging details that can be used to navigate that information.

        The information returned is based on data collected by Posit Connect as
        users visit Shiny applications.  Because of how visits are detected, end
        times will be slightly inflated by a reconnect timeout, generally around
        15 seconds.

        #### Important notes

        Prior to the release of this API, there was an issue with how visits were
        recorded that caused extra entries to be stored.  These will affect analyses
        that interpret visit counts or durations.  Entries that were recorded before
        the issue was addressed are not returned by default.  If you desire these
        records, specify the `min_data_version` filter with a value of 0.

        - Because of how visits are detected, end times will be slightly inflated by the
          currently configured client reconnect timeout, which defaults to 15 seconds.
          The ending time may also be affected by connect and read timeout
          settings.

          The [Shiny Application
          Events](../admin/operational-metrics/index.md#shiny-application-events)
          section of the Posit Connect Admin Guide has more details about
          how these events are collected.
        - This endpoint requires administrator or publisher access. Publishers can
          query Shiny usage data for content they own or are a collaborator on.

        #### Filtering of results:

        There are several ways the result set can be filtered by the server before
        being sent back within the API response. If multiple filters are in effect,
        they will be logically ANDed together.

        ##### Implicit filtering

        If the user calling the endpoint is a publisher, the data returned will be
        limited to those applications owned by the user.

        ##### Time windows

        This API accepts optional `from` and `to` timestamps to define a window of
        interest.  If `from` is not specified, it is assumed to be before the earliest
        recorded information.  If `to` is not specified, it is assumed to be "now".

        Any visit to content that falls inclusively within the time window will be
        part of the result set.

        #### Responses

        The response of a call will contain zero or more data records representing a session
        by a user of a Shiny application.  No more than `limit` records will be returned.
        Multiple requests of this endpoint are typically required to retrieve the complete
        result set from the server.  To facilitate this, each response includes a paging
        object containing full URL links which can be requested to iteratively move forward
        or backward through multiple response pages.
      parameters:
        - name: content_guid
          in: query
          schema:
            type: string
        - name: min_data_version
          in: query
          schema:
            type: integer
            format: int32
            default: 1
        - name: from
          in: query
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 20
        - name: previous
          in: query
          schema:
            type: string
        - name: next
          in: query
          schema:
            type: string
        - name: asc_order
          in: query
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShinyAppUsageLogs'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/jobs:
    get:
      operationId: getJobs
      summary: Get jobs
      tags:
        - Jobs
      description: |
        Get the list of jobs for a given piece of content.
        This action is permitted for content owners, users with collaborator rights, and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Job'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/jobs/{key}:
    get:
      operationId: getJob
      summary: Get job
      tags:
        - Jobs
      description: |
        Get a job for a given piece of content by key.
        This action is permitted for content owners, users with collaborator rights, and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: key
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    delete:
      operationId: killJob
      summary: Register job kill order
      tags:
        - Jobs
      description: |
        Request to register an order to kill a specific job.
        This action is permitted for content owners, users with collaborator rights, and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: key
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KillJobOrder'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/jobs/{key}/download:
    get:
      operationId: jobDownloadLog
      summary: Download job log file
      tags:
        - Jobs
      description: |
        Download a content job log file.
        This action is permitted for content owners, users with collaborator rights, and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: key
          in: path
          required: true
          schema:
            type: string
        - name: filename
          in: query
          schema:
            type: string
          description: |
            false "The name of the file to retrieve"
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/jobs/{key}/error:
    get:
      operationId: jobError
      summary: Get job error
      tags:
        - Jobs
      description: |
        Get the primary error for a job (if one exists).
        This action is permitted for content owners, users with collaborator rights, and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: key
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoggedError'
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/jobs/{key}/log:
    get:
      operationId: jobLogs
      summary: Get job log
      tags:
        - Jobs
      description: |
        Get the log output for a given job.
        This action is permitted for content owners, users with collaborator rights, and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: key
          in: path
          required: true
          schema:
            type: string
        - name: maxLogLines
          in: query
          schema:
            type: integer
          description: |
            false "The maximum number of log lines to return"
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogEntries'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/jobs/{key}/metrics:
    get:
      operationId: getJobMetrics
      summary: Get job metrics
      tags:
        - Jobs
      description: |
        Get resource usage metrics collected for a specific job.

        Returns JSON data containing CPU, memory, and connection metrics sampled
        during job execution. The metrics are only available when per-content
        metrics collection is enabled for the content item.

        This action is permitted for content owners, users with collaborator rights,
        and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: key
          in: path
          required: true
          schema:
            type: string
        - name: from
          in: query
          schema:
            type: string
        - name: to
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobMetrics'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/jobs/{key}/tail:
    get:
      operationId: jobTailLog
      summary: Tail job log
      tags:
        - Jobs
      description: |
        Actively tail the log output for a given job.
        This action is permitted for content owners, users with collaborator rights, and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: key
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogEntry'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/experimental/jobs/summary:
    get:
      operationId: getJobsSummary
      summary: Get aggregated job statistics for scheduled content
      tags:
        - Jobs
      description: |
        Get aggregated job statistics for scheduled content.

        Returns total counts of running, waiting, succeeded, and failed scheduled jobs, plus a
        time-series histogram of job outcomes bucketed by time.

        This endpoint includes **only scheduled jobs**. On-demand executions
        (ad-hoc deployments, manual runs) are excluded. This provides statistics
        specifically for scheduled content execution.

        **Authorization:**

        - **Administrators** see statistics for all content system-wide
        - **Publishers** see statistics only for content they own or collaborate on (editor role or higher)
        - **Viewers** are denied access (403 Forbidden)

        The time bucketing strategy automatically adjusts based on the time range:

        - Range < 2 hours → 5-minute buckets
        - Range < 12 hours → 30-minute buckets
        - Range < 2 days → 1-hour buckets
        - Range < 10 days → 6-hour buckets
        - Range < 60 days → 1-day buckets
        - Range < 180 days → 7-day buckets
        - Range >= 180 days → 30-day buckets

        If no time range is specified, statistics cover all jobs in the database.
      parameters:
        - name: from
          in: query
          schema:
            type: string
          description: |
            false "Include only jobs with start_time at or after this timestamp (RFC3339)"
        - name: to
          in: query
          schema:
            type: string
          description: |
            false "Include only jobs with start_time at or before this timestamp (RFC3339)"
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobSummary'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/templates:
    get:
      operationId: listOAuthTemplates
      summary: List OAuth templates
      tags:
        - OAuth Integration Templates
      description: |
        List OAuth templates available to Posit Connect.
        You must have administrator or publisher privileges to perform this action.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OAuthTemplate'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/templates/{key}:
    get:
      operationId: getOAuthTemplate
      summary: Get OAuth template details
      tags:
        - OAuth Integration Templates
      description: |
        Get information about a specific OAuth template.
        You must have administrator or publisher privileges to perform this action.
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthTemplate'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/integrations:
    post:
      operationId: createOAuthIntegration
      summary: Create an OAuth integration
      tags:
        - OAuth Integrations
      description: |
        Create a new OAuth integration.
        You must have administrator privileges to perform this action.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthIntegrationInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthIntegration'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '402':
          description: The requested operation requires payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listOAuthIntegrations
      summary: List OAuth integrations
      tags:
        - OAuth Integrations
      description: |
        List all OAuth integrations available to Posit Connect.
        You must have administrator or publisher privileges to perform this action.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OAuthIntegration'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/integrations/credentials:
    post:
      operationId: exchangeCredentials
      summary: Exchange Connect credentials for OAuth credentials
      tags:
        - OAuth Integrations
      description: |
        This endpoint facilitates an [OAuth Token Exchange](https://datatracker.ietf.org/doc/html/rfc8693) by
        exchanging a Connect-provided credential for OAuth credentials.

        There are several types of OAuth token exchanges supported by this endpoint. It allows content
        owners to exchange the viewer's Connect credentials for the viewer's OAuth credentials, and it allows executing content
        to exchange its own Connect credentials for the OAuth credentials associated with a service account.

        This endpoint can only be called _from content that is running on Posit Connect_ because the Connect-provided
        credentials required by the endpoint are only available in that context. See the `subject_token` property for details.

        In the case of a *Viewer credential exchange*, this endpoint requires that the content viewer first perform an OAuth
        login by visiting the login endpoint of the OAuth integration in their browser.
        The login endpoint is located at `__oauth__/integrations/:guid/login`.

        Once the viewer has successfully initialized an OAuth session for the OAuth integration by visiting the login endpoint,
        the content can then exchange the viewer's `user-session-token` for the viewer's OAuth credentials.

        OAuth credential refresh is handled automatically by Connect. Repeated requests to this endpoint will return
        the same OAuth credentials until they expire. When the OAuth credentials expire, the next request to this endpoint
        will return a refreshed set of OAuth credentials.

        You must have administrator or publisher privileges to perform this action.
        Additionally, the requester _must_ be owner of the content where the credential exchange request originated.
        Finally, the user whose OAuth credentials are being requested must have viewer permissions on the content.

        In the case of a *Service Account credential exchange*, this endpoint will return a fresh OAuth access token to the
        requesting content item on every request. There is no login redirect or refresh token management. You must have administrator
        or publisher privileges to perform this action. The requester _must_ be owner of the content where the credential exchange
        request originated.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  description: |
                    Indicates that an OAuth Token Exchange is being requested. The value is always "urn:ietf:params:oauth:grant-type:token-exchange".
                subject_token_type:
                  type: string
                  description: |
                    Identifies the type of subject_token in use.
                subject_token:
                  type: string
                  description: |
                    An opaque string that is used to identify the consumer of the OAuth access token.
                requested_token_type:
                  type: string
                  description: |
                    Identifies the type of token being requested.
                audience:
                  type: string
                  description: |
                    Identifies the integration for which the OAuth credentials are being requested.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthCredentials'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '402':
          description: The requested operation requires payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/integrations/{guid}:
    delete:
      operationId: deleteOAuthIntegration
      summary: Delete an OAuth integration
      tags:
        - OAuth Integrations
      description: |
        Delete the OAuth integration associated with the provided guid.
        You must have administrator privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getOAuthIntegration
      summary: Get OAuth integration details
      tags:
        - OAuth Integrations
      description: |
        Get detailed information about a specific OAuth integration.
        You must have administrator or publisher privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthIntegration'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    patch:
      operationId: updateOAuthIntegration
      summary: Update an OAuth integration
      tags:
        - OAuth Integrations
      description: |
        Update a specific OAuth integration.
        You must have administrator privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthIntegrationUpdate'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthIntegration'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '402':
          description: The requested operation requires payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/integrations/{guid}/associations:
    get:
      operationId: listOAuthIntegrationAssociations
      summary: List all associations for this OAuth integration.
      tags:
        - OAuth Integrations
      description: |
        List all associations for this OAuth integration.
        You must have administrator privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OAuthIntegrationAssociationOutput'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/integrations/{guid}/verify:
    post:
      operationId: verifyServiceAccountIntegration
      summary: Verify that an OAuth service account integration is configured correctly.
      tags:
        - OAuth Integrations
      description: |
        This endpoint simulates a content session token exchange with the OAuth integration to
        verify that the integration is configured correctly. No access token is returned.
        Verification is only available for OAuth integrations with the "Service Account" authentication type.
        If the integration is not a service account integration, a 400 status code will be returned.
        You must have administrator privileges to perform this action.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '402':
          description: The requested operation requires payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/sessions:
    get:
      operationId: listOAuthSessions
      summary: List OAuth sessions
      tags:
        - OAuth Sessions
      description: |
        List OAuth sessions available to Posit Connect associated with the current user.
        If you have administrator privileges you can request all available sessions.
      parameters:
        - name: all
          in: query
          schema:
            type: boolean
          description: |
            false "When making a request with administrator privileges, include OAuth sessions for all users when set to true"
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OAuthSession'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/oauth/sessions/{guid}:
    delete:
      operationId: deleteOAuthSession
      summary: Delete an OAuth session
      tags:
        - OAuth Sessions
      description: |
        Delete the OAuth session associated with the provided guid.
        A user can delete their own sessions. Deleting sessions for other users requires administrator privileges.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getOAuthSession
      summary: Get OAuth session details
      tags:
        - OAuth Sessions
      description: |
        Get information about a specific OAuth session.
        If you have administrator privileges you can request details for any available session.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthSession'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/packages:
    get:
      operationId: getPackages
      summary: Get package dependencies for all content
      tags:
        - Packages
      description: |
        Get the names and versions of all installed R and Python packages
        across all content items. Returned packages are sorted
        by language and then by package name.
        Content items with `r_environment_management` or
        `python_environment_management` set to `false` will not
        have their packages listed.
        This endpoint uses offset pagination. Requests can include
        query-string parameters for `page_number` and `page_size` to
        fetch different pages of results.
      parameters:
        - name: page_number
          in: query
          schema:
            type: integer
            format: int32
            default: 1
          description: |
            The page number to return.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
            default: 20
          description: |
            The number of items per page.
        - name: asc_order
          in: query
          schema:
            type: boolean
            default: true
          description: |
            Whether results are in ascending order.
        - name: name
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackagesResponse'
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/queue:
    get:
      operationId: getQueue
      summary: List items in queue
      tags:
        - Queue
      description: |
        List all items currently in the job queue.
        This endpoint requires administrator access.
      parameters:
        - name: queue_names
          in: query
          schema:
            type: string
        - name: page_number
          in: query
          schema:
            type: integer
            format: int32
            default: 1
          description: |
            The page number to return.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
            default: 20
          description: |
            The number of items per page.
        - name: asc_order
          in: query
          schema:
            type: boolean
            default: true
          description: |
            Whether results are in ascending order.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueResponse'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/queue/{id}:
    delete:
      operationId: deleteQueueItem
      summary: Delete a queue item
      tags:
        - Queue
      description: |
        Deletes an item from the job queue. Only inactive items
        (not currently being processed) can be deleted.

        Authenticated access from a user having an "administrator" role is required.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/schedule/history:
    get:
      operationId: getScheduleHistory
      summary: Get schedule history
      tags:
        - Schedules
      description: |
        Get the schedule change history for a piece of content.

        Returns the current schedule (if any) and a list of historical changes
        including when schedules were created, updated, or deleted.

        Schedule data is returned in RFC 5545 (iCalendar) format.

        A maximum of 100 history entries are returned, ordered by change time
        (most recent first).

        This action is permitted for content owners, users with collaborator
        or editor rights, and administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: variant
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleHistoryResponse'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/server_settings/nodejs:
    get:
      operationId: getNodeJsInformation
      summary: Get Node.js Information
      tags:
        - Server Information
      description: |
        This endpoint returns a list of metadata objects for each version
        of Node.js that is available for executing content.
        This endpoint requires authentication and is only available to
        `publisher` and `administrator` roles.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeJsInfo'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/server_settings/public:
    get:
      operationId: getPublicSettings
      summary: Get public settings
      tags:
        - Server Information
      description: |
        This endpoint returns the minimal server settings needed to render
        unauthenticated views in the Connect dashboard.

        The returned settings include:
        - Authentication provider information (name, notice, timing)
        - Self-registration availability
        - System display name for branding
        - Username validation rules for registration

        **Security Note**: This endpoint is public (no authentication required)
        and deliberately exposes minimal server settings to unauthenticated
        users.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicSettings'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/server_settings/python:
    get:
      operationId: getPythonInformation
      summary: Get Python Information
      tags:
        - Server Information
      description: |
        This endpoint returns a list of metadata objects for each version
        of Python that is available for executing content.
        This endpoint requires authentication and is only available to
        `publisher` and `administrator` roles.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PythonInfo'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/server_settings/quarto:
    get:
      operationId: getQuartoInformation
      summary: Get Quarto Information
      tags:
        - Server Information
      description: |
        This endpoint returns a list of metadata objects for each version
        of Quarto that is available for executing content.
        This endpoint requires authentication and is only available to
        `publisher` and `administrator` roles.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuartoInstallations'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/server_settings/r:
    get:
      operationId: getRInformation
      summary: Get R Information
      tags:
        - Server Information
      description: |
        This endpoint returns a list of metadata objects for each version
        of R that is available for executing content.
        This endpoint requires authentication and is only available to
        `publisher` and `administrator` roles.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RInstallations'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/server_settings/tensorflow:
    get:
      operationId: getTensorFlowInformation
      summary: Get TensorFlow Information
      tags:
        - Server Information
      description: |
        This endpoint returns a list of metadata objects for each version
        of TensorFlow that is available for executing content.
        This endpoint requires authentication and is only available to
        `publisher` and `administrator` roles.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TensorFlowInstallations'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/timezones:
    get:
      operationId: getTimeZones
      summary: List Time Zones
      tags:
        - Server Information
      description: |
        Returns the set of names and offsets for all time zones known by the server.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TimeZoneEntry'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/service-tokens:
    post:
      operationId: createServiceToken
      summary: Create a service token
      tags:
        - Service Tokens
      description: |
        Create a new service token with the specified scopes.
        This response includes the full token key. Subsequent requests
        do not include the key value.
        This endpoint is available only to administrators.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceTokenCreateInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceToken'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listServiceTokens
      summary: List service tokens
      tags:
        - Service Tokens
      description: |
        List all service tokens.
        This endpoint is available only to administrators.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ServiceToken'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/service-tokens/scopes:
    get:
      operationId: listServiceTokenScopes
      summary: List available scopes
      tags:
        - Service Tokens
      description: |
        List all available scopes you can assign to service tokens.
        This endpoint is available only to administrators.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceTokenScopes'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/service-tokens/{guid}:
    delete:
      operationId: deleteServiceToken
      summary: Delete a service token
      tags:
        - Service Tokens
      description: |
        Delete a service token. The token will immediately stop working for
        authentication.
        This endpoint is available only to administrators.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/checks:
    post:
      operationId: runSystemChecks
      summary: Start a system check run
      tags:
        - System Checks
      description: |
        Start a system check run. The tests run in the background, and you can
        poll for status using the returned run ID.
        You must have administrator privileges to perform this action.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRunInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemCheckRun'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listSystemCheckRuns
      summary: List system check runs
      tags:
        - System Checks
      description: |
        List all system check runs that have been requested.
        You must have administrator privileges to perform this action.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SystemCheckRun'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/checks/{id}:
    delete:
      operationId: deleteSystemCheckRun
      summary: Delete a system check run
      tags:
        - System Checks
      description: |
        Delete a system check run and the associated results.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getSystemCheckRun
      summary: Get the status of a system check run
      tags:
        - System Checks
      description: |
        Get the status of a system check run.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemCheckRun'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/checks/{id}/results:
    get:
      operationId: getSystemCheckRunResults
      summary: Get the results of a system check run
      tags:
        - System Checks
      description: |
        Get the results of a system check run.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemCheckRunResults'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/caches/runtime:
    delete:
      operationId: deleteRuntimeCache
      summary: Delete a runtime cache
      tags:
        - System Information
      description: |
        Delete a content runtime package cache by specifying language, version,
        and execution environment.
        This action is only available to administrators.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteRuntimeCacheInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteRuntimeCacheResponse'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listRuntimeCaches
      summary: List runtime caches
      tags:
        - System Information
      description: |
        List all content runtime caches. These include packrat and Python
        environment caches.
        This information is available only to administrators.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeCaches'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/hosts:
    get:
      operationId: listHosts
      summary: List Connect hosts
      tags:
        - System Information
      description: |
        List registered hosts.
        The default response includes hosts that are no longer active. Use the
        `active` parameter to return only active hosts. A host is considered
        active if it has checked in in the last 60 seconds.
        You must have administrator privileges to perform this action.
      parameters:
        - name: active
          in: query
          schema:
            type: boolean
          description: |
            false "Return only active hosts"
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Host'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/system/offhost/service-accounts:
    get:
      operationId: listServiceAccounts
      summary: List Kubernetes service accounts
      tags:
        - System Information
      description: |
        Applicable to Connect instances configured for off-host execution.
        List the Kubernetes service accounts discovered when Connect started.
        This action is available to publishers and administrators.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccounts'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/tags:
    post:
      operationId: addTag
      summary: Add tag to content
      tags:
        - Tags
      description: |
        Add the specified tag to an individual content item. When adding a tag,
        all tags above the specified tag in the tag tree are also added to the
        content item.

        Authenticated access required from an admin or from a user with
        collaborator/editor permissions on the content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentTagInput'
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listContentTags
      summary: List tags for content
      tags:
        - Tags
      description: |
        List of all tags for the specified content item.

        Authenticated access required from an admin or from a user with at least viewer
        permissions on the content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tag'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/tags/{id}:
    delete:
      operationId: removeTag
      summary: Remove tag from content
      tags:
        - Tags
      description: |
        Remove the specified tag from an individual content item. When removing
        a tag, all children and descendant tags are also removed from the content
        item.

        Authenticated access required from an admin or from a user with
        collaborator/editor permissions on the content item.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/tags:
    post:
      operationId: createTag
      summary: Create tag
      tags:
        - Tags
      description: |
        Create a new tag. Tags without a parent are considered tag "categories"
        and are used to organize other tags. Note that tag categories cannot be
        added to content items.

        Authenticated access from a user having an "administrator" role is required.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: listTags
      summary: List tags
      tags:
        - Tags
      description: |
        List of all tags.

        Authenticated access from a user is required.
      parameters:
        - name: name
          in: query
          schema:
            type: string
        - name: parent_id
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tag'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/tags/{id}:
    delete:
      operationId: deleteTag
      summary: Delete tag
      tags:
        - Tags
      description: |
        Deletes a tag, including all descendants in its own tag hierarchy.

        Authenticated access from a user having an "administrator" role is required.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getTag
      summary: Get tag
      tags:
        - Tags
      description: |
        Get an individual tag by its identifier or by a comma-delimited "path"
        to the tag. The path to the tag is the series of tag names to traverse
        the tag hierarchy, starting with a tag category.

        Authenticated access from a user is required.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    patch:
      operationId: updateTag
      summary: Update tag
      tags:
        - Tags
      description: |
        Update an existing tag.

        Authenticated access from a user having an "administrator" role is required.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/tags/{id}/content:
    get:
      operationId: listTagContent
      summary: List content for tags
      tags:
        - Tags
      description: |
        List all of the content for the specified tag.

        Authenticated access from a user is required. If an "administrator"
        role is used, then all content items will be returned regardless of
        the visibility to the requesting user.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Content'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/tasks/{id}:
    get:
      operationId: getTask
      summary: Get task details
      tags:
        - Tasks
      description: |
        Returns the current state of a task and any output lines past the
        requested initial position (`first`).

        When `wait` is non-zero, will wait up to that number of seconds for
        the task to complete before responding. The current state of the task
        is returned once the task completes or `wait` seconds elapse.

        Incrementally receive task output by using the `last` response field
        value as the `first` value in a subsequent query.

        Use `wait` and `first` together to incrementally fetch generated
        output.

        Here is a URL that allows up to 5 seconds before returning all
        available output:

        ```
        /v1/tasks/CmsfmnfDDyRUrsAc?wait=5&first=0
        ```

        Let's assume that request has a JSON response with the `last` field
        having a value of `23`. Here is a URL that requests output past that
        point, again allowing up to 5 seconds:

        ```
        /v1/tasks/CmsfmnfDDyRUrsAc?wait=5&first=23
        ```

        Continue with this pattern until the `finished`
        field in the JSON response is `true`.

        **Note:** In high-availability clustered deployments of Connect, the task
        request must be serviced by the node that is executing the task. This
        is done by ensuring that the cookies returned from the deployment operation are
        included in subsequent requests, so that the load balancer can appropriately
        direct the request. In a single-node configuration, the cookie can be omitted.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: first
          in: query
          schema:
            type: integer
            format: int32
            default: 0
        - name: wait
          in: query
          schema:
            type: integer
            format: int32
            default: 0
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/user:
    get:
      operationId: getCurrentUser
      summary: Get current user details
      tags:
        - Users
      description: |
        Get detailed information on the requesting user.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/users:
    post:
      operationId: createPushUser
      summary: Create a user from caller-supplied details (SAML, password, PAM, proxied, OAuth2 except with Google)
      tags:
        - Users
      description: |
        This endpoint creates the given user.

        - This endpoint is used only for SAML, OAuth2 (non-Google), password, PAM, and proxied
          authentication. All other authentication providers should
          use the [PUT /v1/users](#createPullUser) endpoint.
        - Administrator access is required to create *other* users.

        #### Initial User Creation Workflow

        This endpoint requires authentication to create *other* users,
        which means that you need an API key for access. How do you
        get an API key if there are no users in Posit Connect?

        - For password authentication, you can use this endpoint
          without an API key to create the first user. The first user
          will be an administrator.
        - For SAML, OAuth2 (non-Google), PAM or proxied authentication, the first user can be
          created by logging into Posit Connect. The API cannot be used.

        Once the first user is created, an API key can be used to access this
        endpoint and create subsequent users. The [API
        Keys](../user/api-keys/) chapter of the Posit Connect User Guide
        explains how to create an API key.

        #### All Authentication Providers

        - When `user_role` is not specified, it will default to the
          role specified by the config setting
          [`Authorization.DefaultUserRole`](../admin/appendix/configuration/index.md#Authorization.DefaultUserRole).

        #### SAML, OAuth2 (non-Google), PAM and Proxied Authentication

        - An API key must always be used. Users cannot use this
          endpoint to create their own account.
        - Administrator access is always required to create accounts.
        - `external_id` is required for SAML and OAuth2 (non-Google)
          authentication, and also for proxied authentication if the
          [`ProxyAuth.UniqueIdHeader`](../admin/appendix/configuration/index.md#ProxyAuth.UniqueIdHeader) config setting is used.
          It is not required for PAM, nor for proxied
          authentication without the [`ProxyAuth.UniqueIdHeader`](../admin/appendix/configuration/index.md#ProxyAuth.UniqueIdHeader) setting.

        #### Password Authentication

        - Users must confirm their account through an email. This
          feature is unique to password authentication.
        - Administrator access is always required except for the first
          created user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreatePushInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: createPullUser
      summary: Create a user using details from a remote authentication provider (LDAP, OAuth2 with Google)
      tags:
        - Users
      description: |
        This endpoint creates the given user on the Posit Connect server.

        - This endpoint is used only for LDAP and OAuth2 with Google
          authentication. All other authentication providers should
          use the [POST /v1/users](#createPushUser) endpoint.
        - Unlike the [POST /v1/users](#createPushUser) endpoint, publisher or administrator
          access is required to access this endpoint.

        #### User Creation Workflow on LDAP and OAuth2 with Google

        This endpoint requires authentication, which means that you need an
        API key for access. How do you get an API key if there are no users in
        Posit Connect? The first user can be created by simply logging into
        Posit Connect. The Posit Connect Server API cannot be used to
        create the first user. Once logged in, you can create an API key.

        For LDAP and OAuth2 with Google, the API lets you identify an existing
        user in the LDAP or OAuth2 with Google system and create a corresponding
        account on Posit Connect. This is a two-step process:

        - Use the [GET /v1/users/remote](#searchRemoteUsers) endpoint. This
          endpoint will return a list of potential matching accounts
          in LDAP or OAuth2 with Google. A user with no account on Posit Connect will
          lack a `guid`. Note the `temp_ticket` for the desired user
          account.
        - Use this PUT endpoint with the `temp_ticket` to create a
          corresponding account on Posit Connect.

        The Cookbook contains a recipe on [Creating a User Using a
        Remote Authentication Provider
        (LDAP)](../cookbook/users/creating-a-user-using-a-remote-authentication-provider-ldap/)
        which demonstrates this workflow using the Python and R SDKs.

        #### LDAP and OAuth2 with Google Authentication

        - The created user role will default to the role specified by
          the config setting [`Authorization.DefaultUserRole`](../admin/appendix/configuration/index.md#Authorization.DefaultUserRole).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreatePullInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getUsers
      summary: List or search for user details
      tags:
        - Users
      description: |
        This endpoint lists local users. When called with a prefix
        parameter, it searches for local users matching the prefix.

        By default, results are sorted by first name, then last name, then
        username, then email. Use the `sort` parameter to sort by a
        different field. `prefix` searches are first sorted based on
        similarity to the prefix and then by the active sort field. The
        `prefix` can also be an exact match for the user's DN (for LDAP)
        or the auth provider's unique ID for the user, if any.

        - The `email` field is not populated for non-admins when
          [`Server.HideEmailAddresses`](../admin/appendix/configuration/index.md#Server.HideEmailAddresses) is enabled.
        - The `external_id` field is only visible to administrators and to users
          viewing their own record.
        - When the user making the request is a viewer and
          [`Authorization.ViewersCanOnlySeeThemselves`](../admin/appendix/configuration/index.md#Authorization.ViewersCanOnlySeeThemselves) is being used,
          the results contain only the given user.

        This endpoint uses offset pagination. Requests can include
        query-string parameters for `page_number` and `page_size` to
        fetch different pages of results.

        Note that searching by `prefix` will only return the first page of
        results; subsequent pages will be empty. Set `page_size` to its
        maximum (`500`) to retrieve the most results.

        #### CSV export

        Administrators can request the response as CSV by setting the `Accept`
        header to `text/csv`. The CSV export ignores pagination parameters and
        returns all matching users.

        ```bash
        curl -H "Authorization: Key ${API_KEY}" \
             -H "Accept: text/csv" \
             "https://connect.example.com/__api__/v1/users"
        ```
      parameters:
        - name: prefix
          in: query
          schema:
            type: string
        - name: page_number
          in: query
          schema:
            type: integer
            format: int32
            default: 1
          description: |
            The page number to return.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
            default: 20
          description: |
            The number of items per page.
        - name: asc_order
          in: query
          schema:
            type: boolean
            default: true
          description: |
            Whether results are in ascending order.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
            default: 20
        - name: sort
          in: query
          schema:
            type: string
        - name: prefix
          in: query
          schema:
            type: string
          description: |
            Filter by a prefix string matched against username, first name, last name, provider key, and DN.
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - first_name
              - last_name
              - username
              - active_time
              - created_time
              - user_role
          description: |
            Sort results by field. Defaults to `first_name`.
        - name: user_role
          in: query
          schema:
            type: string
            enum:
              - administrator
              - publisher
              - viewer
          description: |
            Filter by user role. `|` represents logical OR.
        - name: account_status
          in: query
          schema:
            type: string
            enum:
              - locked
              - licensed
              - inactive
          description: |
            Filter by account status. `|` represents logical OR.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/users/remote:
    get:
      operationId: searchRemoteUsers
      summary: Search for user details from a remote provider
      tags:
        - Users
      description: |
        This endpoint is used to support operations against users who
        do not have a Posit Connect account, such as
        [creating LDAP and OAuth2 with Google users](#createPullUser).
        See [GET /v1/users](#getUsers) for listing users.

        This endpoint searches for users on Posit Connect and on
        your LDAP or OAuth2 with Google system.

        Results are first sorted based on similarity to the `prefix`
        and then by first name, last name, username, and email.

        - This endpoint can be used only by LDAP or OAuth2 with Google
          authentication and will return an error otherwise.
        - Publisher or administrator access is required to access this
          endpoint.
        - The `email` field is not populated for non-admins when
          [`Server.HideEmailAddresses`](../admin/appendix/configuration/index.md#Server.HideEmailAddresses) is enabled.
        - The `external_id` field is only visible to administrators and to users
          viewing their own record.
        - When the user making the request is a viewer and
          [`Authorization.ViewersCanOnlySeeThemselves`](../admin/appendix/configuration/index.md#Authorization.ViewersCanOnlySeeThemselves) is being used,
          the results contain only the given user.
      parameters:
        - name: prefix
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 20
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoteSearchResults'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/users/{guid}:
    get:
      operationId: getUser
      summary: Get user details
      tags:
        - Users
      description: |
        Get detailed information on a specific user.

        The `email` field is not populated for non-admins when
        [`Server.HideEmailAddresses`](../admin/appendix/configuration/index.md#Server.HideEmailAddresses) is enabled. The `external_id` field is only
        visible to administrators and to users viewing their own record.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: updateUser
      summary: Update a user
      tags:
        - Users
      description: |
        This endpoint updates a given user and returns the updated
        user properties. Note that it returns only the properties that
        can be modified by this endpoint.

        If the authentication provider allows it:

        - a user can change their own user properties.
        - another user's properties can be changed with administrator
          access.
        - The configuration setting [`Authorization.UserInfoEditableBy`](../admin/appendix/configuration/index.md#Authorization.UserInfoEditableBy)
          controls whether or not non-admins can edit their own properties.

        ### Password Authentication

        - Emails are required.
        - Changing an unconfirmed user's email will cause the
          confirmation email to be resent to the new email.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditableUser'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/users/{guid}/lock:
    post:
      operationId: lockUser
      summary: Lock a user
      tags:
        - Users
      description: |
        This endpoint locks or unlocks a given user account.

        - Unlocking a user is prohibited if that additional user would
        violate the user account limit specified by the Posit Connect product
        license.
        - Administrator access is required to access this endpoint.
        - Users are able to lock themselves.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LockUserInput'
      responses:
        '200':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: You do not have permission to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/content/{guid}/vanity:
    delete:
      operationId: deleteVanity
      summary: Delete vanity URL
      tags:
        - Vanity URLs
      description: |
        Delete the vanity URL for this content.

        If [`Authorization.PublishersCanManageVanities`](../admin/appendix/configuration/index.md#Authorization.PublishersCanManageVanities) is `true` (default), publishers
        can delete the vanity URL for content items that they have permission to change.
        Otherwise, administrator permissions are required.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response.
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    get:
      operationId: getVanity
      summary: Get vanity URL
      tags:
        - Vanity URLs
      description: |
        Get the vanity URL, if any, defined for this content.
        If the content item has a vanity URL, it is returned.
        If there is no vanity URL for this content, a 404 status is returned.

        Administrators can get the vanity URL for any content item.
        Any authenticated user who is authorized to view the content can
        get the vanity URL.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vanity'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
    put:
      operationId: setVanity
      summary: Set vanity URL
      tags:
        - Vanity URLs
      description: |
        Set the vanity URL for this content item.

        A vanity URL path must meet certain requirements:

        *   It must consist of alphanumeric characters, hyphens, underscores,
            and slashes.

        *   It cannot be a reserved path such as the root path `/`, or a path
            beginning with `/__`.

        *   The following path prefixes are prohibited:

            * `/__`
            * `/favicon.ico`
            * `/connect`
            * `/apps`
            * `/users`
            * `/groups`
            * `/setpassword`
            * `/user-completion`
            * `/confirm`
            * `/recent`
            * `/reports`
            * `/plots`
            * `/unpublished`
            * `/settings`
            * `/metrics`
            * `/tokens`
            * `/help`
            * `/login`
            * `/welcome`
            * `/register`
            * `/resetpassword`
            * `/content`
            * _The custom location for the Connect dashboard, configured by [`Server.DashboardPath`](../admin/appendix/configuration/index.md#Server.DashboardPath)._

        *   It cannot be an ancestor or descendant of an existing vanity URL
            path. For example, if the vanity path `/a/b/` exists, you cannot
            add `/a/` or `/a/b/c/`.

        If [`Authorization.PublishersCanManageVanities`](../admin/appendix/configuration/index.md#Authorization.PublishersCanManageVanities) is `true` (default), publishers
        can set the vanity URL for content items that they have permission to change.
        Otherwise, administrator permissions are required.

        You can reassign an existing vanity URL to a different content item,
        if you are an administrator or collaborator/owner of both content items. You must
        set the `force` parameter to `true` to reassign a URL. An error
        will be returned if `force` is `false` and the URL already exists.
      parameters:
        - name: guid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VanityInput'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vanity'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '409':
          description: The request could not be completed due to a conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
  /v1/vanities:
    get:
      operationId: listVanities
      summary: List vanity URLs
      tags:
        - Vanity URLs
      description: |
        List all defined vanity URLs.

        You must have administrator privileges to perform this action.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Vanity'
        '400':
          description: The requested operation is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: The requested operation requires authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '404':
          description: The requested object does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: A server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
