Hierarchy

  • CommonHttpService
    • LabelService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns LabelService

Methods

  • Returns the labels of specific attachment. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the parent content of the attachment and its corresponding space. Only labels that the user has permission to view will be returned.

    Parameters

    • params: {
          cursor?: string;
          id: number;
          limit?: number;
          prefix?:
              | "global"
              | "my"
              | "team"
              | "system";
          sort?: string;
      }
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the attachment for which labels should be returned.

      • Optionallimit?: number

        Maximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalprefix?:
            | "global"
            | "my"
            | "team"
            | "system"

        Filter the results to labels based on their prefix.

      • Optionalsort?: string

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: Label[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested labels are returned.

    GET /attachments/{id}/labels @scopes-current read:attachment:confluence

  • Returns the labels of specific blog post. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the blog post and its corresponding space. Only labels that the user has permission to view will be returned.

    Parameters

    • params: {
          cursor?: string;
          id: number;
          limit?: number;
          prefix?:
              | "global"
              | "my"
              | "team"
              | "system";
          sort?: string;
      }
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the blog post for which labels should be returned.

      • Optionallimit?: number

        Maximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalprefix?:
            | "global"
            | "my"
            | "team"
            | "system"

        Filter the results to labels based on their prefix.

      • Optionalsort?: string

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: Label[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested labels are returned.

    GET /blogposts/{id}/labels @scopes-current read:page:confluence

  • Returns the labels for a specific piece of custom content. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the custom content and its corresponding space. Only labels that the user has permission to view will be returned.

    Parameters

    • params: {
          cursor?: string;
          id: number;
          limit?: number;
          prefix?:
              | "global"
              | "my"
              | "team"
              | "system";
          sort?: string;
      }
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the custom content for which labels should be returned.

      • Optionallimit?: number

        Maximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalprefix?:
            | "global"
            | "my"
            | "team"
            | "system"

        Filter the results to labels based on their prefix.

      • Optionalsort?: string

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: Label[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested labels are returned.

    GET /custom-content/{id}/labels @scopes-current read:custom-content:confluence

  • Returns all labels. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to access the Confluence site ('Can use' global permission). Only labels that the user has permission to view will be returned.

    Parameters

    • params: {
          cursor?: string;
          labelId?: number[];
          limit?: number;
          prefix?: string[];
          sort?: string;
      } = {}
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • OptionallabelId?: number[]

        Filters on label ID. Multiple IDs can be specified as a comma-separated list.

      • Optionallimit?: number

        Maximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalprefix?: string[]

        Filters on label prefix. Multiple IDs can be specified as a comma-separated list.

      • Optionalsort?: string

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: Label[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested labels are returned.

    GET /labels @scopes-current read:label:confluence

  • Returns the labels of specific page. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the page and its corresponding space. Only labels that the user has permission to view will be returned.

    Parameters

    • params: {
          cursor?: string;
          id: number;
          limit?: number;
          prefix?:
              | "global"
              | "my"
              | "team"
              | "system";
          sort?: string;
      }
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the page for which labels should be returned.

      • Optionallimit?: number

        Maximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalprefix?:
            | "global"
            | "my"
            | "team"
            | "system"

        Filter the results to labels based on their prefix.

      • Optionalsort?: string

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: Label[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested labels are returned.

    GET /pages/{id}/labels @scopes-current read:page:confluence

  • Returns the labels of space content (pages, blogposts etc). The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the space. Only labels that the user has permission to view will be returned.

    Parameters

    • params: {
          cursor?: string;
          id: number;
          limit?: number;
          prefix?: "my" | "team";
          sort?: string;
      }
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the space for which labels should be returned.

      • Optionallimit?: number

        Maximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalprefix?: "my" | "team"

        Filter the results to labels based on their prefix.

      • Optionalsort?: string

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: Label[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested labels are returned.

    GET /spaces/{id}/content/labels @scopes-current read:space:confluence

  • Returns the labels of specific space. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the space. Only labels that the user has permission to view will be returned.

    Parameters

    • params: {
          cursor?: string;
          id: number;
          limit?: number;
          prefix?: "my" | "team";
          sort?: string;
      }
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the space for which labels should be returned.

      • Optionallimit?: number

        Maximum number of labels per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalprefix?: "my" | "team"

        Filter the results to labels based on their prefix.

      • Optionalsort?: string

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: Label[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested labels are returned.

    GET /spaces/{id}/labels @scopes-current read:space:confluence

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void