Schema
Last updated
Last updated
A Schema is a data structure used in all domains. For example, data forms of Google OAuth2 credentials or AWS access keys can be a Schema resource.
Package : spaceone.api.repository.v1
Schema Methods:
Method | Request | Response |
---|---|---|
Creates a new Schema. You must specify the parameters: service_type
, name
, and schema
(data structure). With the parameter domain_id
, you can choose whether you will create a Schema in Local
or externally. The Schema created includes repository_info
, information about where the resource is managed.
POST /repository/v1/schema/create
{{< tabs " create " >}}
{{< tab "Request Example" >}}
name (string) Required
service_type (string) Required
schema_id (string) Required
schema (Struct) Required
domain_id (string) Required
labels (ListValue)
tags (Struct)
project_id (string)
{{< highlight json >}} { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "domain_id": "domain-987654321098" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
name (string) Required
service_type (string) Required
schema_id (string) Required
schema (Struct) Required
labels (ListValue) Required
tags (Struct) Required
repository_info (RepositoryInfo) Required
project_id (string) Required
domain_id (string) Required
created_at (string) Required
updated_at (string) Required
{{< highlight json >}} { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "repository_info": { "repository_id": "repo-123456789012", "name": "Local", "repository_type": "local" }, "domain_id": "domain-987654321098", "created_at": "2022-01-01T05:46:49.929Z", "updated_at": "2022-01-01T05:46:49.929Z" } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
Updates a specific Schema. You can make changes in Schema settings, including name
, schema
, labels
, and tags
.
POST /repository/v1/schema/update
{{< tabs " update " >}}
{{< tab "Request Example" >}}
name (string) Required
domain_id (string) Required
schema (Struct)
labels (ListValue)
tags (Struct)
{{< highlight json >}} { "name": "slack_webhook_test", "schema": {}, "labels": [], "tags": {}, "domain_id": "domain-987654321098" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
name (string) Required
service_type (string) Required
schema_id (string) Required
schema (Struct) Required
labels (ListValue) Required
tags (Struct) Required
repository_info (RepositoryInfo) Required
project_id (string) Required
domain_id (string) Required
created_at (string) Required
updated_at (string) Required
{{< highlight json >}} { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "repository_info": { "repository_id": "repo-123456789012", "name": "Local", "repository_type": "local" }, "domain_id": "domain-987654321098", "created_at": "2022-01-01T05:46:49.929Z", "updated_at": "2022-01-01T05:46:49.929Z" } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
Deletes a specific Schema. You must specify the name
of the Schema to delete, as the name
is an identifier of Schema resources.
POST /repository/v1/schema/delete
{{< tabs " delete " >}}
{{< tab "Request Example" >}}
name (string) Required
domain_id (string) Required
schema_id (string)
{{< highlight json >}} { "name": "slack_webhook" } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
Gets a specific Schema. You must specify the name
of the Schema to get, as the name
is an identifier of Schema resources. You can use the parameter repository_id
to limit the scope of the method to a specific Repository.
POST /repository/v1/schema/get
{{< tabs " get " >}}
{{< tab "Request Example" >}}
name (string) Required
domain_id (string) Required
repository_id (string)
only (string) Repeated
schema_id (string)
{{< highlight json >}} { "name": "slack_webhook", "repository_id": "repo-123456789012" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
name (string) Required
service_type (string) Required
schema_id (string) Required
schema (Struct) Required
labels (ListValue) Required
tags (Struct) Required
repository_info (RepositoryInfo) Required
project_id (string) Required
domain_id (string) Required
created_at (string) Required
updated_at (string) Required
{{< highlight json >}} { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "repository_info": { "repository_id": "repo-123456789012", "name": "Local", "repository_type": "local" }, "domain_id": "domain-987654321098", "created_at": "2022-01-01T05:46:49.929Z", "updated_at": "2022-01-01T05:46:49.929Z" } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
Gets a list of all Schemas in a specific Repository. The parameter repository_id
is used as an identifier of a Repository to get its list of Schemas. You can use a query to get a filtered list of Schemas.
POST /repository/v1/schema/list
{{< tabs " list " >}}
{{< tab "Request Example" >}}
project_id (string) Required
repository_id (string) Required
domain_id (string) Required
query (Query)
name (string)
service_type (string)
schema_id (string)
state (State)
{{< highlight json >}} { "query": {}, "name": "slack_webhook", "service_type": "secret.credentials", "repository_id": "repo-123456789012" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
results (SchemaInfo) Repeated
Required
total_count (int32) Required
{{< highlight json >}} { "results": [ { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "repository_info": { "repository_id": "repo-123456789012", "name": "Local", "repository_type": "local" }, "domain_id": "domain-987654321098", "created_at": "2022-01-01T10:20:09.064Z", "updated_at": "2022-01-01T10:20:09.064Z" } ], "total_count": 1 } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
POST /repository/v1/schema/stat
name (string) Required
service_type (string) Required
schema_id (string) Required
schema (Struct) Required
domain_id (string) Required
labels (ListValue)
tags (Struct)
project_id (string)
name (string) Required
domain_id (string) Required
repository_id (string)
only (string) Repeated
schema_id (string)
name (string) Required
service_type (string) Required
schema_id (string) Required
schema (Struct) Required
labels (ListValue) Required
tags (Struct) Required
repository_info (RepositoryInfo) Required
project_id (string) Required
domain_id (string) Required
created_at (string) Required
updated_at (string) Required
project_id (string) Required
repository_id (string) Required
domain_id (string) Required
query (Query)
name (string)
service_type (string)
schema_id (string)
state (State)
name (string) Required
domain_id (string) Required
schema_id (string)
query (StatisticsQuery) Required
repository_id (string) Required
domain_id (string) Required
results (SchemaInfo) Repeated
Required
total_count (int32) Required
name (string) Required
domain_id (string) Required
schema (Struct)
labels (ListValue)
tags (Struct)