Skip to content

Conversation

@suppermancool
Copy link
Contributor

upgrade project api to v5

upgrade project api to v5
@suppermancool
Copy link
Contributor Author

@maxceem
i upgraded all project api except:

  1. https://api.topcoder-dev.com/v5/projects/metadata/orgConfig?filter=orgId=in(20000010,20000013,20000015):
    the error: validation error: “orgId” is require
    i’m not sure how to send array of orgId (edited)

  2. https://api.topcoder-dev.com/v5/projects/:
    it use metadata in response, i try to get x-total from header but the request doesn’t have Access-Control-Expose-Headers in response so axios can’t get it (more detail https://stackoverflow.com/questions/37897523/axios-get-access-to-response-header-fields)

I also upgraded all project attachments api but it throw some random error

fix lint error
@maxceem
Copy link
Collaborator

maxceem commented Oct 14, 2019

Thanks @suppermancool

  1. Checking the issues with attachments now...

  2. The headers are fixed now. So we can access pagination metadata in the headers:

    image

@suppermancool
Copy link
Contributor Author

suppermancool commented Oct 14, 2019

@maxceem we don't have segment field in https://api.topcoder-dev.com/v5/projects/, But the code send it :

Screen Shot 2019-10-14 at 12 05 04

@suppermancool
Copy link
Contributor Author

@maxceem also don't have some other fields like: 'members', 'actualPrice', 'estimatedPrice', 'createdAt', 'updatedAt', 'createdBy', 'updatedBy', 'details', 'lastActivityAt', 'lastActivityUserId', 'version', 'templateId', 'description'

Screen Shot 2019-10-14 at 12 08 49

@maxceem
Copy link
Collaborator

maxceem commented Oct 14, 2019

@suppermancool I'm deploying the fix for your two comments above. I will update shortly (10 - 20 mins).

upgrade /projects api
@suppermancool
Copy link
Contributor Author

@maxceem ok done in the latest commit, i pass all fields to request

the keyword filter doesn't work, i try to search project by name with this field but it doesn't work:
https://gyazo.com/599f3636e9623f34f08028c7a46aaa01

Copy link
Collaborator

@maxceem maxceem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@suppermancool

Could you please have a look at my comments below.

The Project Service has been redeployed, and filtering suppose to work. Let me know if you still face any issues.

Please, comment out the code with filter by segment we don't support it at the moment.

@maxceem
Copy link
Collaborator

maxceem commented Oct 14, 2019

@suppermancool when I try to filter projects using:

  • search filed
  • project status
  • column filter
  • My project

Not filters are added to the URL request

image

Also, note, that we have some default query params which are added to this request even without any filters:

https://api.topcoder-dev.com/v4/projects/?limit=20&offset=0&fields=id,name,description,members,status,type,actualPrice,estimatedPrice,createdAt,updatedAt,createdBy,updatedBy,details,lastActivityAt,lastActivityUserId,version,templateId&sort=updatedAt+desc

update with feedback
update some params
fix input params
revert code
remove redundant code
@suppermancool
Copy link
Contributor Author

@maxceem for this #3360 (comment)
i think limit, offset are changed to perPage, page.

All done in the latest commit

Copy link
Collaborator

@maxceem maxceem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think limit, offset are changed to perPage, page.

Thanks for pointing this out.

All works good now as per the current version of Project Service we have.

Thank you for rapid updates @suppermancool!

@maxceem
Copy link
Collaborator

maxceem commented Oct 14, 2019

FYI @vikasrohit we have now draft v5 version of Connect App, which points to the currently deployed version of https://circleci.com/gh/topcoder-platform/projects-api.

Not everything yet works there due to an outdated version of Project Service or some API inconsistencies. But already can be checked out.

So once you confirm a separate DEV env for this, we may start deploying it.

@maxceem maxceem merged commit 97e7504 into topcoder-archive:v5-upgrade Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants