你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Stac Items - Update

更新集合中的 STAC 项

PATCH https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/stac/collections/{collectionId}/items/{itemId}?api-version=2025-04-30-preview

URI 参数

名称 必需 类型 说明
collectionId
path True

string

maxLength: 500
pattern: .*

目录集合 ID

itemId
path True

string

maxLength: 500
pattern: .*

STAC 项目 ID

api-version
query True

string

minLength: 1

用于此作的 API 版本。

请求正文

Media Types: "application/merge-patch+json"

名称 类型 说明
_msft:etag

string

MSFT ETag

_msft:ts

string

MSFT 时间戳

assets

<string,  AssetUpdate>

资产

bbox

number[] (double)

特征的边界框坐标

collection

string

此项目所属的 STAC 集合的 ID。

geometry

GeoJsonUpdate

定义要素形状的 Geometry 对象

id

string

要素的唯一标识符

links

Link[]

指向相关资源和终端节点的链接。

msft:_created

string

已创建 MSFT

msft:_updated

string

MSFT 已更新

msft:short_description

string

maxLength: 300

MSFT 简短描述

properties

ItemPropertiesUpdate

与要素关联的属性

stac_extensions

string[]

指向此 STAC 资源实现的 STAC 扩展的 URL。

stac_version

string

minLength: 1

Stac 版本

type

FeatureType

特征的 GeoJSON 类型标识符

响应

名称 类型 说明
202 Accepted

Operation

已接受请求进行处理,但尚未完成处理。

标头

  • location: string
  • operation-location: string
Other Status Codes

Azure.Core.Foundations.ErrorResponse

意外的错误响应。

标头

x-ms-error-code: string

安全性

OAuth2Auth

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
https://geocatalog.spatio.azure.com/.default

示例

StacItems_Update

示例请求

PATCH https://contoso-catalog.gwhqfdeddydpareu.uksouth.geocatalog.spatio.azure.com/stac/collections/{{collectionId}}/items/{{itemId}}?api-version=2025-04-30-preview

{
  "id": "{{itemId}}",
  "collection": "{{collectionId}}",
  "type": "Feature",
  "assets": {
    "sample_external": null,
    "sample_user": {
      "href": "https://sample.blob.core.windows.net/samples/4MB.jp2",
      "title": "Sample storage account Image (4MB)",
      "type": "image/jp2",
      "roles": [
        "data"
      ]
    }
  },
  "properties": {
    "datetime": "2021-12-15T00:00:00Z",
    "naip:year": "2021"
  }
}

示例响应

operation-location: https://contoso.com/operationstatus
{
  "id": "30e6744d-81a3-44e2-8a85-0325365272ae",
  "status": "Pending",
  "type": "Update",
  "statusHistory": [
    {
      "status": "Pending",
      "timestamp": "2024-10-09T09:31:24.1968201Z"
    }
  ],
  "creationTime": "2024-10-09T09:31:24.1968185Z",
  "additionalInformation": {
    "totalItems": "0",
    "totalPendingItems": "0",
    "totalSuccessfulItems": "0",
    "totalFailedItems": "0"
  }
}

定义

名称 说明
AssetUpdate

https://github.com/radiantearth/stac-spec/blob/v1.0.0/item-spec/item-spec.md#asset-object

表示 STAC 资产,它是与 STAC 项目关联的文件或资源。

Azure.Core.Foundations.Error

错误对象。

Azure.Core.Foundations.ErrorResponse

包含错误详细信息的响应。

Azure.Core.Foundations.InnerError

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors

FeatureType

GeoJSON Feature 对象的类型标识符

ItemPropertiesUpdate

包含有关资产的元数据的 STAC 项的属性。

https://github.com/radiantearth/stac-spec/blob/v1.0.0/item-spec/item-spec.md#properties-object

Link

链接模型。

参考:http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/link.yaml

表示链接。

LinkType

链接的 MIME 类型。

Operation

空间地理目录作

OperationStatus

操作状态

OperationStatusHistoryItem

作状态历史记录项

Provider

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#provider-object

表示有关 STAC 集合和项目的数据提供程序的信息。

StacItemUpdate

表示一个 STAC 项目,该项目是具有其他元数据的 GeoJSON 特征。

AssetUpdate

https://github.com/radiantearth/stac-spec/blob/v1.0.0/item-spec/item-spec.md#asset-object

表示 STAC 资产,它是与 STAC 项目关联的文件或资源。

名称 类型 说明
constellation

string

获取数据的卫星星座。

created

string (date-time)

数据的创建时间戳。

description

string

资产的详细说明。

gsd

number (float)

地面采样距离(以米为单位)。

href

string

minLength: 1

资产文件的 URL。

instruments

string[]

采集数据的仪器。

mission

string

与数据关联的任务。

platform

string

获取数据的平台。

providers

Provider[]

提供数据的组织或个人。

roles

string[]

资产在项目中的角色。

title

string

资产的人类可读标题。

type

string

资产的媒体类型。

updated

string (date-time)

数据的 Last update 时间戳。

Azure.Core.Foundations.Error

错误对象。

名称 类型 说明
code

string

服务器定义的错误代码集之一。

details

Azure.Core.Foundations.Error[]

导致此报告错误的特定错误的详细信息数组。

innererror

Azure.Core.Foundations.InnerError

包含与当前对象有关错误的更具体信息的对象。

