Skip to content

Offline Licensing: How to configure dataset? #80

Answered by ezekg
Scarick asked this question in Q&A
Discussion options

You must be logged in to vote

When creating the license key, whatever the license's "key" is set to during creation is what is signed and encoded into the final key.

curl -X POST 'https://api.keygen.sh/v1/accounts/<account>/licenses' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -u 'token:<token>' \
  -d '{
        "data": {
          "type": "licenses",
          "attributes": {
+           "key": "{ \"some\": \"data\", \"to\": [\"be\", \"signed\"] }"
          },
          "relationships": {
            "policy": {
              "data": { "type": "policies", "id": "<policy>" }
            }
          }
        }
      }'

Would result in, for example:

{
  "data": {
    "id": "ab5f7b72-…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Scarick
Comment options

Answer selected by Scarick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants