### Start the application with Docker Compose Source: https://github.com/datacite/lupo/blob/master/README.md Builds and starts the application and its dependencies using Docker Compose with the local override file. ```bash docker-compose -f docker-compose.yml -f docker-compose.local.yml up --build ``` -------------------------------- ### GET /client-prefixes Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Lists client-prefix links. ```APIDOC ## GET /client-prefixes ### Description Lists client-prefix links. ### Method GET ### Endpoint /client-prefixes ### Response #### Success Response (200) - **data** (array) - List of client-prefix links. #### Response Example { "data": [] } ``` -------------------------------- ### GET /repository-prefixes Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Lists repository-prefix links. ```APIDOC ## GET /repository-prefixes ### Description Lists repository-prefix links. ### Method GET ### Endpoint /repository-prefixes ### Response #### Success Response (200) - **data** (array) - List of repository-prefix links. #### Response Example { "data": [] } ``` -------------------------------- ### GET /reference-repositories Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md List reference repositories with facets. ```APIDOC ## GET /reference-repositories ### Description Lists re3data reference repositories with optional faceted filtering. Requires authentication. ### Method GET ### Endpoint /reference-repositories ### Parameters #### Query Parameters - **re3dataId** (string) - Optional - Filter by re3data ID. - **opendoarId** (string) - Optional - Filter by OpenDOAR ID. - **software** (string) - Optional - Filter by software. - **certificates** (string) - Optional - Filter by certificates. - **subjects** (string) - Optional - Filter by subjects. - **repositoryType** (string) - Optional - Filter by repository type. ### Response #### Success Response (200) List of reference repositories. ``` -------------------------------- ### GET /repositories Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md List repositories with optional filters and pagination. ```APIDOC ## GET /repositories ### Description List repositories with optional filters and pagination. Returns a list of repository records. ### Method GET ### Endpoint /repositories ### Parameters #### Query Parameters - **query** (string) - Optional - Search query - **provider_id** (string) - Optional - Filter by provider ID - **consortium_id** (string) - Optional - Filter by consortium ID - **year** (integer) - Optional - Filter by year - **software** (string) - Optional - Filter by software - **certificate** (string) - Optional - Filter by certificate - **repository_type** (string) - Optional - Filter by repository type - **subject** (string) - Optional - Filter by subject - **field_of_science** (string) - Optional - Filter by field of science - **is_active** (boolean) - Optional - Filter by active status - **has_required_contacts** (boolean) - Optional - Filter by required contacts - **re3data_id** (string) - Optional - Filter by re3data ID - **opendoar_id** (string) - Optional - Filter by opendoar ID ### Response #### Success Response (200) Returns a list of repositories. #### Response Example ```json { "repositories": [] } ``` ``` -------------------------------- ### GET /clients Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md List clients with optional filters and pagination. ```APIDOC ## GET /clients ### Description List clients with optional filters and pagination. Returns a list of client records. ### Method GET ### Endpoint /clients ### Parameters #### Query Parameters - **query** (string) - Optional - Search query - **provider_id** (string) - Optional - Filter by provider ID - **consortium_id** (string) - Optional - Filter by consortium ID - **year** (integer) - Optional - Filter by year - **software** (string) - Optional - Filter by software - **certificate** (string) - Optional - Filter by certificate - **repository_type** (string) - Optional - Filter by repository type - **subject** (string) - Optional - Filter by subject - **field_of_science** (string) - Optional - Filter by field of science - **is_active** (boolean) - Optional - Filter by active status - **has_required_contacts** (boolean) - Optional - Filter by required contacts - **re3data_id** (string) - Optional - Filter by re3data ID - **opendoar_id** (string) - Optional - Filter by opendoar ID ### Response #### Success Response (200) Returns a list of clients. #### Response Example ```json { "clients": [] } ``` ``` -------------------------------- ### GET /client-prefixes/{uid} Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Shows a specific client-prefix link. ```APIDOC ## GET /client-prefixes/{uid} ### Description Shows a specific client-prefix link. ### Method GET ### Endpoint /client-prefixes/{uid} ### Parameters #### Path Parameters - **uid** (string) - Required - The link UID. ### Response #### Success Response (200) - **data** (object) - The link object. #### Response Example { "data": {} } ``` -------------------------------- ### GET /reference-repositories/{id} Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Show a single reference repository. ```APIDOC ## GET /reference-repositories/{id} ### Description Retrieves a single reference repository by its ID. Requires authentication. ### Method GET ### Endpoint /reference-repositories/{id} ### Parameters #### Path Parameters - **id** (string) - Required - ID of the reference repository. ### Response #### Success Response (200) Reference repository details. ``` -------------------------------- ### GET /repository-prefixes/{uid} Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Shows a specific repository-prefix link. ```APIDOC ## GET /repository-prefixes/{uid} ### Description Shows a specific repository-prefix link. ### Method GET ### Endpoint /repository-prefixes/{uid} ### Parameters #### Path Parameters - **uid** (string) - Required - The link UID. ### Response #### Success Response (200) - **data** (object) - The link object. #### Response Example { "data": {} } ``` -------------------------------- ### GET /repository-prefixes/:id Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Shows a single repository prefix. ```APIDOC ## GET /repository-prefixes/:id ### Description Shows a single repository prefix. ### Method GET ### Endpoint /repository-prefixes/:id ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the repository prefix. ### Response #### Success Response (200) - **data** (object) - The repository prefix object. ``` -------------------------------- ### GET /client-prefixes/:id Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Shows a single client prefix. ```APIDOC ## GET /client-prefixes/:id ### Description Shows a single client prefix. ### Method GET ### Endpoint /client-prefixes/:id ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the client prefix. ### Response #### Success Response (200) - **data** (object) - The client prefix object. ``` -------------------------------- ### GET /repositories/totals Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Get DOI counts per repository. Requires authentication. ```APIDOC ## GET /repositories/totals ### Description Get DOI counts per repository. Requires authentication. ### Method GET ### Endpoint /repositories/totals ### Response #### Success Response (200) Returns DOI counts per repository. #### Response Example ```json { "totals": [] } ``` ``` -------------------------------- ### Set up the database Source: https://github.com/datacite/lupo/blob/master/README.md Sets up the database (create, schema load, seed) for the development environment. ```bash docker-compose exec web bundle exec rake db:setup RAILS_ENV=development ``` -------------------------------- ### GET /repositories/{symbol}/stats Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Get statistics for a specific repository. Requires authentication. ```APIDOC ## GET /repositories/{symbol}/stats ### Description Get statistics for a specific repository. Requires authentication. ### Method GET ### Endpoint /repositories/{symbol}/stats ### Parameters #### Path Parameters - **symbol** (string) - Required - The repository symbol ### Response #### Success Response (200) Returns repository statistics. #### Response Example ```json { "clients": {}, "dois": {} } ``` ``` -------------------------------- ### GET /clients/{symbol}/stats Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Get statistics for a specific client. Requires authentication. ```APIDOC ## GET /clients/{symbol}/stats ### Description Get statistics for a specific client. Requires authentication. ### Method GET ### Endpoint /clients/{symbol}/stats ### Parameters #### Path Parameters - **symbol** (string) - Required - The client symbol ### Response #### Success Response (200) Returns client statistics. #### Response Example ```json { "clients": {}, "dois": {} } ``` ``` -------------------------------- ### Run the full test suite Source: https://github.com/datacite/lupo/blob/master/README.md Runs the entire test suite. ```bash docker-compose exec web bundle exec rspec ``` -------------------------------- ### POST /repository-prefixes Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Creates a new repository prefix. ```APIDOC ## POST /repository-prefixes ### Description Creates a new repository prefix. ### Method POST ### Endpoint /repository-prefixes ### Parameters #### Request Body - **id** (string) - Optional - The ID of the repository prefix. - **repository** (string) - Required - The repository symbol. - **prefix** (string) - Required - The prefix UID. ### Request Example { "data": { "type": "repository-prefixes", "attributes": { "repository": "repository-symbol", "prefix": "prefix-uid" } } } ### Response #### Success Response (201) - **data** (object) - The created repository prefix object. ``` -------------------------------- ### GET /client-api/graphql Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Returns 405 Method Not Allowed for GET requests to the GraphQL endpoint. The response includes an Allow header and a JSON message indicating that only POST requests are supported. ```APIDOC ## GET /client-api/graphql ### Description Returns 405 Method Not Allowed for GET requests to the GraphQL endpoint. The response includes an Allow header and a JSON message indicating that only POST requests are supported. ### Method GET ### Endpoint /client-api/graphql ### Response #### Success Response (405) - **message** (string) - "This endpoint only supports POST requests." #### Response Example { "message": "This endpoint only supports POST requests." } ``` -------------------------------- ### POST /repositories Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Create a new repository. Requires authentication and authorization. ```APIDOC ## POST /repositories ### Description Create a new repository. Requires authentication and authorization. ### Method POST ### Endpoint /repositories ### Parameters #### Request Body - **repository** (object) - Required - Repository attributes per safe_params ### Response #### Success Response (201) Returns the created repository. #### Error Response (422) Validation error. #### Response Example ```json { "repository": {} } ``` ``` -------------------------------- ### OPTIONS * Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Handles CORS preflight requests, returning 204 No Content. ```APIDOC ## OPTIONS * ### Description Handles CORS preflight requests, returning 204 No Content. ### Method OPTIONS ### Endpoint * ### Response #### Success Response (204) No content ``` -------------------------------- ### GET /contacts Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Lists contacts. ```APIDOC ## GET /contacts ### Description Lists contacts. ### Method GET ### Endpoint /contacts ### Response #### Success Response (200) - **contacts** (array) - List of contact objects. #### Response Example { "contacts": [] } ``` -------------------------------- ### GET /organizations Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md List ROR organizations. ```APIDOC ## GET /organizations ### Description Lists ROR organizations. Requires authentication. Also available as CSV at `/organizations/text/csv`. ### Method GET ### Endpoint /organizations ### Response #### Success Response (200) List of organizations. ``` -------------------------------- ### POST /prefixes Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Creates a new prefix. Only id and created_at are accepted. ```APIDOC ## POST /prefixes ### Description Creates a new prefix. Only id and created_at are accepted. ### Method POST ### Endpoint /prefixes ### Parameters #### Request Body - **id** (string) - Required - The prefix identifier (mapped to uid). - **created_at** (string) - Optional - Creation timestamp. ### Request Example { "id": "10.1234", "created_at": "2023-01-01T00:00:00Z" } ### Response #### Success Response (201) - **prefix** (object) - The created prefix object. #### Response Example { "prefix": {} } ``` -------------------------------- ### GET /resource-types Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md List resource types. ```APIDOC ## GET /resource-types ### Description Returns the fixed resource-type catalog with dash keys. Requires authentication. ### Method GET ### Endpoint /resource-types ### Response #### Success Response (200) List of resource types. ``` -------------------------------- ### POST /prefixes Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Creates a new prefix. ```APIDOC ## POST /prefixes ### Description Creates a new prefix. ### Method POST ### Endpoint /prefixes ### Parameters #### Request Body - **data.attributes.id** (string) - Required - The prefix UID. - **data.attributes.createdAt** (string) - Optional - Creation timestamp. ### Response #### Success Response (201) - **data** (object) - The created prefix. #### Response Example { "data": {} } ``` -------------------------------- ### GET /repositories Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Lists repositories. Supports CSV output at /repositories/text/csv. ```APIDOC ## GET /repositories ### Description Lists repositories. Supports CSV output at /repositories/text/csv. ### Method GET ### Endpoint /repositories ### Response #### Success Response (200) - **repositories** (array) - List of repository objects. #### Response Example { "repositories": [] } ``` -------------------------------- ### GET /provider-prefixes Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Lists provider-prefix links. ```APIDOC ## GET /provider-prefixes ### Description Lists provider-prefix links. ### Method GET ### Endpoint /provider-prefixes ### Response #### Success Response (200) - **data** (array) - List of provider-prefix links. #### Response Example { "data": [] } ``` -------------------------------- ### GET /repositories/totals Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Returns totals for repositories. ```APIDOC ## GET /repositories/totals ### Description Returns totals for repositories. ### Method GET ### Endpoint /repositories/totals ### Response #### Success Response (200) - **totals** (object) - Aggregated totals. #### Response Example { "totals": {} } ``` -------------------------------- ### POST /repositories Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Creates a new repository. Request body extends the client body with additional fields. ```APIDOC ## POST /repositories ### Description Creates a new repository. Request body extends the client body with additional fields. ### Method POST ### Endpoint /repositories ### Parameters #### Request Body - **analyticsDashboardUrl** (string) - Optional - Analytics dashboard URL. - **analyticsTrackingId** (string) - Optional - Analytics tracking ID. - **subjects[]** (array) - Optional - List of subjects, each with nested fields: subject, subjectScheme, schemeUri, valueUri, lang, classificationCode. ### Request Example { "analyticsDashboardUrl": "https://example.com/dashboard", "analyticsTrackingId": "UA-12345", "subjects": [ { "subject": "Example Subject", "subjectScheme": "Example Scheme", "schemeUri": "https://example.com/scheme", "valueUri": "https://example.com/value", "lang": "en", "classificationCode": "123" } ] } ### Response #### Success Response (201) - **repository** (object) - The created repository object. #### Response Example { "repository": {} } ``` -------------------------------- ### GET /repositories/random Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Returns a random repository. ```APIDOC ## GET /repositories/random ### Description Returns a random repository. ### Method GET ### Endpoint /repositories/random ### Response #### Success Response (200) - **repository** (object) - A random repository object. #### Response Example { "repository": {} } ``` -------------------------------- ### POST /clients Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Creates a new client. Returns 201 on success and 422 on validation failure. ```APIDOC ## [POST] /clients ### Description Creates a new client. Returns 201 on success and 422 on validation failure. ### Method POST ### Endpoint /clients ### Parameters #### Request Body - **symbol** (string) - Required - Client symbol - **name** (string) - Required - Client name - **systemEmail** (string) - Optional - System email (alias: contactEmail) - **globusUuid** (string) - Optional - Globus UUID - **domains** (array) - Optional - List of domains - **provider** (string) - Optional - Provider ID - **url** (string) - Optional - URL - **repositoryType[]** (array) - Optional - Repository types - **description** (string) - Optional - Description - **language[]** (array) - Optional - Languages - **alternateName** (string) - Optional - Alternate name - **software** (string) - Optional - Software - **targetId** (string) - Optional - Target ID - **isActive** (boolean) - Optional - Active status - **passwordInput** (string) - Optional - Password input - **clientType** (string) - Optional - Client type - **re3data** (string) - Optional - re3data ID - **opendoar** (string) - Optional - opendoar ID - **issn** (object) - Optional - ISSN object with issnl, electronic, print - **certificate[]** (array) - Optional - Certificates - **serviceContact** (object) - Optional - Service contact with email, givenName, familyName - **salesforceId** (string) - Optional - Salesforce ID - **fromSalesforce** (boolean) - Optional - From Salesforce flag ### Response #### Success Response (201) - **data** (object) - Created client object #### Error Response (422) - **errors** (array) - Validation errors #### Response Example { "data": {} } ``` -------------------------------- ### POST /client-prefixes Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Creates a client-prefix link. ```APIDOC ## POST /client-prefixes ### Description Creates a client-prefix link. ### Method POST ### Endpoint /client-prefixes ### Response #### Success Response (201) - **data** (object) - The created link. #### Response Example { "data": {} } ``` -------------------------------- ### GET /enrichments/{uuid} Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Show a single enrichment. ```APIDOC ## GET /enrichments/{uuid} ### Description Retrieves a single enrichment by its UUID. Requires authentication. ### Method GET ### Endpoint /enrichments/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - UUID of the enrichment. ### Response #### Success Response (200) Enrichment details. ``` -------------------------------- ### GET /events/{uuid} Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md Show a single event. ```APIDOC ## GET /events/{uuid} ### Description Retrieves a single event by its UUID. Requires authentication. ### Method GET ### Endpoint /events/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - UUID of the event. ### Response #### Success Response (200) Event details. ``` -------------------------------- ### POST /client-prefixes Source: https://github.com/datacite/lupo/blob/master/_autodocs/api-reference/controllers-resources.md Creates a new client prefix. The request body accepts `id`, `client`, `prefix`, and `providerPrefix` (mapped to `provider_prefix`). The `uid` is constructed as `/`. ```APIDOC ## POST /client-prefixes ### Description Creates a new client prefix. The request body accepts `id`, `client`, `prefix`, and `providerPrefix` (mapped to `provider_prefix`). The `uid` is constructed as `/`. ### Method POST ### Endpoint /client-prefixes ### Parameters #### Request Body - **id** (string) - Optional - The ID of the client prefix. - **client** (string) - Required - The client symbol. - **prefix** (string) - Required - The prefix UID. - **providerPrefix** (string) - Optional - The provider prefix UID (mapped to `provider_prefix`). ### Request Example { "data": { "type": "client-prefixes", "attributes": { "client": "client-symbol", "prefix": "prefix-uid", "providerPrefix": "provider-prefix-uid" } } } ### Response #### Success Response (201) - **data** (object) - The created client prefix object. ``` -------------------------------- ### GET /events Source: https://github.com/datacite/lupo/blob/master/_autodocs/endpoints.md List events with sorting options. ```APIDOC ## GET /events ### Description Lists events from OpenSearch with sorting and crawler guard. Requires authentication. ### Method GET ### Endpoint /events ### Parameters #### Query Parameters - **sort** (string) - Optional - Sort order: `relevance|obj_id|-obj_id|occurred_at|-occurred_at|created|-created` ### Response #### Success Response (200) List of events. ```