message

string

有关错误的可读的表示形式。

target

string

错误的目标。

Azure.Core.Foundations.ErrorResponse

包含错误详细信息的响应。

名称 类型 说明
error

Azure.Core.Foundations.Error

错误对象。

Azure.Core.Foundations.InnerError

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors

名称 类型 说明
code

string

服务器定义的错误代码集之一。

innererror

Azure.Core.Foundations.InnerError

内部错误。

FeatureType

GeoJSON Feature 对象的类型标识符

说明
Feature

标准 GeoJSON 特征类型标识符

ItemPropertiesUpdate

包含有关资产的元数据的 STAC 项的属性。

https://github.com/radiantearth/stac-spec/blob/v1.0.0/item-spec/item-spec.md#properties-object

名称 类型 说明
constellation

string

获取数据的卫星星座。

created

string (date-time)

数据的创建时间戳。

datetime

string

资产以 RFC 3339 格式表示的日期/时间。

description

string

商品的详细说明。

end_datetime

string (date-time)

项目观察期的结束时间。

gsd

number (float)

地面采样距离(以米为单位)。

instruments

string[]

采集数据的仪器。

mission

string

与数据关联的任务。

platform

string

获取数据的平台。

providers

Provider[]

提供数据的组织或个人。

start_datetime

string (date-time)

项目观察期的开始时间。

title

string

项目的可读标题。

updated

string (date-time)

数据的 Last update 时间戳。

链接模型。

参考:http://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/link.yaml

表示链接。

名称 类型 默认值 说明
body

object

对于 POST 请求,资源可以将 HTTP 正文指定为 JSON 对象。

headers

object

映射到标头的对象键值对。 示例:{ “accept”: “application/json” }。

href

string

链接的 URL。

hreflang

string

链接资源的语言。

length

integer (int32)

链接资源的长度。

merge

boolean

False

指示客户端是否希望在访问链接之前将 body 值合并到当前请求正文中。 这仅在服务器响应 POST 请求时有效。 默认值:false。

method enum:
  • GET
  • POST
GET

指定资源所需的 HTTP 方法。 默认值:GET。

rel

string

链接的关系类型。

title

string

链接的标题。

type

LinkType

application/json

链接资源的 MIME 类型。

LinkType

链接的 MIME 类型。

说明
application/geo+json

表示 application/geo+json。

application/json

表示 application/json。

application/x-binary

表示 application/x 二进制文件。

application/x-protobuf

表示 application/x-protobuf。

application/xml

表示 application/xml。

image/jp2

表示 image/jp2。

image/jpeg

表示 image/jpeg。

image/jpg

表示 image/jpg。

image/png

表示 image/png。

image/tiff; application=geotiff

表示具有 application=geotiff 的图像/tiff。

image/webp

表示图像/webp。

text/html

表示 text/html。

text/plain

表示 text/plain。

Operation

空间地理目录作

名称 类型 说明
additionalInformation

object

有关特定作类型的其他信息元素

collectionId

string

采集 ID

creationTime

string (date-time)

创建作的 UTC 时间

error

Azure.Core.Foundations.Error

错误信息

finishTime

string (date-time)

作完成执行的 UTC 时间

id

string (uuid)

操作 ID

startTime

string (date-time)

启动作的 UTC 时间

status

OperationStatus

操作状态

statusHistory

OperationStatusHistoryItem[]

作状态的历史记录(以时间表示)

type

string

操作类型

OperationStatus

操作状态

说明
Canceled

用户取消了作

Canceling

正在取消作

Failed

作失败

Pending

作已接受并准备运行

Running

作正在运行

Succeeded

作已完成执行

OperationStatusHistoryItem

作状态历史记录项

名称 类型 说明
errorCode

string

如果状态为 failed,则会显示错误代码

errorMessage

string

如果状态为 failed,则会显示错误消息

status

OperationStatus

作的状态

timestamp

string (date-time)

设置状态的 UTC 时间

Provider

https://github.com/radiantearth/stac-spec/blob/v1.0.0/collection-spec/collection-spec.md#provider-object

表示有关 STAC 集合和项目的数据提供程序的信息。

名称 类型 说明
description

string

提供程序的说明。

name

string

minLength: 1

提供商、组织或个人的名称。

roles

string[]

提供者扮演的角色(例如,生产者、处理者、主持人)。

url

string

提供商网站的 URL。

StacItemUpdate

表示一个 STAC 项目,该项目是具有其他元数据的 GeoJSON 特征。

名称 类型 默认值 说明
_msft:etag

string

MSFT ETag

_msft:ts

string

MSFT 时间戳

assets

<string,  AssetUpdate>

资产

bbox

number[] (double)

特征的边界框坐标

collection

string

此项目所属的 STAC 集合的 ID。

geometry

GeoJsonUpdate

定义要素形状的 Geometry 对象

id

string

要素的唯一标识符

links

Link[]

指向相关资源和终端节点的链接。

msft:_created

string

已创建 MSFT

msft:_updated

string

MSFT 已更新

msft:short_description

string

maxLength: 300

MSFT 简短描述

properties

ItemPropertiesUpdate

与要素关联的属性

stac_extensions

string[]

指向此 STAC 资源实现的 STAC 扩展的 URL。

stac_version

string

minLength: 1
1.0.0

Stac 版本

type

FeatureType

特征的 GeoJSON 类型标识符