Skip to main content
Pulumi logo Pulumi logo
  1. Docs
  2. Reference
  3. REST API Docs
  4. Services

Services

    Services are a way to group and organize related resources in Pulumi Cloud. The Services API allows you to create, manage, and organize collections of resources that work together to provide a specific capability.

    List Services

    ▼
    GET /api/orgs/{orgName}/services

    Returns the services in an organization that the authenticated user has access to. A service groups stacks, ESC environments, and other resources under shared metadata so its members can discover and access them together. Results are paginated; use continuationToken and maxResults to page through services.

    Request Parameters

    • orgName string path required
      The organization name
    • continuationToken string query optional
      Token from a previous response to fetch the next page of services
    • maxResults integer query optional
      Maximum number of services to return per page (max 1000)

    Responses

    200 OK
    • services array[Service] required
      The list of services
    • ↳ organizationName string required
      the name of the organization this service belongs to
    • ↳ owner ServiceMember required
      the owner of the service
    • ↳ name string required
      the name of the service
    • ↳ description string required
      an optional description of the service
    • ↳ created string optional
      the time the service was create
    • ↳ members array[ServiceMember] required
      a list of members that have access to the service
    • ↳ itemCountSummary map[string]integer required
      item types to their count within the service based on the current user’s permissions
    • ↳ properties array[ServiceProperty] required
      an optional list of properties set on the service
    • continuationToken string optional
      ContinuationToken is an opaque value the client can send to fetch additional services. Will be nil once all services have been returned.

    Create Service

    ▼
    POST /api/orgs/{orgName}/services

    Creates a new service in an organization. A service is a Pulumi Cloud construct that groups stacks, ESC environments, and other resources under shared metadata, making it easier for its members to discover and access the resources that make up a piece of software. The service is owned by a user or a team, and the name must be unique among services owned by the same owner.

    Request Parameters

    • orgName string path required
      The organization name

    Request Body

    • ownerType string required
      the service owner type
    • ownerName string required
      the service owner name
    • name string required
      the name of the service
    • description string required
      an optional description of the service
    • items array[AddServiceItem] required
      an optional list of items to add during service creation
    • properties array[ServiceProperty] required
      an optional list of properties to set on the service

    Responses

    200 OK
    Schema: Service
    • organizationName string required
      the name of the organization this service belongs to
    • owner ServiceMember required
      the owner of the service
    • ↳ type string required
      the type of the member (e.g. team / user)
    • ↳ name string required
      the login name of the member within Pulumi
    • ↳ avatarUrl string required
      an optional avatar URL for the member
    • name string required
      the name of the service
    • description string required
      an optional description of the service
    • created string optional
      the time the service was create
    • members array[ServiceMember] required
      a list of members that have access to the service
    • ↳ type string required
      the type of the member (e.g. team / user)
    • ↳ name string required
      the login name of the member within Pulumi
    • ↳ avatarUrl string required
      an optional avatar URL for the member
    • itemCountSummary map[string]integer required
      item types to their count within the service based on the current user’s permissions
    • properties array[ServiceProperty] required
      an optional list of properties set on the service
    • ↳ key string required
      the name of the property
    • ↳ value string required
      the value of the property
    • ↳ type string required
      the type of the property
    • ↳ order integer required
      the position of the property
    Errors: 400 Invalid service data provided 404 service 409 Service with this name already exists

    Get Service

    ▼
    GET /api/orgs/{orgName}/services/{ownerType}/{ownerName}/{serviceName}

    Returns the details of a specific service, including its name, owner, description, members, and the stacks, environments, and other items it groups together. A service is identified by its owner type, owner name, and service name. The returned items list is paginated; use continuationToken and maxResults to page through items.

    Request Parameters

    • orgName string path required
      The organization name
    • ownerType string path required
      The owner type
    • ownerName string path required
      The owner name
    • serviceName string path required
      The service name
    • continuationToken string query optional
      Token from a previous response to fetch the next page of items
    • maxResults integer query optional
      Maximum number of items to return per page (max 1000)

    Responses

    200 OK
    • service Service required
      The service details
    • ↳ organizationName string required
      the name of the organization this service belongs to
    • ↳ owner ServiceMember required
      the owner of the service
    • ↳ name string required
      the name of the service
    • ↳ description string required
      an optional description of the service
    • ↳ created string optional
      the time the service was create
    • ↳ members array[ServiceMember] required
      a list of members that have access to the service
    • ↳ itemCountSummary map[string]integer required
      item types to their count within the service based on the current user’s permissions
    • ↳ properties array[ServiceProperty] required
      an optional list of properties set on the service
    • items array[ServiceItem] required
      The list of service items
    • ↳ organizationName string required
      the name of the organization this item belongs to
    • ↳ type string required
      the type of the item
    • ↳ name string required
      the name (including any namespacing) of the item
    • ↳ version string optional
      optional field if the item has versioning
    • ↳ created string required
      timestamp of when the item was created
    • ↳ lastUpdate ServiceItemUpdate optional
      when did the last update occur to this item, if any
    • ↳ addedByUser ServiceMember optional
      who added the item reference to the service - this will always be a user
    • ↳ cloudCount integer required
      how many Pulumi cloud measured primitives are within this item
    • continuationToken string optional
      ContinuationToken is an opaque value the client can send to fetch additional items. Will be nil once all items have been returned.

    Update Service

    ▼
    PATCH /api/orgs/{orgName}/services/{ownerType}/{ownerName}/{serviceName}

    Updates the metadata of an existing service, such as its name, description, and properties. Use AddServiceItemsV2 / RemoveServiceItemV2 to change which stacks, environments, and other items belong to the service.

    Request Parameters

    • orgName string path required
      The organization name
    • ownerType string path required
      The owner type
    • ownerName string path required
      The owner name
    • serviceName string path required
      The service name

    Request Body

    • name string optional
      the name of the service
    • description string optional
      an optional description of the service
    • properties array[ServiceProperty] optional
      an optional list of properties to set on the service

    Responses

    200 OK
    Schema: Service
    • organizationName string required
      the name of the organization this service belongs to
    • owner ServiceMember required
      the owner of the service
    • ↳ type string required
      the type of the member (e.g. team / user)
    • ↳ name string required
      the login name of the member within Pulumi
    • ↳ avatarUrl string required
      an optional avatar URL for the member
    • name string required
      the name of the service
    • description string required
      an optional description of the service
    • created string optional
      the time the service was create
    • members array[ServiceMember] required
      a list of members that have access to the service
    • ↳ type string required
      the type of the member (e.g. team / user)
    • ↳ name string required
      the login name of the member within Pulumi
    • ↳ avatarUrl string required
      an optional avatar URL for the member
    • itemCountSummary map[string]integer required
      item types to their count within the service based on the current user’s permissions
    • properties array[ServiceProperty] required
      an optional list of properties set on the service
    • ↳ key string required
      the name of the property
    • ↳ value string required
      the value of the property
    • ↳ type string required
      the type of the property
    • ↳ order integer required
      the position of the property
    Errors: 400 Invalid service update data provided or invalid member type. 404 service

    Delete Service

    ▼
    DELETE /api/orgs/{orgName}/services/{ownerType}/{ownerName}/{serviceName}

    Deletes a service from an organization. This removes the service’s grouping of stacks, environments, and other resources along with its metadata; it does not delete the underlying stacks or environments themselves. If the service has members besides its owner, deletion requires explicit confirmation via the force parameter.

    Request Parameters

    • orgName string path required
      The organization name
    • ownerType string path required
      The owner type
    • ownerName string path required
      The owner name
    • serviceName string path required
      The service name
    • force boolean query optional
      Force deletion even if the service has other members

    Responses

    204 No Content
    Errors: 400 invalid query parameter 404 service 412 confirmation is required to delete service with other members

    Head Service

    ▼
    HEAD /api/orgs/{orgName}/services/{ownerType}/{ownerName}/{serviceName}

    Checks whether a service exists in the organization without returning its full details. Returns 204 No Content if the service exists, or an error if not found. This is a lightweight check useful for validating service references.

    Request Parameters

    • orgName string path required
      The organization name
    • ownerType string path required
      The owner type
    • ownerName string path required
      The owner name
    • serviceName string path required
      The service name

    Responses

    204 No Content

    Add Service Items

    ▼
    Deprecated. Use AddServiceItemsV2 instead.
    POST /api/orgs/{orgName}/services/{ownerType}/{ownerName}/{serviceName}/items

    Adds items, such as stacks or ESC environments, to an existing service. A service is a Pulumi Cloud construct that groups stacks, environments, and other resources under shared metadata so members of the service can discover and access them together. Returns the updated service details with the first page of items; if continuationToken is set on the response, pass it to GetService to fetch the remaining pages.

    Prefer AddServiceItemsV2, then GetService to read the items.

    Request Parameters

    • orgName string path required
      The organization name
    • ownerType string path required
      The owner type
    • ownerName string path required
      The owner name
    • serviceName string path required
      The service name
    • maxResults integer query optional
      Maximum number of items to return on the first page (max 1000)

    Request Body

    Responses

    200 OK
    • service Service required
      The service details
    • ↳ organizationName string required
      the name of the organization this service belongs to
    • ↳ owner ServiceMember required
      the owner of the service
    • ↳ name string required
      the name of the service
    • ↳ description string required
      an optional description of the service
    • ↳ created string optional
      the time the service was create
    • ↳ members array[ServiceMember] required
      a list of members that have access to the service
    • ↳ itemCountSummary map[string]integer required
      item types to their count within the service based on the current user’s permissions
    • ↳ properties array[ServiceProperty] required
      an optional list of properties set on the service
    • items array[ServiceItem] required
      The list of service items
    • ↳ organizationName string required
      the name of the organization this item belongs to
    • ↳ type string required
      the type of the item
    • ↳ name string required
      the name (including any namespacing) of the item
    • ↳ version string optional
      optional field if the item has versioning
    • ↳ created string required
      timestamp of when the item was created
    • ↳ lastUpdate ServiceItemUpdate optional
      when did the last update occur to this item, if any
    • ↳ addedByUser ServiceMember optional
      who added the item reference to the service - this will always be a user
    • ↳ cloudCount integer required
      how many Pulumi cloud measured primitives are within this item
    • continuationToken string optional
      ContinuationToken is an opaque value the client can send to fetch additional items. Will be nil once all items have been returned.
    Errors: 400 Invalid service item data provided.

    Remove Service Item

    ▼
    Deprecated. Use RemoveServiceItemV2 instead.
    DELETE /api/orgs/{orgName}/services/{ownerType}/{ownerName}/{serviceName}/items/{itemType}/{itemName}

    Removes a specific item (such as a stack or ESC environment) from a service. This only removes the item’s association with the service; it does not delete the underlying resource. Returns the updated service details after the item has been removed, with the first page of items; if continuationToken is set on the response, pass it to GetService to fetch the remaining pages.

    Prefer RemoveServiceItemV2, then GetService to read the items.

    Request Parameters

    • orgName string path required
      The organization name
    • ownerType string path required
      The owner type
    • ownerName string path required
      The owner name
    • serviceName string path required
      The service name
    • itemType string path required
      The item type
    • itemName string path required
      The item name
    • maxResults integer query optional
      Maximum number of items to return on the first page (max 1000)

    Responses

    200 OK
    • service Service required
      The service details
    • ↳ organizationName string required
      the name of the organization this service belongs to
    • ↳ owner ServiceMember required
      the owner of the service
    • ↳ name string required
      the name of the service
    • ↳ description string required
      an optional description of the service
    • ↳ created string optional
      the time the service was create
    • ↳ members array[ServiceMember] required
      a list of members that have access to the service
    • ↳ itemCountSummary map[string]integer required
      item types to their count within the service based on the current user’s permissions
    • ↳ properties array[ServiceProperty] required
      an optional list of properties set on the service
    • items array[ServiceItem] required
      The list of service items
    • ↳ organizationName string required
      the name of the organization this item belongs to
    • ↳ type string required
      the type of the item
    • ↳ name string required
      the name (including any namespacing) of the item
    • ↳ version string optional
      optional field if the item has versioning
    • ↳ created string required
      timestamp of when the item was created
    • ↳ lastUpdate ServiceItemUpdate optional
      when did the last update occur to this item, if any
    • ↳ addedByUser ServiceMember optional
      who added the item reference to the service - this will always be a user
    • ↳ cloudCount integer required
      how many Pulumi cloud measured primitives are within this item
    • continuationToken string optional
      ContinuationToken is an opaque value the client can send to fetch additional items. Will be nil once all items have been returned.
    Errors: 400 invalid item name

    Add Service Items V2

    ▼
    POST /api/orgs/{orgName}/services/{ownerType}/{ownerName}/{serviceName}/v2/items

    Adds items, such as stacks or ESC environments, to an existing service. A service is a Pulumi Cloud construct that groups stacks, environments, and other resources under shared metadata so members of the service can discover and access them together. Call GetService to read the items list.

    Request Parameters

    • orgName string path required
      The organization name
    • ownerType string path required
      The owner type
    • ownerName string path required
      The owner name
    • serviceName string path required
      The service name

    Request Body

    Responses

    204 No Content
    Errors: 400 Invalid service item data provided.

    Remove Service Item V2

    ▼
    DELETE /api/orgs/{orgName}/services/{ownerType}/{ownerName}/{serviceName}/v2/items/{itemType}/{itemName}

    Removes a specific item (such as a stack or ESC environment) from a service. This only removes the item’s association with the service; it does not delete the underlying resource. Removing an item that is not in the service succeeds with no effect. Call GetService to read the updated items list.

    Request Parameters

    • orgName string path required
      The organization name
    • ownerType string path required
      The owner type
    • ownerName string path required
      The owner name
    • serviceName string path required
      The service name
    • itemType string path required
      The item type
    • itemName string path required
      The item name

    Responses

    204 No Content
    Errors: 400 Invalid item type.

      The infrastructure as code platform for any cloud.