[0ce187]: / Allura / docs / api-rest / traits.yaml  Maximize  Restore  History

Download this file

86 lines (80 with data), 3.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
- searchable:
queryParameters:
query:
description: |
JSON array [{"field1","value1","operator1"},{"field2","value2","operator2"},...,{"fieldN","valueN","operatorN"}] <<description>>
example: |
<<example>>
- orderable:
queryParameters:
orderBy:
description: |
Order by field: <<fieldsList>>
type: string
required: false
order:
description: Order
enum: [desc, asc]
default: desc
required: false
- pageable:
queryParameters:
page:
description: Skip over a number of elements by specifying a starting page
type: integer
required: false
example: 0
default: 0
limit:
description: Limit the number of elements on the response "page"
type: integer
required: false
example: 10
default: 25
- permissionTestable:
description: |
**Endpoints**
Permissions can be checked at three levels:
1. **Neighborhood:** `/rest/p/has_access`
2. **Project:** `/rest/p/project_name/has_access`
3. **Tool:** `/rest/p/project_name/mount_point/has_access`
---
It is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has perm permission to the neighborhood/project/tool.
E.g.:
**GET** `/rest/p/test/wiki/has_access?user=admin1&perm=create`
*returns* { result: true }
**GET** `/rest/p/test/wiki/has_access?user=user01&perm=create`
*returns* { result: false }
queryParameters:
user:
type: string
example: heiths
required: true
description: The username to check
- bearerAuth:
# This can also be done with ?access_token=
# But it's simpler in the docs / Try It interface to just show one option
# and using the header method keeps it separate from query params that the individual API endpoints use
headers:
Authorization:
description: |
Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/
Use it here like: `Bearer 5d79e800a36bf602314d`
type: string
pattern: "^Bearer [0-9a-f]+$"