/organisations/id/{id} Resource

Organisations and contacts who manage their URNs and URLs with the URN-Service.

GET /organisations/id/{id}

Returns an organisation by id.

Access: Unauthorized (public) access allowed.

Request Parameters
name type description constraints
id path of the organisation to return required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Response Codes
code condition
200 if the request was completed successfully
401 if the user is not authenticated (error code 401001)
404 if the organisation with the given id could not be found (error code 404001)
Response Body
media type data type description
application/json Organisation (JSON) the organisation

Example

Request
GET /organisations/id/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "self" : "http://example.org/organisations/id/1",
  "id" : "1",
  "login" : "dnb",
  "created" : "2017-03-02T15:23:16.123Z",
  "lastModified" : "2017-03-02T15:23:16.123Z",
  "name" : "Deutsche Nationalbibliothek",
  "email" : "urn-group@example.org",
  "address" : {
    "street" : "Adickesallee 1",
    "postcode" : "60322",
    "city" : "Frankfurt am Main",
    "country" : "Germany"
  },
  "comment" : "This organisation is used for testing purposes only",
  "primaryContactSurname" : "Cantor",
  "primaryContactForename" : "Georg",
  "primaryContactEmail" : "g.cantor@example.org",
  "primaryContactPhone" : "+49 69 1525-0",
  "primaryContactFunction" : "Team Lead URN-Services",
  "primaryContactComment" : "Only in the office until for 1pm",
  "contacts" : "http://example.org/organisation/id/1/contacts",
  "namespaces" : "http://example.org/organisation/id/1/namespaces"
}
                
              

PATCH /organisations/id/{id}

Updates an existing organisation.

Access: System administrators only.

Request Parameters
name type description constraints
id path id of the organisation to update required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Request Body
media type data type description
application/json UpdateOrganisationRequest (JSON) specifies the information about the organisation that will be updated.
application/merge-patch+json UpdateOrganisationRequest (JSON)
Response Codes
code condition
204 update completed successfully
400 if a field was syntactically incorrect (error code 400007)
401 if the user could not be authenticated (error code 401001)
403
  • if the user is not allowed to update this organisation (error code 403001),
  • if the user is not allowed to update the comment field of this organisation (error code 403001),
  • a new password is given but the old password is missing (error code 403001) or
  • a new password is given but the old password is not valid (error code 403002).
404 if an organisation with the given id does not exist (error code 404001)
409 if an organisation with the given name or login name exists already (error code 409001)

Example

Request
PATCH /organisations/id/{id}
Content-Type: application/json

                
{
  "login" : "dnb",
  "password" : "xasg!mk23cfw3e",
  "oldPassword" : "1234abc",
  "name" : "Deutsche Nationalbibliothek",
  "email" : "urn-group@example.org",
  "address" : {
    "street" : "Adickesallee 1",
    "postcode" : "60322",
    "city" : "Frankfurt am Main",
    "country" : "Germany"
  },
  "comment" : "This organisation is used for testing purposes only",
  "primaryContactSurname" : "Cantor",
  "primaryContactForename" : "Georg",
  "primaryContactEmail" : "g.cantor@example.org",
  "primaryContactPhone" : "+49 69 1525-0",
  "primaryContactFunction" : "Team Lead URN-Services",
  "primaryContactComment" : "Only in the office until for 1pm"
}
                
              
Response
HTTP/1.1 204 No Content

              

DELETE /organisations/id/{id}

Deletes an organisation.

Access: System administrators only.

Request Parameters
name type description constraints
id path the organisation which should be deleted required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Response Codes
code condition
204 if the organisation was deleted successfully
401 if the user is not authenticated (error code 401001)
403
  • if the user is not authorized to delete this organisation (error code 403001) or
  • if the organisation cannot be deleted because there are URLs, namespaces or users attached to it (error code 403002).
404 if the organisation does not exist (error code 404001)

Example

Request
DELETE /organisations/id/{id}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content