Skip to content

/v4/projects/6976/phases?fields=... doesn't accept encoded query params #160

@maxceem

Description

@maxceem

When we make requests with query params we are supposed to encode query param values with encodeURIComponent().

So requests like this:

https://api.topcoder-dev.com/v4/projects/6978/phases?fields=products,budget,createdAt,createdBy,details,duration,endDate,id,name,progress,projectId,spentBudget,startDate,status,updatedAt,updatedBy

After encoding the value for fields param should look like this:

https://api.topcoder-dev.com/v4/projects/6978/phases?fields=products%252Cbudget%252CcreatedAt%252CcreatedBy%252Cdetails%252Cduration%252CendDate%252Cid%252Cname%252Cprogress%252CprojectId%252CspentBudget%252CstartDate%252Cstatus%252CupdatedAt%252CupdatedBy

But if we encode the field param value server returns only id field instead of the full list:

{
  "id": "7b216a3c-0e5e-4d32-a0b4-55476fcbe717",
  "version": "v4",
  "result": {
    "success": true,
    "status": 200,
    "content": [{
      "id": 1215
    }, {
      "id": 1223
    }, {
      "id": 1232
    }],
    "metadata": {
      "totalCount": 3
    }
  }
}

And when we send request without encoding, sever returns correct full response.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions