Skip to content

Commit

Permalink
API-2532: README cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Sgorlon committed Oct 16, 2017
1 parent 5d3b9c3 commit cb6b3fe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,41 @@

This microservice stores definitions and values for the HMRC Developer Hub.


### Subscription Field Definitions Endpoint examples

#### Add or modify field definitions
```
curl -v -X PUT -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "fieldDefinitions": [ { "name": "callback-url", "description": "Callback URL", "type": "URL" }, { "name": "token", "description": "Secure Token", "type": "SecureToken" } ] }' "http://localhost:9000/definition/context/ciao-api/version/1.0"
```

#### Get field definitions by API context and API version
```
curl -v -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" "http://localhost:9000/definition/context/ciao-api/version/1.0"
```


### Subscription Fields Endpoint examples

#### Add or modify subscription fields
```
curl -v -X PUT -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "fields" : { "field-name" : "field-value" } }' "http://localhost:9000/field/application/327d9145-4965-4d28-a2c5-39dedee50334/context/ciao-api/version/1.0"
```

#### Get subscription fields by fields id
```
curl -v -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" "http://localhost:9000/field/f121ffa3-df94-43a0-8235-ac4530f9700a"
```

#### Get subscription fields by application id, API context, API version
```
curl -v -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" "http://localhost:9000/field/application/327d9145-4965-4d28-a2c5-39dedee50334/context/ciao-api/version/1.0"
```

#### Delete subscription fields by application id, API context, API version
```
curl -v -X DELETE -H "Cache-Control: no-cache" "http://localhost:9000/field/application/327d9145-4965-4d28-a2c5-39dedee50334/context/ciao-api/version/1.0"
```


## Tests
Expand Down

0 comments on commit cb6b3fe

Please sign in to comment.