Object Type API

Object Types are the types of the objects.

Adding an object_type

POST /v1/object_types

Parameters

Name Description
object_type[name] The name of the object type
object_type[mime_types] Array of mime_types

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: rWvq0r2xUbvXWTEz4mdd8A
Client: mejVlW5t-A35B53_wMP5dQ
Uid: gunnar@huels.com
Host: example.org
Cookie: 

Route

POST /v1/object_types

Body

{"object_type":{"name":"minima","mime_types":[{"id":86}]}}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/object_types" -d '{"object_type":{"name":"minima","mime_types":[{"id":86}]}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: rWvq0r2xUbvXWTEz4mdd8A" \
	-H "Client: mejVlW5t-A35B53_wMP5dQ" \
	-H "Uid: gunnar@huels.com"

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
Set-Cookie: _session_id=aTk4aXNIYjFJMGx2SWErL1loU3ppeGZnS0ZPZmlvWUVWNHpKMWhnZFA2MnMwZDVBRHNUTVRxLzFWMC9uUXdIMkJCWHppYTlXUjN6cVRmUGdGN1JWcFFXZDVHM05qZWFiUzZPUmxOR0pPQjF3NjlVWFJQSUJqTTVYZ1F5OG9CSEMrckhjeGxnVDVPd1R5L1ZSN1Z2cjhuRlFtbm1zQk0wdnZWZHlxbENBWEp3R09UbS85OUF4dGtVbUxuNFBjSUJCLS1vN1JyVWQvWDJuS1Jqb0FTTkU3MG9nPT0%3D--2b5adf098bd46f8a79a0070df1538115056b7ed4; path=/; HttpOnly
Vary: Origin
ETag: W/"3269eb1801518832bbda851575a7d0f6"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: e8d20633-7812-4864-a2cf-33d9cacdfe13
X-Runtime: 0.103280
Content-Length: 41

Status

201 Created

Body

{
  "id": 16,
  "name": "minima",
  "mime_types": [

  ]
}