summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api/api.yaml
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-27 15:45:03 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-27 15:45:03 -0700
commitbcb9d2c6793b39b165caf9e63c4803d2a28e9876 (patch)
treeac8a1a50d7949a48b1c4f6fa5e443ab394cd7ace /rust/fatcat-api/api.yaml
parent19eb1641eece9f03ca193417cdf244efc1a9da8a (diff)
downloadfatcat-bcb9d2c6793b39b165caf9e63c4803d2a28e9876.tar.gz
fatcat-bcb9d2c6793b39b165caf9e63c4803d2a28e9876.zip
batch POST methods
Diffstat (limited to 'rust/fatcat-api/api.yaml')
-rw-r--r--rust/fatcat-api/api.yaml162
1 files changed, 117 insertions, 45 deletions
diff --git a/rust/fatcat-api/api.yaml b/rust/fatcat-api/api.yaml
index f1b94234..8fcbf488 100644
--- a/rust/fatcat-api/api.yaml
+++ b/rust/fatcat-api/api.yaml
@@ -57,19 +57,6 @@ definitions:
message:
type: string
example: "The computers did the thing successfully!"
- creator_entity:
- type: object
- required:
- - full_name
- properties:
- <<: *ENTITYPROPS
- full_name:
- type: string
- example: "Grace Hopper"
- orcid:
- type: string
- #format: custom
- example: "0000-0002-1825-0097"
container_entity:
type: object
required:
@@ -90,6 +77,19 @@ definitions:
type: string
coden:
type: string
+ creator_entity:
+ type: object
+ required:
+ - full_name
+ properties:
+ <<: *ENTITYPROPS
+ full_name:
+ type: string
+ example: "Grace Hopper"
+ orcid:
+ type: string
+ #format: custom
+ example: "0000-0002-1825-0097"
file_entity:
type: object
properties:
@@ -300,39 +300,39 @@ x-entity-responses: &ENTITYRESPONSES
$ref: "#/definitions/error_response"
paths:
- /creator:
+ /container:
post:
parameters:
- name: entity
in: body
required: true
schema:
- $ref: "#/definitions/creator_entity"
+ $ref: "#/definitions/container_entity"
responses:
201:
description: Created Entity
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
-# /creator/batch:
-# post:
-# parameters:
-# - name: entity_list
-# in: body
-# required: true
-# schema:
-# type: array
-# items:
-# $ref: "#/definitions/creator_entity"
-# responses:
-# 201:
-# description: Created Entities
-# schema:
-# type: array
-# items:
-# $ref: "#/definitions/entity_edit"
-# <<: *ENTITYRESPONSES
- /creator/{id}:
+ /container/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/container_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
+ /container/{id}:
parameters:
- name: id
in: path
@@ -343,12 +343,12 @@ paths:
200:
description: Found Entity
schema:
- $ref: "#/definitions/creator_entity"
+ $ref: "#/definitions/container_entity"
<<: *ENTITYRESPONSES
- /creator/lookup:
+ /container/lookup:
get:
parameters:
- - name: orcid
+ - name: issnl
in: query
type: string
required: true
@@ -356,23 +356,41 @@ paths:
200:
description: Found Entity
schema:
- $ref: "#/definitions/creator_entity"
+ $ref: "#/definitions/container_entity"
<<: *ENTITYRESPONSES
- /container:
+ /creator:
post:
parameters:
- name: entity
in: body
required: true
schema:
- $ref: "#/definitions/container_entity"
+ $ref: "#/definitions/creator_entity"
responses:
201:
description: Created Entity
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
- /container/{id}:
+ /creator/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/creator_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
+ /creator/{id}:
parameters:
- name: id
in: path
@@ -383,12 +401,12 @@ paths:
200:
description: Found Entity
schema:
- $ref: "#/definitions/container_entity"
+ $ref: "#/definitions/creator_entity"
<<: *ENTITYRESPONSES
- /container/lookup:
+ /creator/lookup:
get:
parameters:
- - name: issnl
+ - name: orcid
in: query
type: string
required: true
@@ -396,7 +414,7 @@ paths:
200:
description: Found Entity
schema:
- $ref: "#/definitions/container_entity"
+ $ref: "#/definitions/creator_entity"
<<: *ENTITYRESPONSES
/file:
post:
@@ -412,6 +430,24 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /file/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/file_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
/file/{id}:
parameters:
- name: id
@@ -452,6 +488,24 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /release/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/release_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
/release/{id}:
parameters:
- name: id
@@ -492,6 +546,24 @@ paths:
schema:
$ref: "#/definitions/entity_edit"
<<: *ENTITYRESPONSES
+ /work/batch:
+ post:
+ parameters:
+ - name: entity_list
+ in: body
+ required: true
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/work_entity"
+ responses:
+ 201:
+ description: Created Entities
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/entity_edit"
+ <<: *ENTITYRESPONSES
/work/{id}:
parameters:
- name: id