Create resource
Creates a resource in a project
Path Parameters
project uuid or name
Query Parameters
Autogenerated if skipped.
Request Body required
The name of the resource. Must be unique within the project.
Example: my-resource
The title can contain any UTF-8 character, used to provide a human-readable name for the resource. Can also be left empty.
The namespace of the resource. The resource namespace are created when permissions for that resource is created in Frontier. If namespace doesn't exists the request will fail.
Example: compute/instance
UserID or ServiceUserID that should be marked as owner of the resource. If not provided, the current logged in user will be made the resource owner.
Example: user:92f69c3a-334b-4f25-90b8-4d4f3be6b825
- 200
- 400
- 401
- 403
- 404
- 500
- default
A successful response.
Schema
resource object
{
"resource": {
"id": "string",
"name": "string",
"created_at": "2023-06-07T05:39:56.961Z",
"updated_at": "2023-06-07T05:39:56.961Z",
"urn": "string",
"project_id": "string",
"namespace": "string",
"principal": "string",
"metadata": {},
"title": "string"
}
}
Bad Request - The request was malformed or contained invalid parameters.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Unauthorized - Authentication is required
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Forbidden - User does not have permission to access the resource
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Not Found - The requested resource was not found
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Internal Server Error. Returned when theres is something wrong with Frontier server.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
POST /v1beta1/projects/:project_id/resources
Authorization
name: Basic type: httpdescription: use Client ID as username and Client Secret as passwordin: headerscheme: basic
Request
Request
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/projects/:project_id/resources' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "string",
"title": "string",
"namespace": "string",
"principal": "string",
"metadata": {}
}'