Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
335 lines (273 sloc) 8.62 KB
FORMAT: 1A
HOST: http://www.google.com
# pod
POD API maintains metadata about Federal datasets formated in the [Project Open Data](http://project-open-data.github.io/schema/)
# Group Datasets
Dataset related resources of the **POD API**
## Datasets Collection [/datasets]
### List all Datasets [GET]
+ Response 200 (application/json)
[
{
"title": "Data Catalog",
"description": "Version 1.0",
"contactPoint": "foo",
"keyword": [
"catalog"
],
"modified": "2013-05-09 06:00:00",
"publisher": "US Department of X",
"person": "Contact Person",
"mbox": "contact.person@agency.gov",
"identifier": "1",
"accessLevel": "public",
"distribution": [
{
"accessURL": "http://agency.gov/data.json",
"format": "application/json"
}
]
},
{
"title": "Data Catalog2",
"description": "A catalog of data",
"contactPoint": "mr. foo",
"keyword": [
"something"
],
"modified": "2013-05-09 06:00:00",
"publisher": "US Department of X",
"person": "Some person",
"mbox": "contact.person@agency.gov",
"identifier": "1",
"accessLevel": "non-public",
"distribution": [
{
"accessURL": "http://agency.gov/data.json",
"format": "application/json"
}
]
}
]
### Create a Dataset [POST]
+ Request (application/json)
+ Body
{
"title": "Data Catalog",
"description": "Version 1.0",
"contactPoint": "foo",
"keyword": [
"catalog"
],
"modified": "2013-05-09 06:00:00",
"publisher": "US Department of X",
"person": "Contact Person",
"mbox": "contact.person@agency.gov",
"identifier": "1",
"accessLevel": "public",
"distribution": [
{
"accessURL": "http://agency.gov/data.json",
"format": "application/json"
}
]
}
+ Response 201 (application/json)
{
"title": "Data Catalog",
"description": "Version 1.0",
"contactPoint": "foo",
"keyword": [
"catalog"
],
"modified": "2013-05-09 06:00:00",
"publisher": "US Department of X",
"person": "Contact Person",
"mbox": "contact.person@agency.gov",
"identifier": "3",
"accessLevel": "public",
"distribution": [
{
"accessURL": "http://agency.gov/data.json",
"format": "application/json"
}
]
}
## Dataset [/datasets/{id}]
A single Dataset object with all its details
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the Dataset to perform action with. Has example value.
### Retrieve a Dataset [GET]
+ Response 200 (application/json)
+ Header
X-My-Header: The Value
+ Body
{
"title": "Data Catalog",
"description": "Version 1.0",
"contactPoint": "foo",
"keyword": [
"catalog"
],
"modified": "2013-05-09 06:00:00",
"publisher": "US Department of X",
"person": "Contact Person",
"mbox": "contact.person@agency.gov",
"identifier": "1",
"accessLevel": "public",
"distribution": [
{
"accessURL": "http://agency.gov/data.json",
"format": "application/json"
}
]
}
### Update a Dataset [PUT]
+ Request (application/json)
{
"title": "New Title",
"description": "Version 1.0",
"contactPoint": "foo",
"keyword": [
"catalog"
],
"modified": "2013-05-09 06:00:00",
"publisher": "US Department of X",
"person": "Contact Person",
"mbox": "contact.person@agency.gov",
"identifier": "1",
"accessLevel": "public",
"distribution": [
{
"accessURL": "http://agency.gov/data.json",
"format": "application/json"
}
]
}
+ Response 200
### Remove a Dataset [DELETE]
+ Response 204
# Group Users
User related resources of the **POD API**
## User Collection [/users]
### List all Users [GET]
+ Response 200 (application/json)
[
{
"email": "someone@something.com",
"id":"1",
"role": "user",
"organizations":[]
}
]
### Create a User [POST]
+ Request (application/json)
+ Body
{
"name": "my name",
"email": "someone@something.com",
"role": "user",
"organizations":[]
}
+ Response 201 (application/json)
{
"name": "my name",
"email": "someone@something.com",
"id":"1",
"role": "user",
"organizations":[]
}
## Users [/users/{id}]
A single User object with all its details
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the User to perform action with. Has example value.
### Retrieve a User [GET]
+ Response 200 (application/json)
+ Header
X-My-Header: The Value
+ Body
{
"name": "my name",
"email": "someone@something.com",
"id":"1",
"role": "user",
"organizations":[]
}
### Update an User [PUT]
+ Request (application/json)
+ Body
{
"name": "new name",
"email": "someone@something.com",
"id":"1",
"role": "user",
"organizations":[]
}
+ Response 201
### Remove an User [DELETE]
+ Response 204
# Group Organizations
Organization related resources of the **POD API**
## Organization Collection [/organizations]
### List all Organizations [GET]
+ Response 200 (application/json)
[
{
"title": "Data Catalog",
"id":"1",
"datasets":[],
"users":[],
"logo":""
"children":[]
}
]
### Create an Organization [POST]
+ Request (application/json)
+ Body
{
"title": "Data Catalog",
"datasets": [],
"users": [],
"logo": "",
"children": []
}
+ Response 201 (application/json)
{
"title": "Data Catalog",
"id": "1",
"datasets": [],
"users": [],
"logo": "",
"children": []
}
## Organizations [/organizations/{id}]
A single Dataset object with all its details
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the Organization to perform action with. Has example value.
### Retrieve an Organization [GET]
+ Response 200 (application/json)
+ Header
X-My-Header: The Value
+ Body
{
"title": "Data Catalog",
"id": "1",
"datasets": [],
"users": [],
"logo": "",
"children": []
}
### Update an Organization [PUT]
+ Request (application/json)
+ Body
{
"title": "Data Catalog",
"id": "1",
"datasets": [],
"users": [],
"logo": "",
"children": []
}
+ Response 201
### Remove an Organization [DELETE]
+ Response 204