---
title: "POST /v1/{+parent}/services"
method: POST
path: "/v1/{+parent}/services"
tags: ["projects"]
---

# POST /v1/{+parent}/services

`POST /v1/{+parent}/services`

Creates a Service in an Application.

## Path parameters

- `parent` string, required

## Query parameters

- `requestId` string
- `serviceId` string

## Request body

- Service — Service is an App Hub data model that contains a discovered service, which represents a network or API interface that exposes some functionality to clients for consumption over the network.
  - `createTime` string, google-datetime — Output only. Create time.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING' | 'DETACHED' — Output only. Service state.
  - `name` string — Identifier. The resource name of a Service. Format: `"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}"`
  - `displayName` string — Optional. User-defined name for the Service. Can have a maximum length of 63 characters.
  - `uid` string — Output only. A universally unique identifier (UUID) for the `Service` in the UUID4 format.
  - `attributes` Attributes — Consumer provided attributes.
    - `environment` Environment — Environment of the Application, Service, or Workload
      - `type` 'TYPE_UNSPECIFIED' | 'PRODUCTION' | 'STAGING' | 'TEST' | 'DEVELOPMENT' — Required. Environment Type.
    - `developerOwners` ContactInfo[] — Optional. Developer team that owns development and coding.
      - `displayName` string — Optional. Contact's name. Can have a maximum length of 63 characters.
      - `email` string — Required. Email address of the contacts.
    - `businessOwners` ContactInfo[] — Optional. Business team that ensures user needs are met and value is delivered
      - `displayName` string — Optional. Contact's name. Can have a maximum length of 63 characters.
      - `email` string — Required. Email address of the contacts.
    - `criticality` Criticality — Criticality of the Application, Service, or Workload
      - `type` 'TYPE_UNSPECIFIED' | 'MISSION_CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' — Required. Criticality Type.
    - `operatorOwners` ContactInfo[] — Optional. Operator team that ensures runtime and operations.
      - `displayName` string — Optional. Contact's name. Can have a maximum length of 63 characters.
      - `email` string — Required. Email address of the contacts.
  - `updateTime` string, google-datetime — Output only. Update time.
  - `serviceReference` ServiceReference — Reference to an underlying networking resource that can comprise a Service.
    - `uri` string — Output only. The underlying resource URI. For example, URI of Forwarding Rule, URL Map, and Backend Service.
  - `description` string — Optional. User-defined description of a Service. Can have a maximum length of 2048 characters.
  - `serviceProperties` ServiceProperties — Properties of an underlying cloud resource that can comprise a Service.
    - `zone` string — Output only. The location that the underlying resource resides in if it is zonal, for example, us-west1-a).
    - `extendedMetadata` object — Output only. Additional metadata specific to the resource type. The key is a string that identifies the type of metadata and the value is the metadata contents specific to that type. Key format: `apphub.googleapis.com/{metadataType}`
    - `registrationType` RegistrationType — The registration type of a service.
      - `type` 'TYPE_UNSPECIFIED' | 'EXCLUSIVE' | 'SHARED' — Output only. The registration type of a service.
    - `identity` Identity — The identity associated with a service or workload.
      - `principal` string — Output only. The principal of the identity. Supported formats: * `sa://my-sa@PROJECT_ID.iam.gserviceaccount.com` for GCP Service Account * `principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/sa/MANAGED_IDENTITY_ID` for Managed Workload Identity
    - `location` string — Output only. The location that the underlying resource resides in, for example, us-west1.
    - `gcpProject` string — Output only. The service project identifier that the underlying cloud resource resides in.
    - `functionalType` FunctionalType — The functional type of a service or workload.
      - `type` 'TYPE_UNSPECIFIED' | 'AGENT' | 'MCP_SERVER' | 'ENDPOINT' — Output only. The functional type of a service or workload.
  - `discoveredService` string — Required. Immutable. The resource name of the original discovered service.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/apphub.md) · [All operations](https://skmtc.net/google/apis/apphub/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/apphub/versions/7d1f12f41572/schema)
