Class: V1::DataTypeResource
- Inherits:
-
JSONAPI::Resource
- Object
- JSONAPI::Resource
- V1::DataTypeResource
- Defined in:
- app/resources/v1/data_type_resource.rb
Overview
Access this resource via the /v1/data_types endpoint.
Provides a JSON:API representation of DataType and exposes valid data type options for use by the UI.
For more information about JSON:API see the JSON:API Specifications or look at the JSONAPI::Resources package for the service implementation of the JSON:API standard.
Filters:
- pipeline
curl -X POST "http://localhost:3100/v1/data_types"
-H "accept: application/vnd.api+json"
-H "Content-Type: application/vnd.api+json"
-d '{
"data": {
"type": "data_types",
"attributes": {
"name": "New Data Type",
"pipeline": "ont"
}
}
}'
curl -X PATCH "http://localhost:3100/v1/data_types/1"
-H "accept: application/vnd.api+json"
-H "Content-Type: application/vnd.api+json"
-d '{
"data": {
"type": "data_types",
"id": "1",
"attributes": {
"name": "Updated Data Type Name"
}
}
}'
Instance Attribute Summary collapse
-
#created_at ⇒ String
The timestamp when the data type was created.
-
#name ⇒ String
The name of the data type.
-
#pipeline ⇒ String
The pipeline associated with the data type.
-
#updated_at ⇒ String
The timestamp when the data type was last updated.
Instance Attribute Details
#created_at ⇒ String
Returns the timestamp when the data type was created.
57 |
# File 'app/resources/v1/data_type_resource.rb', line 57 attributes :name, :pipeline, :created_at, :updated_at |
#name ⇒ String
Returns the name of the data type.
57 |
# File 'app/resources/v1/data_type_resource.rb', line 57 attributes :name, :pipeline, :created_at, :updated_at |
#pipeline ⇒ String
Returns the pipeline associated with the data type.
57 |
# File 'app/resources/v1/data_type_resource.rb', line 57 attributes :name, :pipeline, :created_at, :updated_at |
#updated_at ⇒ String
Returns the timestamp when the data type was last updated.
57 |
# File 'app/resources/v1/data_type_resource.rb', line 57 attributes :name, :pipeline, :created_at, :updated_at |