-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathopenapi.yaml
More file actions
92 lines (75 loc) · 2.98 KB
/
openapi.yaml
File metadata and controls
92 lines (75 loc) · 2.98 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
86
87
88
89
90
91
92
openapi: 3.0.0
info:
version: 1.0.0
title: CERN Analysis Preservation REST API
termsOfService: 'https://analysispreservation.cern.ch/terms/'
contact:
email: analysis-preservation-support@cern.ch
url: 'https://analysispreservation.cern.ch/about'
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
x-logo:
url: >-
https://github.com/cernanalysispreservation/cap-api-docs/raw/master/web/CAP_API_docs.png
description: >
CERN Analysis Preservation offers a REST API to access the service
independently from the web interface. This allows users to automate specific
tasks or create their own data interface, using simple HTTP calls.
# Introduction
CERN Analysis Preservation provides a RESTful API, built on HTTP. It tries
to provide a predictable interface, that includes:
* resource URLs,
* HTTP response codes to indicate success/errors, and
* accepts and returns JSON in the HTTP body.
You can use your favorite HTTP/REST library for your programming language to
use CAP's API, or you can use one of our SDKs (CLI clients), currently
available in Python. Every action from our app is implemented using REST
endpoints, all of which are documented and available, in order to bea easily
accessible for automations and integrations into specific workflowsor
data-related apps.
# Authentication
If you want to gain access to CERN Analysis Preservation from your console
or any external means other
than the web portal you will need an access token to authenticate with the
portal. You can create
multiple tokens for different services.
CAP offers the following forms of authentication:
- API Key - `access_token`
<!-- ReDoc-Inject: <security-definitions> -->
externalDocs:
description: Click here if you are looking for our developement documentation.
url: 'https://cernanalysispreservation.readthedocs.io'
tags:
- name: Deposits
description: The Deposit resource is used for uploading and editing records on CAP.
- name: Records
description: >
The Record resource is used for fetching and searching published records
on CAP.
- name: Files
description: >
The Files resource is used for uploading files and attach them to
records/deposits.
The following type of upload are possible:
* Local files
* Git repos
* URL linked files
- name: Search
description: Search functionality.
- name: Schemas
description: Operations about schemas.
- name: JSON Schemas
description: Operations about schemas.
- name: Services
description: Operations about services.
- name: User
description: Operations about user.
- name: Webhooks
description: 'Repository webhook connection, for CAP repo updating.'
security:
- Access Token: []
servers:
- url: 'http://localhost:5000'
- url: 'https://analysispreservation.cern.ch/api'
- url: 'https://analysispreservation-dev.cern.ch/api'