Hierarchy

  • CommonHttpService
    • OrganizationService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns OrganizationService

Methods

  • Removes an organization property. Organization properties are a type of entity property which are available to the API only, and not shown in Jira Service Management. Learn more.

    For operations relating to organization detail field values which are visible in Jira Service Management, see the Customer Service Management REST API.

    Permissions required: Service Desk Administrator or Agent.

    Note: Permission to manage organizations can be switched to users with the Jira administrator permission, using the Organization management feature.

    Parameters

    • params: {
          organizationId: string;
          propertyKey: string;
      }
      • organizationId: string

        The ID of the organization from which the property will be removed.

      • propertyKey: string

        The key of the property to remove.

    Returns Promise<void>

    DELETE /rest/servicedeskapi/organization/{organizationId}/property/{propertyKey} @scopes-current manage:servicedesk-customer @scopes-beta read:organization.property:jira-service-management, delete:organization.property:jira-service-management

  • This method returns details of an organization. Use this method to get organization details whenever your application component is passed an organization ID but needs to display other organization details.

    To get organization detail field values which are visible in Jira Service Management, see the Customer Service Management REST API.

    Permissions required: Any

    Response limitations: Customers can only retrieve organization of which they are members.

    Parameters

    • params: {
          organizationId: number;
      }
      • organizationId: number

        The ID of the organization.

    Returns Promise<OrganizationDto>

    Returns the requested organization.

    example:

    {
    "_links": {
    "self": "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1"
    },
    "id": "1",
    "name": "Charlie Cakes Franchises",
    "scimManaged": false
    }

    GET /rest/servicedeskapi/organization/{organizationId} @scopes-current manage:servicedesk-customer @scopes-beta read:organization:jira-service-management

  • This method returns a list of organizations in the Jira Service Management instance. Use this method when you want to present a list of organizations or want to locate an organization by name.

    Permissions required: Any. However, to fetch organizations based on accountId the user must have a Service Desk agent license.

    Response limitations: If the user is a customer, only those organizations of which the customer is a member are listed.

    Parameters

    • params: {
          accountId?: string;
          limit?: number;
          start?: number;
      } = {}
      • OptionalaccountId?: string

        The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5.

      • Optionallimit?: number

        The maximum number of organizations to return per page. Default: 50. See the Pagination section for more details.

      • Optionalstart?: number

        The starting index of the returned objects. Base index: 0. See the Pagination section for more details.

    Returns Promise<PagedDtoOrganizationDto>

    Returns paginated list of organizations.

    example:

    {
    "_expands": [],
    "size": 1,
    "start": 1,
    "limit": 1,
    "isLastPage": false,
    "_links": {
    "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
    "context": "context",
    "next": "https://your-domain.atlassian.net/rest/servicedeskapi/organization?start=2&limit=1",
    "prev": "https://your-domain.atlassian.net/rest/servicedeskapi/organization?start=0&limit=1"
    },
    "values": [
    {
    "_links": {
    "self": "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1"
    },
    "id": "1",
    "name": "Charlie Cakes Franchises",
    "scimManaged": false
    }
    ]
    }

    GET /rest/servicedeskapi/organization @scopes-current manage:servicedesk-customer @scopes-beta read:organization:jira-service-management

  • Returns the keys of all organization properties. Organization properties are a type of entity property which are available to the API only, and not shown in Jira Service Management. Learn more.

    To get organization detail field values which are visible in Jira Service Management, see the Customer Service Management REST API.

    Permissions required: Any

    Response limitations: Customers can only access properties of organizations of which they are members.

    Parameters

    • params: {
          organizationId: string;
      }
      • organizationId: string

        The ID of the organization from which keys will be returned.

    Returns Promise<PropertyKeys>

    Returned if the organization was found.

    example:

    {
    "entityPropertyKeyBeans": [
    {
    "key": "organization.attributes",
    "self": "/rest/servicedeskapi/organization/1/property/propertyKey"
    }
    ]
    }

    GET /rest/servicedeskapi/organization/{organizationId}/property @scopes-current manage:servicedesk-customer @scopes-beta read:organization.property:jira-service-management

  • Returns the value of an organization property. Use this method to obtain the JSON content for an organization's property. Organization properties are a type of entity property which are available to the API only, and not shown in Jira Service Management. Learn more.

    To get organization detail field values which are visible in Jira Service Management, see the Customer Service Management REST API.

    Permissions required: Any

    Response limitations: Customers can only access properties of organizations of which they are members.

    Parameters

    • params: {
          organizationId: string;
          propertyKey: string;
      }
      • organizationId: string

        The ID of the organization from which the property will be returned.

      • propertyKey: string

        The key of the property to return.

    Returns Promise<EntityProperty>

    Returns the organization's property.

    example:

    {
    "key": "organization.attributes",
    "value": {
    "mail": "charlie@example.com",
    "phone": "0800-1233456789"
    }
    }

    GET /rest/servicedeskapi/organization/{organizationId}/property/{propertyKey} @scopes-current manage:servicedesk-customer @scopes-beta read:organization.property:jira-service-management

  • This method returns a list of all organizations associated with a service desk.

    Permissions required: Service desk's agent.

    Parameters

    • params: {
          accountId?: string;
          limit?: number;
          serviceDeskId: string;
          start?: number;
      }
      • OptionalaccountId?: string

        The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5.

      • Optionallimit?: number

        The maximum number of items to return per page. Default: 50. See the Pagination section for more details.

      • serviceDeskId: string

        The ID of the service desk from which the organization list will be returned. This can alternatively be a project identifier.

      • Optionalstart?: number

        The starting index of the returned objects. Base index: 0. See the Pagination section for more details.

    Returns Promise<PagedDtoOrganizationDto>

    Returns the requested organizations list.

    example:

    {
    "_expands": [],
    "size": 3,
    "start": 3,
    "limit": 3,
    "isLastPage": false,
    "_links": {
    "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
    "context": "context",
    "next": "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10001/organization?start=6&limit=3",
    "prev": "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10001/organization?start=0&limit=3"
    },
    "values": [
    {
    "_links": {
    "self": "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1"
    },
    "id": "1",
    "name": "Charlie Cakes Franchises",
    "scimManaged": false
    },
    {
    "_links": {
    "self": "https://your-domain.atlassian.net/rest/servicedeskapi/organization/2"
    },
    "id": "2",
    "name": "Atlas Coffee Co",
    "scimManaged": false
    },
    {
    "_links": {
    "self": "https://your-domain.atlassian.net/rest/servicedeskapi/organization/3"
    },
    "id": "3",
    "name": "The Adjustment Bureau",
    "scimManaged": false
    }
    ]
    }

    GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/organization @scopes-current manage:servicedesk-customer @scopes-beta read:servicedesk.organization:jira-service-management

  • This method returns all the users associated with an organization. Use this method where you want to provide a list of users for an organization or determine if a user is associated with an organization.

    Permissions required: Service desk administrator or agent.

    Parameters

    • params: {
          limit?: number;
          organizationId: number;
          start?: number;
      }
      • Optionallimit?: number

        The maximum number of users to return per page. Default: 50. See the Pagination section for more details.

      • organizationId: number

        The ID of the organization.

      • Optionalstart?: number

        The starting index of the returned objects. Base index: 0. See the Pagination section for more details.

    Returns Promise<PagedDtoUserDto>

    Returns a paged list of users associated with the organization, ordered by their accountId.

    example:

    {
    "_expands": [],
    "size": 1,
    "start": 1,
    "limit": 1,
    "isLastPage": false,
    "_links": {
    "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
    "context": "context",
    "next": "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1/user?start=2&limit=1",
    "prev": "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1/user?start=0&limit=1"
    },
    "values": [
    {
    "accountId": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
    "name": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
    "key": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
    "emailAddress": "fred@example.com",
    "displayName": "Fred F. User",
    "active": true,
    "timeZone": "Australia/Sydney",
    "_links": {
    "jiraRest": "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
    "avatarUrls": {
    "16x16": "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
    "24x24": "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
    "32x32": "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue",
    "48x48": "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue"
    },
    "self": "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b"
    }
    },
    {
    "accountId": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",
    "name": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",
    "key": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",
    "emailAddress": "bob@example.com",
    "displayName": "Bob D. Builder",
    "active": true,
    "timeZone": "Australia/Sydney",
    "_links": {
    "jiraRest": "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",
    "avatarUrls": {
    "16x16": "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
    "24x24": "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
    "32x32": "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue",
    "48x48": "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue"
    },
    "self": "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd"
    }
    }
    ]
    }

    GET /rest/servicedeskapi/organization/{organizationId}/user @scopes-current manage:servicedesk-customer @scopes-beta read:organization.user:jira-service-management, read:user:jira

  • Sets the value of an organization property. Use this resource to store custom data against an organization. Organization properties are a type of entity property which are available to the API only, and not shown in Jira Service Management. Learn more.

    To store organization detail field values which are visible in Jira Service Management, see the Customer Service Management REST API.

    Permissions required: Service Desk Administrator or Agent.

    Note: Permission to manage organizations can be switched to users with the Jira administrator permission, using the Organization management feature.

    Parameters

    • params: {
          organizationId: string;
          propertyKey: string;
          requestBody: unknown;
      }
      • organizationId: string

        The ID of the organization on which the property will be set.

      • propertyKey: string

        The key of the organization's property. The maximum length of the key is 255 bytes.

      • requestBody: unknown

        The value of the property. The value has to be a valid, non-empty JSON value. The maximum length of the property value is 32768 bytes.

        {
        "mail": "charlie@example.com",
        "phone": "0800-1233456789"
        }

    Returns Promise<{
        body: unknown;
        created: boolean;
    }>

    • status: 200, mediaType: application/json

      Returned if the organization property was updated.

    • status: 201, mediaType: application/json

      Returned if the organization property was created.

    PUT /rest/servicedeskapi/organization/{organizationId}/property/{propertyKey} @scopes-current manage:servicedesk-customer @scopes-beta read:organization.property:jira-service-management, write:organization.property:jira-service-management

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

    Returns void