crowd.dev icon indicating copy to clipboard operation
crowd.dev copied to clipboard

[C-1154] Update API Documentation

Open RaginiAngarka opened this issue 1 year ago • 5 comments

crowd.dev edition

Cloud (hosted)

Version

No response

What happened?

Few observations while trying to run the APIs. Please update the documentation, so it helps other developers. Following  are the observations:-  

  1. List Active Members (https://docs.crowd.dev/reference/get_tenant-tenantid-member-active) :- According to the API documentation, the parameter name should be "filter[activityTimestampFrom]." But when API is called, it gives an error :- as‘activityTimestampFrom’ is a required parameter. Please update the API error code. It should be 'filter[activityTimestampFrom]' and not ‘activityTimestampFrom’.   The documentation says the API is expecting a timestamp, but when timestamp is passed, the API gives an error as ‘date’ field out of range. After a few tries, I understood that it accepts the parameter in YYYY/MM/DD format. After sending the date in YYYY/MM/DD format, it works fine, but if we send YYYY/DD/MM then it gives an error as‘date’ field out of range.` Please update documentation with expected format of the timestamp.  
  2. QueryOrganizations (https://docs.crowd.dev/reference/post_tenant-tenantid-organization-query) :- The newly created organization is not getting listed. Once the member is assigned to Organization then Organization is getting listed in Organizations list. Is that expected? If yes, then please update the documentation, otherwise the developer has no clue why it is not getting listed.   3.  Update Member API (PUT) (https://docs.crowd.dev/reference/put_tenant-tenantid-member-id):- Is not allowing to assign member to an Organization. It is giving error - Invalid value { name: 'XXX' }.  Please update documentation with correct field name.
Screenshot 2023-04-10 at 1 56 38 PM

  There is another method Update Member (https://docs.crowd.dev/reference/post_tenant-tenantid-member) (POST), with this API, could assign member to Organization. Is this correct method to update member data?  Is yes, then please update the documentation for Update Member API (PUT) accordingly.   4. Create or update an activity (https://docs.crowd.dev/reference/post_tenant-tenantid-activity) (POST):- Even though ‘memberId’ is passed, it is giving error as - notNull Violation: activity.memberId cannot be null. Please update documentation with appropriate parameter name.  Please provide a link to the list of activity types in the doc. Also, please provide the format which is allowed for 'timestamp' parameter for this API.

Screenshot 2023-04-10 at 1 40 23 PM

Command / Request

No response

Relevant log output

No response

C-1154

RaginiAngarka avatar Apr 10 '23 08:04 RaginiAngarka

Thanks a lot for this feedback @RaginiAngarka!

We will take a look at it and update the documentation accordingly.

jonathimer avatar Apr 11 '23 20:04 jonathimer

@joanreyero2reyero moved this one into the following cycle since you won't be here for these remaining days.

Do you think you can prioritize it next week?

joanagmaia avatar Sep 07 '23 10:09 joanagmaia

I will try. But I only have 3 days again next week, since we have the strategy offsite

joanreyero avatar Sep 07 '23 10:09 joanreyero

@joanreyero , can we please update the documentation of this API as well? Thanks PUT method https://cm.lfx.dev/api/tenant/{tenantId}/member/{memberId}

Related ticket - https://github.com/CrowdDotDev/linux-foundation-support/discussions/298

RaginiAngarka avatar Nov 08 '23 15:11 RaginiAngarka

Hey, is this issue still looking for contributions? I would love to get involved with Crowd.dot for a couple of issues surrounding API endpoints and any relevant docs. Could you point me to the right issues that require to be immediately worked upon @joanagmaia ?

Thanus-Kumaar avatar Feb 05 '24 18:02 Thanus-Kumaar