Class: V1::DataTypeResource

Inherits:
JSONAPI::Resource
  • Object
show all
Defined in:
app/resources/v1/data_type_resource.rb

Overview

Note:

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 “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 “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” } } }’

Examples:

curl -X GET http://localhost:3100/v1/data_types/1
curl -X GET http://localhost:3100/v1/data_types/
curl -X GET "http://localhost:3100/v1/data_types?filter[pipeline]=ont"

Instance Attribute Summary collapse

Instance Attribute Details

#created_atString

Returns the timestamp when the data type was created.

Returns:

  • (String)

    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

#nameString

Returns the name of the data type.

Returns:

  • (String)

    the name of the data type



57
# File 'app/resources/v1/data_type_resource.rb', line 57

attributes :name, :pipeline, :created_at, :updated_at

#pipelineString

Returns the pipeline associated with the data type.

Returns:

  • (String)

    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_atString

Returns the timestamp when the data type was last updated.

Returns:

  • (String)

    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