EditSignalReaderAssignmentService Resource

A set of services related to editing Signal reader assignments.

GET /v1/assignment/signal_reader/edit/{id}/measurement-setups

Get all measurement setups for the provided assignment id.

Request Parameters
name type description constraints
auth-token header The authentication token.  
id path required long
Response Body
media type data type description
application/json array of MeasurementSetup (JSON)

Example

Request
GET /v1/assignment/signal_reader/edit/{id}/measurement-setups
Content-Type: */*
Accept: application/json
auth-token: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "name" : "...",
  "triggers" : [ {
    "name" : "...",
    "recorder" : {
      "trigger-name" : "...",
      "measurement-setup-name" : "...",
      "type" : "SREC"
    }
  }, {
    "name" : "...",
    "recorder" : {
      "trigger-name" : "...",
      "measurement-setup-name" : "...",
      "type" : "SREC"
    }
  } ]
} ]
                
              

PUT /v1/assignment/signal_reader/edit/{id}/rename

Renames the provided signal reader assignment.

Request Parameters
name type description constraints
auth-token header The authentication token.  
id path The id of the assignment to rename. required long
Request Body
media type data type description
text/plain string The new name of the assignment.
Response Codes
code condition
400 Another assignment with the same name exists.
Response Body
media type data type description
text/plain string The name after the renaming was successful.

Example

Request
PUT /v1/assignment/signal_reader/edit/{id}/rename
Content-Type: text/plain
Accept: text/plain
auth-token: ...

                
my_new_assignment_name
                
              
Response
HTTP/1.1 204 No Content
Content-Type: text/plain

                
my_new_assignment_name
                
              

GET /v1/assignment/signal_reader/edit/{id}/signal_sources

Get the available signal sources for the provided assignment id.

Request Parameters
name type description constraints
auth-token header The authentication token.  
id path required long
Response Body
media type data type description
application/json array of SignalSource (JSON)

Example

Request
GET /v1/assignment/signal_reader/edit/{id}/signal_sources
Content-Type: */*
Accept: application/json
auth-token: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "type" : "WICE"
} ]
                
              

POST /v1/assignment/signal_reader/edit/{id}/signals

Get all available signals for the provided signal source.

Request Parameters
name type description default constraints
auth-token header The authentication token.    
id path   required long
limit query Limit the number of results returned by this query. 100 int
offset query Use offset to fetch the next signals if the total number of signals exceeds the limit used. See AvailableSignals. 0 int
Request Body
media type data type
application/json SignalSource (JSON)
Response Body
media type data type description
application/json AvailableSignals (JSON)

Example

Request
POST /v1/assignment/signal_reader/edit/{id}/signals
Content-Type: application/json
Accept: application/json
auth-token: ...

                
{
  "type" : "WICE"
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "source" : {
    "type" : "WICE"
  },
  "results" : {
    "name" : "..."
  },
  "count" : 10,
  "offset" : 0,
  "limit" : 25
}
                
              

PUT /v1/assignment/signal_reader/edit/{id}/drec/replace-seq-file

Upload a new sequnce file for the provided assignment and DREC recorder.

Request Parameters
name type description constraints
file formdata The new sequence file.  
recorder formdata The DREC to update.  
auth-token header The authentication token.  
id path The id of the assignment to be updated. required long
Request Body
media type data type
multipart/form-data (custom)
Response Codes
code condition
200 Assignment was succcesfully updated with the new sequence file.
400 Some json or property is not present. See error message for more details.
412 If the provided recorder does not exists in the assignment.
Response Body
media type data type description
text/plain object

Example

Request
PUT /v1/assignment/signal_reader/edit/{id}/drec/replace-seq-file
Content-Type: multipart/form-data
Accept: text/plain
auth-token: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: text/plain

                
...
                
              

CURL request

Example of replacing sequence file for a DREC using curl

curl --location --request PUT \
--header 'Content-Type:multipart/form-data' \
--header 'auth-token:85f0bb7a-f3cb-43d6-a8f1-56ed0a5f49f3' \
--form 'recorder={"trigger-name":"TR_2","measurement-setup-name":"MS_1","type":"DREC"};type=application/json' \
--form 'file=@"/path/to/sequence-file.seq"' \
/m2m/v1/assignment/signal_reader/edit/{id}/drec/replace-seq-file

PUT /v1/assignment/signal_reader/edit/{id}/srec/signals/add

Add new signals to be measured for the provided assignment and recorder.

Request Parameters
name type description constraints multivalued
recorder formdata The Recorder to add the signals to.   no
signals formdata A list of SignalName.   yes
source formdata The SignalSource of the provided signals.   no
auth-token header The authentication token.   no
id path The id of the assignment to be updated required long no
Request Body
media type data type
multipart/form-data (custom)
Response Codes
code condition
200 Assignment was succcesfully updated with the provided signal(s).
400 Some json or property is not present. See error message for more details.
412 If any of the provided signals do not exists for the provided signal source and assignment.
Response Body
media type data type description
text/plain object

Example

Request
PUT /v1/assignment/signal_reader/edit/{id}/srec/signals/add
Content-Type: multipart/form-data
Accept: text/plain
auth-token: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: text/plain

                
...
                
              

CURL request

Example of adding a signal to a SREC using curl.

curl --location --request PUT \
--header 'Content-Type:multipart/form-data' \
--header 'auth-token:85f0bb7a-f3cb-43d6-a8f1-56ed0a5f49f3' \
--form 'recorder={"trigger-name":"TR_1","measurement-setup-name":"MS_1","type":"SREC"};type=application/json' \
--form 'signals=[{"name":"Random_Start"}];type=application/json' \
--form 'source={"type":"WICE"};type=application/json' \
/m2m/v1/assignment/signal_reader/edit/{id}/srec/signals/add