Skip to content

Latest commit

 

History

History
152 lines (114 loc) · 1.92 KB

domains.md

File metadata and controls

152 lines (114 loc) · 1.92 KB

Domains

Get all domains

Request

GET /domains

Headers

Name Example
Authorization Authorization: Bearer :tokenId

Response

Status: 200 OK
{
	"type": "domains",
	"data": [
		{
			"type": "domain",
			"data": {
				"id": ":domainId",
				"title": "Example",
				"created": "1475491394341",
				"updated": "1475491394341"
			}
		}
	]
}

Add a domain

Request

POST /domains
{
	"title": "Example"
}

Headers

Name Example
Authorization Authorization: Bearer :tokenId

Parameters

Name Type Required Description
title String true Title of the domain.

Response

Status: 201 Created
Location: /domains/:domainId
{
	"type": "domain",
	"data": {
		"id": ":domainId",
		"title": "Example",
		"created": "1475491394341",
		"updated": "1475491394341"
	}
}

Update a domain

Request

PUT /domains/:domainId
{
	"title": "Example"
}

Headers

Name Example
Authorization Authorization: Bearer :tokenId

Parameters

Name Type Required Description
title String false Title of the domain.

Response

Status: 200 OK
{
	"type": "domain",
	"data": {
		"id": ":domainId",
		"title": "Example",
		"created": "1475491394341",
		"updated": "1475491394341"
	}
}

Delete a domain

Request

DELETE /domains/:domainId

Headers

Name Example
Authorization Authorization: Bearer :tokenId

Response

Status: 204 No Content