Click here to Skip to main content
15,878,231 members
Home / Discussions / CodeProject API

CodeProject API

GeneralRe: Please, give us the article body and downloads... Pin
Matthew Dennis10-Dec-15 5:31
sysadminMatthew Dennis10-Dec-15 5:31 
GeneralRe: Please, give us the article body and downloads... Pin
Pete O'Hanlon10-Dec-15 7:32
mvePete O'Hanlon10-Dec-15 7:32 
General404 when passing number as Mode Pin
Thomas Daniels14-May-15 23:23
mentorThomas Daniels14-May-15 23:23 
GeneralRe: 404 when passing number as Mode Pin
Matthew Dennis15-May-15 6:09
sysadminMatthew Dennis15-May-15 6:09 
GeneralTypo at page of ReputationTypeViewModel Pin
Thomas Daniels10-May-15 7:01
mentorThomas Daniels10-May-15 7:01 
GeneralFor your viewing pleasure ... Pin
Matthew Dennis12-Apr-15 11:22
sysadminMatthew Dennis12-Apr-15 11:22 
GeneralRe: For your viewing pleasure ... Pin
Mario Z12-Apr-15 22:35
professionalMario Z12-Apr-15 22:35 
GeneralRe: For your viewing pleasure ... Pin
Matthew Dennis13-Apr-15 5:45
sysadminMatthew Dennis13-Apr-15 5:45 
NewsFailing downloads Pin
Pete O'Hanlon11-Apr-15 21:05
mvePete O'Hanlon11-Apr-15 21:05 
GeneralRe: Failing downloads Pin
Thomas Daniels11-Apr-15 22:01
mentorThomas Daniels11-Apr-15 22:01 
GeneralRe: Failing downloads Pin
Pete O'Hanlon11-Apr-15 22:10
mvePete O'Hanlon11-Apr-15 22:10 
GeneralRe: Failing downloads Pin
Pete O'Hanlon12-Apr-15 21:53
mvePete O'Hanlon12-Apr-15 21:53 
GeneralRe: Failing downloads Pin
Matthew Dennis13-Apr-15 5:40
sysadminMatthew Dennis13-Apr-15 5:40 
GeneralRe: Failing downloads Pin
Pete O'Hanlon13-Apr-15 5:42
mvePete O'Hanlon13-Apr-15 5:42 
GeneralSome suggestions for API enhancements PinPopular
Mario Z10-Apr-15 9:58
professionalMario Z10-Apr-15 9:58 
I'm currently working on small POC website that shows CodeProject member's Q&A tags statistic (if interested it is available here) and while building it I collected few suggestions which I hope you'll find interesting and/or useful.

- First the easy one, in API documentations on few places the CodeProject APIs are referred as HTML services.
I think this should be HTTP services or better jet RESTful services.

- Somewhat common practice for defining a response's format is to add a format's extension termination on the URL to identify data type you want to request from the server, for example like the following:

Now whether this is truly a RESTful approach or a best practice is debatable, but as it is now there is a problem of mixing two conventions. You see the versioning does not follow the convention that setting the result format uses. In order for versioning to follow the same convention (a true RESTful approach) it should also be defined in Media Type header, for example like the following:

Nevertheless I must say I don't see any downfall in supporting both approaches, as long as the priorities and the used default values are documented.

- Regarding the MY API, most (if not all) of these currently available GET APIs are publicly available resources. I mean every CodeProject member can look at the other member's Questions, Answers, Articles, etc. so it just feels natural to me that Client Credentials Grant should be required here, not Authorization Code Grant.
Nevertheless I'm not suggesting to change the current MY API (because I presume it is likely that you want to add follow-up PUT, POST, etc. APIs here), instead I'm suggesting to add something like the following:

And this API should work on Client Credentials Grant or Implicit Grant flow.

- Regarding the pagination, pageSize should definitely be available for querying together with page and you could specify the pageSize value limitation in the documentation.
So something like this should be supported:

Also I believe a very useful thing could be to provide First, Last, Next and Previous resource locations in PaginationInfo so that the pagination can be processed continuously from the response itself.
For example for the following API:

Could result into something like the following:
"pagination": {
    "page": 3,
    "pageSize": 25,
    "totalPages": 5,
    "totalItems": 25,
    "first" : { "href" : "" },
    "prev" : { "href" : "" },
    "next" : { "href" : "" },
    "last" : { "href" : "" },

Or maybe something like this:
    <link rel="first" href="" />
    <link rel="prev" href="" />
    <link rel="next" href="" />
    <link rel="last" href="" />

- Partial returned result, so instead of receiving a full result and filtering out the necessary data we could do something like this:

And receive only the following:
  "pagination": {
    "totalItems": 2
  "items": [
      "id": "100",
	  "summary": "First sample item."
      "id": "200",
	  "summary": "Second sample item."

I hope any of these you will find useful, if you don't mind these type of suggestions let me know and I will continue collecting them and posting here afterword.
GeneralAPI Abstraction Pin
Ranjan.D23-Feb-15 3:58
professionalRanjan.D23-Feb-15 3:58 
QuestionNon-redirect Flows Pin
Ranjan.D21-Feb-15 9:55
professionalRanjan.D21-Feb-15 9:55 
AnswerRe: Non-redirect Flows Pin
Ranjan.D21-Feb-15 14:29
professionalRanjan.D21-Feb-15 14:29 
GeneralRegarding GetArticles Pin
Ranjan.D12-Feb-15 5:32
professionalRanjan.D12-Feb-15 5:32 
GeneralOAuth not work for me: invalid_request Pin
Alеksey Nemiro6-Feb-15 3:26
Alеksey Nemiro6-Feb-15 3:26 
GeneralRe: OAuth not work for me: invalid_request Pin
Matthew Dennis6-Feb-15 4:40
sysadminMatthew Dennis6-Feb-15 4:40 
GeneralRe: OAuth not work for me: invalid_request Pin
Alеksey Nemiro6-Feb-15 5:39
Alеksey Nemiro6-Feb-15 5:39 
GeneralSometimes author name is empty and ID is 0 Pin
Thomas Daniels1-Jan-15 7:26
mentorThomas Daniels1-Jan-15 7:26 
GeneralRe: Sometimes author name is empty and ID is 0 Pin
Matthew Dennis1-Jan-15 7:33
sysadminMatthew Dennis1-Jan-15 7:33 
GeneralRe: Sometimes author name is empty and ID is 0 Pin
Thomas Daniels18-Mar-15 6:44
mentorThomas Daniels18-Mar-15 6:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Flags: Fixed

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.