TNS Internal:NDR/API/2.0/specification/deauthorizeToChange
From NSDLWiki
< TNS Internal:NDR | API | 2.0
NDR Project Documentation | Conceptual Framework | v1.0 NDR-API Index | v2.0 NDR-API Index | Model |
Under Construction
Proposed method for inclusion in NDR/API 2.0.
- Please provide feedback and comments in the NSDL Data Repository (NDR) API 2.0 Forum of the NSDL Community Forums.
NDR API Documentation - deauthorizeToChange
Remove the authorization for an agent to make updates to an object and its children. Authoization to change is typically used to allow multiple applications to contribute to the same collection. This request removes those permissions. NOTE: Only the owner agent of the target object may perform this operation.
Request URL
- http://ndr.nsdlib.org/api/deauthorizeToChange
- Must be an HTTP POST request.
Arguments
Structure of input:
- inputXML (required)
- target (required) - the externally resolvable identifier (handle) for an object that the agent is no longer allowed to modify. NOTE: At this time, the only supported target object type is Collection.
- agents (required) - a grouping of one or more agents whose permissions are being affected
- agent (at least one required) - the externally resolvable identifier (handle) for the agent gaining modify permissions. NOTE: Multiple agent elements may be listed to give permission to multiple agents with a single call.
InputXML Example
Below is example inputXML for removing authorization for an agent to change an object and its children in the NDR.
<?xml version="1.0" encoding="UTF-8"?> <inputXML xmlns="http://ns.nsdlib.org/ndr/request_v2.00/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.nsdlib.org/ndr/request_v2.00/ http://ns.nsdlib.org/schemas/ndr/request_v2.00.xsd" schemaVersion="1.00.000"> <target>2200/2010030201T</target> <agents> <agent>2200/2010030102T</agent> <agent>2200/2010030103T</agent> <agent>2200/2010030104T</agent> </agents> </inputXML>
Response
Structure of response:
- handle - the externally resolvable identifier for the target object.
- handleURL - the permanent URL to an XML representation of the target object in the NDR.
Common Errors
- inadequate permissions because signing agent does not own the target object
Response Example
Below is an example response for this request.
<?xml version="1.0" encoding="UTF-8"?> <NSDLDataRepository schemaVersion="1.00.000" xmlns="http://ns.nsdlib.org/ndr/response_v2.00/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.nsdlib.org/ndr/response_v2.00/ http://ns.nsdlib.org/schemas/ndr/response_v2.00.xsd"> <responseTime>2006-04-10T18:07:53Z</responseTime> <requestURL>http://ndr.nsdlib.org/api/deauthorizeToChange</requestURL> <resultData> <handle>2200/20061212656</handle> <handleURL>http://ndr.nsdl.org/api/getCollectionRecord/2200/20061212656</handleURL> <resultData> </NSDLDataRespository>
API Links:
- Conceptual Framework (2.0 philosophy)
- APIBasics
- ObjectTypes
- Encoding
- APIRequestsByObject v1.0
- APIRequestsAlphabetical v1.0
- APIRequestsByObject v2.0