Git Product home page Git Product logo

api-documentation's Introduction

API-Documentation

Documentation for National Central University API

Root URL

https://api.cc.ncu.edu.tw

Authorization

Before you making any API calls, you have to register a client at OAuth Management first. There are two situations to use our API:

  • Access resources that contains personal information :
    1. Follow the OAuth 2.0 protocol to get an access token, see documentation.
    2. Read the documentation to use access token.
  • Access resources without personal information :
    1. Get an api token from OAuth Management.
    2. Read the documentation to use api token.

Internationalization

Some NCU APIs are bilingual(zh-TW, en-US) and default to zh-TW. Use Accept-Language header to specify your language.

Encoding

All strings are encoded in UTF-8.

Endpoints

/activity/v1

/location/v1

/course/v1

/personnel/v1

/calendar/v1

/bus/v1

Error Status Code

HTTP Status Code Description
400 invalid body or parameter.
401 access a protected resource with an invalid token.
403 access a protected resource with an token from invalid client.
404 resource not found.
405 invalid request method
500 internal server error.

Problems?

If you have any problems, please file a issue or just send us pull requests. Any pull requests submitted to master branch are not allowed, please submit to develop branch. It would be appreciated that with brief descriptions and some unit tests to proof.

Format Reference

The format of this document refer to Documentation for University of Waterloo API.

License

MIT License Copyright © 2015-2015 Computer Center, National Central University

api-documentation's People

Contributors

c910335 avatar jason1122g avatar yyc1217 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yyc1217

api-documentation's Issues

internal error at /departments/{departmentId}/courses

/departments/{departmentId}/courses has an internal server error.
Besides, the link on API menu may be type as "/departments/{departmentId}/courses" not "/departments/{departmentId}"

error_description
500 Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source:

Invalid CSRF Token

When I try using oauth/authorize to get code, got response with content below:

<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.9 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 403 - Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.</u></p><p><b>description</b> <u>Access to the specified resource has been forbidden.</u></p><hr class="line"><h3>Apache Tomcat/8.0.9</h3></body></html>

Request as the screenshot: http://i.imgur.com/ZF8kdO7.png

How can I get user unique id?

In document https://github.com/NCU-CC/API-Documentation/blob/master/personnel-service/v1/cards.md#structure, we only can get the name of person and their unit and group or title.
So, can I get the unique id of each person that I can binding and recognize everyone in this system?

Error Code Summary

provide Error Code Summary, for example

HTTP Status Code Message Note
404 Sources Not Found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.