Skip to content

RoboticsClubAtUNT/robotics-club-web-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robotics Club @ UNT's API (v1)

This API adheres to v1.0 of the JSONAPI specification.

API Actions
Create a Post
Find All the Posts
Find a Specific Post
Remove a Specific Post
Update a Specific Post

Create A Post

Create a new Post and save it to the database.

URL

/api/v1/posts

Method

POST

URL Params

None

Data Params
{
  "data": {
    "attributes": {
      "title": String,
      "body": String,
      "kind": String,
      "tags": String,
      "isPrivate": Boolean,
      "isPublished": Boolean
    },
    "links": {
      "first": String,
      "next": String,
      "prev": String,
      "last": String,
      "related": String
    },
    "relationships": {
      "author": {
        "data": {
          "_type": String,
          "_id": String
        }
      }
    }
  }
}
Success Response
Error Response
Example

Find All The Posts

Returns a JSON document with an array of all the posts within the database.

URL

/api/v1/posts

Method

GET

URL Params

None

Data Params

None

Success Response
{
  "data": [{
    "type": String,
    "_id": String,
    "attributes": {
      "title": String,
      "body": String,
      "kind": String,
      "created": Date,
      "updated": Date,
      "tags": String,
      "isPrivate": Boolean,
      "isPublished": Boolean
    },
    "links": {
      "first": String,
      "next": String,
      "self": String,
      "prev": String,
      "last": String,
      "related": String
    },
    "relationships": {
      "author": {
        "data": {
          "_type": String,
          "_id": String
        }
      }
    }
  }, ...]
}
Error Response
Example

Find A Specific Post

Returns a JSON document with an array of all the posts within the database.

URL

/api/v1/posts/:id

Method

GET

URL Params

None

Data Params

None

Success Response
{
  "data": {
    "type": String,
    "_id": String,
    "attributes": {
      "title": String,
      "body": String,
      "kind": String,
      "created": Date,
      "updated": Date,
      "tags": String,
      "isPrivate": Boolean,
      "isPublished": Boolean
    },
    "links": {
      "first": String,
      "next": String,
      "self": String,
      "prev": String,
      "last": String,
      "related": String
    },
    "relationships": {
      "author": {
        "data": {
          "_type": String,
          "_id": String
        }
      }
    }
  }
}
Error Response
Example

Remove A Specific Post

Returns a JSON document with an array of all the posts within the database.

URL

/api/v1/posts/:id

Method

DELETE

URL Params

None

Data Params

None

Success Response
Error Response
Example

Update A Specific Post

Returns a JSON document with an array of all the posts within the database.

URL

/api/v1/posts/:id

Method

PATCH

URL Params

None

Data Params

None

Success Response
Error Response
Example

About

Production code for the Robotics Club @ UNT's Web App

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors