DSS REST API Delect Instrument from a InstrumentList

In DSS REST API Tree, there's no example about how to delete a Instrument from a Instrument List by 'InstrumentListItemKeys' so can you share the sample REST call to delete dummy item key , 'VjF8MHgwOGY3NTQyZTA1ODlmMmU2fDI'?

'0x08f7542e0589f2e6', dummy IL.

Two attempts below but failed.

  1. POST /RestApi/v1/Extractions/InstrumentLists('0x08f7542e0589f2e6')/DataScope.Select.Api.Extractions.InstrumentListDeleteItemsById('VjF8MHgwOGY3NTQyZTA1ODlmMmU2fDI'), with error '{"error":{"code":"45c6ed8d-2484-48be-9a8b-8f0b277e8b11","message":"The request URI is not valid. The segment 'DataScope.Select.Api.Extractions.InstrumentListDeleteItemsById' cannot include key predicates, however it may end with empty parenthesis."}}'
  2. POST /RestApi/v1/Extractions/InstrumentLists('0x08f7542e0589f2e6')/DataScope.Select.Api.Extractions.InstrumentListDeleteItemsById HTTP/1.1

    with body

    {"InstrumentListItemKeys":"VjF8MHgwOGY3NTQyZTA1ODlmMmU2fDI"}, with error '{"error":{"message":"Invalid request parameter InstrumentListItemKeys"}}'

dss-deleteitembyid.png

Best Answer

  • gareth.teage
    Answer ✓

    Hi @Tony.Zhu_R

    POST {{BaseURL}}/Extractions/InstrumentLists('{{ListId}}')/DataScope.Select.Api.Extractions.InstrumentListDeleteItemsById

    requestBody example:

    {
    "InstrumentListItemKeys": [
    "{{InstrumentListItemKey1}}",
    "{{InstrumentListItemKey2}}"
    ]
    }

    Response should be 204 'No Content'

    Best regards,

    Gareth

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.