Physna Metadata API
The Metadata API from Physna — 6 operation(s) for metadata.
The Metadata API from Physna — 6 operation(s) for metadata.
openapi: 3.0.0
info:
title: Physna Public ClientCredentials Metadata API
version: 2.0.1
contact:
name: Support
email: support@physna.com
servers:
- url: /v2
tags:
- name: Metadata
paths:
/models/{id}/metadata:
get:
operationId: GetMetadata
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataResponse'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
- Viewers
parameters:
- in: path
name: id
required: true
schema:
type: string
- description: A [`FilterExpression`](#model-FilterExpression). See the [API Reference](https://physna.github.io/public-api-guide/api-reference/filter-expressions) for more details.
in: query
name: filter
required: false
schema:
$ref: '#/components/schemas/FilterExpression'
- description: An [`OrderExpression`](#model-OrderExpression). See the [API Reference](https://physna.github.io/public-api-guide/api-reference/order-expressions) for more details.
in: query
name: order
required: false
schema:
$ref: '#/components/schemas/OrderExpression'
- description: A 1 based page number used in conjunction with `perPage`.
in: query
name: page
required: false
schema:
format: int32
type: integer
example: '1'
- description: The number of items to return per page.
in: query
name: perPage
required: false
schema:
format: int32
type: integer
example: '20'
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
/models/{id}/metadata/{metadataKeyId}:
put:
operationId: UpsertMetadata
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/SingleMetadataResponse'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: path
name: metadataKeyId
required: true
schema:
format: double
type: number
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
properties:
value:
type: string
required:
- value
type: object
delete:
operationId: DeleteMetadata
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteMetadataResponse'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: path
name: metadataKeyId
required: true
schema:
format: double
type: number
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
/metadata-keys:
get:
operationId: GetMetadataKeys
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataKeyListResponse'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
parameters:
- description: The `ids` property has been deprecated. Please use the `filter` property instead.
in: query
name: ids
required: false
schema:
type: array
items:
type: number
format: double
deprecated: true
- description: A `FilterExpression`. See the [API Reference](https://physna.github.io/public-api-guide/api-reference/filter-expressions) for more details.
in: query
name: filter
required: false
schema:
$ref: '#/components/schemas/FilterExpression'
- description: An `OrderExpression`. See the [API Reference](https://physna.github.io/public-api-guide/api-reference/order-expressions) for more details.
in: query
name: order
required: false
schema:
$ref: '#/components/schemas/OrderExpression'
- description: A 1 based page number used in conjunction with `perPage`.
in: query
name: page
required: false
schema:
format: int32
type: integer
example: '1'
- description: The number of items to return per page.
in: query
name: perPage
required: false
schema:
format: int32
type: integer
example: '20'
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
post:
operationId: CreateMetadataKey
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/SingleMetadataKeyResponse'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
parameters:
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostMetadataKeyBody'
delete:
operationId: DeleteMetadataKey
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/DeletedMetadataKeyResponse'
description: 'Removes the metadata key and values associated. Note: removing a metadata key will remove the key and value from all models that use the metadata key'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
parameters:
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteMetadataKeyBody'
/metadata-keys/{id}:
get:
operationId: GetMetadataKey
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/SingleMetadataKeyResponse'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
parameters:
- in: path
name: id
required: true
schema:
format: double
type: number
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
/metadata:
get:
operationId: FindMetadata
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataListResponse'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
- Viewers
parameters:
- description: The `modelIds` property has been deprecated. Please use the `filter` property instead.
in: query
name: modelIds
required: false
schema:
type: array
items:
type: string
deprecated: true
- description: A [`FilterExpression`](#model-FilterExpression). See the [API Reference](https://physna.github.io/public-api-guide/api-reference/filter-expressions) for more details.
in: query
name: filter
required: false
schema:
$ref: '#/components/schemas/FilterExpression'
- description: An [`OrderExpression`](#model-OrderExpression). See the [API Reference](https://physna.github.io/public-api-guide/api-reference/order-expressions) for more details.
in: query
name: order
required: false
schema:
$ref: '#/components/schemas/OrderExpression'
- description: A 1 based page number used in conjunction with `perPage`.
in: query
name: page
required: false
schema:
format: int32
type: integer
example: '1'
- description: The number of items to return per page.
in: query
name: perPage
required: false
schema:
format: int32
type: integer
example: '20'
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
/collections/{id}/metadata/{metadataKeyId}:
put:
operationId: UpsertCollectionMetadata
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/SingleMetadataResponse'
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: path
name: metadataKeyId
required: true
schema:
format: double
type: number
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
properties:
value:
type: string
required:
- value
type: object
delete:
operationId: DeleteCollectionMetadata
responses:
'204':
description: No content
tags:
- Metadata
security:
- okta:
- Administrators
- Authors
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: path
name: metadataKeyId
required: true
schema:
format: double
type: number
- in: header
name: X-PHYSNA-TENANTID
required: false
schema:
type: string
components:
schemas:
ErrorResponse:
properties:
error:
properties:
message:
type: string
required:
- message
type: object
required:
- error
type: object
additionalProperties: false
MetadataKey:
properties:
id:
type: number
format: double
name:
type: string
required:
- id
- name
type: object
additionalProperties: false
DeleteMetadataKeyBody:
properties:
id:
type: number
format: double
required:
- id
type: object
additionalProperties: false
DeleteMetadataResponse:
properties:
deleted:
type: boolean
required:
- deleted
type: object
additionalProperties: false
MetadataResponse:
properties:
pageData:
$ref: '#/components/schemas/PageData'
metadata:
items:
$ref: '#/components/schemas/Metadata'
type: array
required:
- pageData
- metadata
type: object
additionalProperties: false
PageData:
properties:
total:
type: integer
format: int32
perPage:
type: integer
format: int32
currentPage:
type: integer
format: int32
lastPage:
type: integer
format: int32
startIndex:
type: integer
format: int32
endIndex:
type: integer
format: int32
required:
- total
- perPage
- currentPage
- lastPage
- startIndex
- endIndex
type: object
additionalProperties: false
MetadataKeyListResponse:
properties:
pageData:
$ref: '#/components/schemas/PageData'
metadataKeys:
items:
$ref: '#/components/schemas/MetadataKey'
type: array
required:
- pageData
- metadataKeys
type: object
additionalProperties: false
SingleMetadataKeyResponse:
properties:
metadataKey:
$ref: '#/components/schemas/MetadataKey'
required:
- metadataKey
type: object
additionalProperties: false
OrderExpression:
type: string
description: 'A string in the form `[-]<OrderProperty>[,OrderProperties]`.
See the [API Reference](https://physna.github.io/public-api-guide/api-reference/order-expressions) for more details.
Example:
```
-id,name
```'
Metadata:
properties:
modelId:
type: string
metadataKeyId:
type: number
format: double
name:
type: string
nullable: true
value:
type: string
required:
- modelId
- metadataKeyId
- name
- value
type: object
additionalProperties: false
DeletedMetadataKeyResponse:
properties:
deleted:
type: boolean
required:
- deleted
type: object
additionalProperties: false
FilterExpression:
type: string
description: 'A string in the form `<FilterProperty>(<FilterOperator>(<FilterValue>))[,FilterExpressions]`.
See the [API Reference](https://physna.github.io/public-api-guide/api-reference/filter-expressions) for more details.
Example:
```
id(between(1,1000)),createdAt(not(lt(''2022-01-01T00:00:00.000Z'')))
```'
MetadataListResponse:
properties:
pageData:
$ref: '#/components/schemas/PageData'
metadata:
items:
$ref: '#/components/schemas/Metadata'
type: array
required:
- pageData
- metadata
type: object
additionalProperties: false
PostMetadataKeyBody:
properties:
metadataKeyName:
type: string
required:
- metadataKeyName
type: object
additionalProperties: false
SingleMetadataResponse:
properties:
metadata:
$ref: '#/components/schemas/Metadata'
required:
- metadata
type: object
additionalProperties: false
securitySchemes:
okta:
type: oauth2
flows:
authorizationCode:
tokenUrl: https://physna.okta.com/oauth2/default/v1/token
authorizationUrl: https://physna.okta.com/oauth2/default/v1/authorize
scopes:
openid: ''
tenant: ''
roles: ''
externalDocs:
description: Public Api Guide
url: https://physna.github.io/public-api-guide/