Patch Features for Source - 400.1 Bad request content

Trying to do a patch on the features for a source and getting 400.1 Bad request content, “The request was syntactically correct but its content is semantically invalid.”

The request body looks like this:
{
“operations”: [
{
“op”: “replace”,
“path”: “/features”,
“value”: [“ENABLE”,“UNLOCK”,“SEARCH”,“MANAGER_LOOKUP”,“CURRENT_PASSWORD”,“GROUPS_HAVE_MEMBERS”,“PASSWORD”,“AUTHENTICATE”,“UNSTRUCTURED_TARGETS”]
}
]
}

I’ve also tried the path as /features/ and /features/- Neither of those worked either. I do have the content type set correctly as “application/json-patch+json” per the documentation.

Does anyone know what I might be missing here?

Hi,

Please try the PATCH {{api-url}}/beta/sources/{{source-id}} with this body:

[
    {
        "op": "replace",
        "path": "/features",
        "value": ["ENABLE","UNLOCK","SEARCH","MANAGER_LOOKUP","CURRENT_PASSWORD","GROUPS_HAVE_MEMBERS","PASSWORD","AUTHENTICATE","UNSTRUCTURED_TARGETS"]
    }
]

Thanks,
Lisa Ivy

2 Likes

Thank you Lisa! The API docs made it appear that the “operations” portion of the body was required as well. This worked!

@mankelat,

I’m sorry for the incorrect example in the spec. I’m going to get that fixed so future developers don’t have this issue. Thank you for bringing it to our attention.

1 Like

thank you for this thread, was struggling with this exact thing yesterday

3 Likes